da9052.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Kernel driver da9052
  2. ====================
  3. Supported chips:
  4. * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs
  5. Prefix: 'da9052'
  6. Datasheet: Datasheet is not publicly available.
  7. Authors: David Dajun Chen <dchen@diasemi.com>
  8. Description
  9. -----------
  10. The DA9052/53 provides an Analogue to Digital Converter (ADC) with 10 bits
  11. resolution and track and hold circuitry combined with an analogue input
  12. multiplexer. The analogue input multiplexer will allow conversion of up to 10
  13. different inputs. The track and hold circuit ensures stable input voltages at
  14. the input of the ADC during the conversion.
  15. The ADC is used to measure the following inputs:
  16. ========= ===================================================================
  17. Channel 0 VDDOUT - measurement of the system voltage
  18. Channel 1 ICH - internal battery charger current measurement
  19. Channel 2 TBAT - output from the battery NTC
  20. Channel 3 VBAT - measurement of the battery voltage
  21. Channel 4 ADC_IN4 - high impedance input (0 - 2.5V)
  22. Channel 5 ADC_IN5 - high impedance input (0 - 2.5V)
  23. Channel 6 ADC_IN6 - high impedance input (0 - 2.5V)
  24. Channel 7 XY - TSI interface to measure the X and Y voltage of the touch
  25. screen resistive potentiometers
  26. Channel 8 Internal Tjunc. - sense (internal temp. sensor)
  27. Channel 9 VBBAT - measurement of the backup battery voltage
  28. ========= ===================================================================
  29. By using sysfs attributes we can measure the system voltage VDDOUT, the battery
  30. charging current ICH, battery temperature TBAT, battery junction temperature
  31. TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
  32. Voltage Monitoring
  33. ------------------
  34. Voltages are sampled by a 10 bit ADC.
  35. The battery voltage is calculated as:
  36. Milli volt = ((ADC value * 1000) / 512) + 2500
  37. The backup battery voltage is calculated as:
  38. Milli volt = (ADC value * 2500) / 512;
  39. The voltages on ADC channels 4, 5 and 6 are calculated as:
  40. Milli volt = (ADC value * 2500) / 1023
  41. Temperature Monitoring
  42. ----------------------
  43. Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures
  44. are monitored by the ADC channels.
  45. The junction temperature is calculated:
  46. Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8
  47. The junction temperature attribute is supported by the driver.
  48. The battery temperature is calculated:
  49. Degree Celsius = 1 / (t1 + 1/298) - 273
  50. where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255))
  51. Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively.