Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver da9052
0002 ====================
0003 
0004 Supported chips:
0005 
0006   * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs
0007 
0008     Prefix: 'da9052'
0009 
0010     Datasheet: Datasheet is not publicly available.
0011 
0012 Authors: David Dajun Chen <dchen@diasemi.com>
0013 
0014 Description
0015 -----------
0016 
0017 The DA9052/53 provides an Analogue to Digital Converter (ADC) with 10 bits
0018 resolution and track and hold circuitry combined with an analogue input
0019 multiplexer. The analogue input multiplexer will allow conversion of up to 10
0020 different inputs. The track and hold circuit ensures stable input voltages at
0021 the input of the ADC during the conversion.
0022 
0023 The ADC is used to measure the following inputs:
0024 
0025 ========= ===================================================================
0026 Channel 0 VDDOUT - measurement of the system voltage
0027 Channel 1 ICH - internal battery charger current measurement
0028 Channel 2 TBAT - output from the battery NTC
0029 Channel 3 VBAT - measurement of the battery voltage
0030 Channel 4 ADC_IN4 - high impedance input (0 - 2.5V)
0031 Channel 5 ADC_IN5 - high impedance input (0 - 2.5V)
0032 Channel 6 ADC_IN6 - high impedance input (0 - 2.5V)
0033 Channel 7 XY - TSI interface to measure the X and Y voltage of the touch
0034           screen resistive potentiometers
0035 Channel 8 Internal Tjunc. - sense (internal temp. sensor)
0036 Channel 9 VBBAT - measurement of the backup battery voltage
0037 ========= ===================================================================
0038 
0039 By using sysfs attributes we can measure the system voltage VDDOUT, the battery
0040 charging current ICH, battery temperature TBAT, battery junction temperature
0041 TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
0042 
0043 Voltage Monitoring
0044 ------------------
0045 
0046 Voltages are sampled by a 10 bit ADC.
0047 
0048 The battery voltage is calculated as:
0049 
0050         Milli volt = ((ADC value * 1000) / 512) + 2500
0051 
0052 The backup battery voltage is calculated as:
0053 
0054         Milli volt = (ADC value * 2500) / 512;
0055 
0056 The voltages on ADC channels 4, 5 and 6 are calculated as:
0057 
0058         Milli volt = (ADC value * 2500) / 1023
0059 
0060 Temperature Monitoring
0061 ----------------------
0062 
0063 Temperatures are sampled by a 10 bit ADC.  Junction and battery temperatures
0064 are monitored by the ADC channels.
0065 
0066 The junction temperature is calculated:
0067 
0068         Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8
0069 
0070 The junction temperature attribute is supported by the driver.
0071 
0072 The battery temperature is calculated:
0073 
0074         Degree Celsius = 1 / (t1 + 1/298) - 273
0075 
0076 where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255))
0077 
0078 Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively.