smb1351-charger.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. Summit smb1351 battery charger
  2. SMB1351 is a single-cell battery charger. It can charge
  3. the battery and power the system via the USB/AC adapter input.
  4. The smb1351 interface is via I2C bus.
  5. Required Properties:
  6. - compatible Must be "qcom,smb1351-charger".
  7. - reg The device 7-bit I2C address.
  8. Required Properties for standalone charger:
  9. - regulator-name A string used as a descriptive name for OTG regulator.
  10. - pinctrl-names The state name of the pin configuration. Only
  11. support "default".
  12. - pinctrl-0 The phandle of the pin configuration node in
  13. pinctrl for smb_int_pin.
  14. Optional Properties:
  15. - interrupts This indicates the IRQ number of the GPIO
  16. connected to the STAT pin.
  17. - qcom,fastchg-current-max-ma Fast Charging current in mA. Supported range is
  18. from 1000mA to 4500mA.
  19. - qcom,chg-autonomous-mode This is a bool property and it indicates that the
  20. charger is configured for autonomous operation and
  21. does not require any software configuration.
  22. - qcom,disable-apsd This is a bool property which disables automatic
  23. power source detection (APSD). If this is set
  24. charger detection is done by DCIN UV irq.
  25. - qcom,charging-disabled This is a bool property which disables charging.
  26. - qcom,using-pmic-therm This property indicates thermal pin connected to pmic or smb.
  27. - qcom,bms-psy-name This is a string and it points to the bms
  28. power supply name.
  29. - qcom,iterm-ma Specifies the termination current to indicate end-of-charge.
  30. Possible values in mA - 70, 100, 200, 300, 400, 500, 600, 700.
  31. - qcom,iterm-disabled Disables the termination current feature. This is a bool
  32. property.
  33. - qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which
  34. the battery is charged. Supported range 3500mV to 4500mV
  35. - qcom,recharge-mv Recharge threshold in mV - the offset from the float-volatge
  36. as which the charger restarts charging. Possible
  37. values are 50mV and 100mV.
  38. - qcom,recharge-disabled Boolean value which disables the auto-recharge.
  39. - qcom,bms-controlled-charging This property enables BMS to control EOC and
  40. recharge. BMS and charger communicates with each
  41. other via power_supply framework. This
  42. property should be used with 'qcom,iterm-disabled'
  43. to ensure EOC detection in charger is disabled.
  44. - qcom,force-hvdcp-2p0 Boolean value which allows to force hvdcp working on 2.0 mode.
  45. - qcom,parallel-charger Boolean value which enables the parallel charger.
  46. - qcom,chg-vadc Corresponding VADC device's phandle.
  47. - qcom,chg-adc_tm phandle to the corresponding VADC device to read the ADC channels.
  48. - qcom,batt-cold-decidegc Cold battery temperature in decidegC.
  49. - qcom,batt-hot-decidegc Hot battery temperature in decidegC.
  50. - qcom,batt-missing-decidegc This is a property indicating battery missing temperature, if
  51. higher than it, battery should exist.
  52. - qcom,batt-warm-decidegc: Warm battery temperature in decidegC. After hitting this threshold,
  53. "qcom,warm-bat-ma" defines maximum charging current and
  54. "qcom,warm-bat-mv" defines maximum target voltage.
  55. - qcom,batt-cool-decidegc: Cool battery temperature in decidegC. After hitting this threshold,
  56. "qcom,cool-bat-ma" defines maximum charging current and
  57. "qcom,cool-bat-mv" defines maximum target voltage.
  58. - qcom,batt-warm-ma: Maximum warm battery charge current in milli-amps.
  59. - qcom,batt-cool-ma: Maximum cool battery charge current in milli-amps.
  60. - qcom,batt-warm-mv: Maximum warm battery target voltage in milli-volts.
  61. - qcom,batt-cool-mv: Maximum cool battery target voltage in milli-volts.
  62. - qcom,parallel-en-pin-polarity Specify the polarity of enable signal controlled
  63. via pin in a parallel-charger configuration.
  64. 0 - Active low and 1 - Active high.
  65. If not specified the default value is active-low.
  66. - qcom,parallel-external-current-sense If present specifies external rsense is
  67. used for charge current sensing.
  68. - qcom,stacked-batfet: Boolean flag. Specifies if parallel charger has stacked BATFET
  69. cofiguration.
  70. Example for standalone charger:
  71. &i2c_4 {
  72. smb1351_otg_supply: smb1351-charger@57 {
  73. compatible = "qcom,smb1351-charger";
  74. reg = <0x57>;
  75. interrupt-parent = <&msm_gpio>;
  76. interrupts = <62 2>;
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&smb_int_default>;
  79. qcom,float-voltage-mv = <4350>;
  80. qcom,iterm-ma = <100>;
  81. qcom,recharge-mv = <100>;
  82. qcom,bms-psy-name = "bms";
  83. regulator-name = "smb1351_otg_vreg";
  84. qcom,using-pmic-therm;
  85. qcom,chg-adc_tm = <&pm8916_adc_tm>;
  86. qcom,chg-vadc = <&pm8916_vadc>;
  87. qcom,batt-hot-decidegc = <550>;
  88. qcom,batt-cold-decidegc = <0>;
  89. qcom,batt-missing-decidegc = <(-200)>;
  90. qcom,batt-warm-decidegc = <500>;
  91. qcom,batt-cool-decidegc = <50>;
  92. qcom,batt-warm-ma = <350>;
  93. qcom,batt-cool-ma = <350>;
  94. qcom,batt-warm-mv = <4200>;
  95. qcom,batt-cool-mv = <4200>;
  96. };
  97. };
  98. Example for parallel charger:
  99. &i2c_11 {
  100. smb1351-charger@1d {
  101. compatible = "qcom,smb1351-charger";
  102. reg = <0x1d>;
  103. qcom,parallel-charger;
  104. qcom,float-voltage-mv = <4400>;
  105. qcom,recharge-mv = <100>;
  106. };
  107. };