smb135x-charger.txt 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. SMB135x battery charger
  2. SMB135x is a single-cell switching mode battery charger. It can charge
  3. the battery and power the system via the USB and AC adapter input.
  4. The smb135x interface is via I2C bus.
  5. Required Properties:
  6. - compatible: Must be "qcom,smb1356-charger", "qcom,smb1357-charger",
  7. "qcom,smb1358-charger" or "qcom,smb1359-charger".
  8. - reg: The device 7-bit I2C address.
  9. Optional Properties:
  10. - interrupts This indicates the IRQ number of the GPIO
  11. connected to the STAT pin.
  12. - qcom,bms-psy-name the psy name to use for reporting battery capacity. If left
  13. unspecified it uses a preprogrammed default value.
  14. - qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which
  15. the battery is charged. Supported range 3600mV to 4500mV
  16. - qcom,charging-timeout Maximum duration in minutes that a single charge
  17. cycle may last. Supported values are: 0, 192, 384,
  18. 768, and 1536. A value of 0 means that no
  19. charge cycle timeout is used and charging can
  20. continue indefinitely.
  21. - qcom,dc-psy-type The type of charger connected to the DC path.
  22. Can be "Mains" or "Wireless"
  23. - qcom,dc-psy-ma The current in mA dc path can support. Must be specified if
  24. dc-psy-type is specified. Valid range 300mA to 2000mA.
  25. - qcom,charging-disabled Set this if charging should be disabled in the build
  26. by default. Useful in usecases where battery current
  27. needs to be profiled even when USB is present.
  28. - qcom,recharge-thresh-mv Specifies the minimum voltage drop in millivolts
  29. below the float voltage that is required in
  30. order to initiate a new charging cycle.
  31. Supported values are: 50, 100, 200 and 300mV.
  32. - qcom,bmd-algo-disabled Indicates if the battery missing detection algorithm
  33. is disabled. If this node is present SMB uses
  34. the THERM pin for battery missing detection.
  35. - qcom,iterm-ma Specifies the termination current to indicate end-of-charge.
  36. Possible values in mA - 50, 100, 150, 200, 250, 300, 500, 600.
  37. - qcom,iterm-disabled Disables the termination current feature. This is a bool
  38. property.
  39. - qcom,soft-vfloat-comp-disabled Set this property when the battery is powered via external
  40. source and could go above the float voltage. smb135x chips
  41. go in to unintentional reverse boost in such a situation and
  42. the float voltage compensation needs to be disabled to avoid
  43. that reverse boost.
  44. - qcom,soft-current-comp-disabled Set this property to disable charging current compensation
  45. if battery temperature exceeds soft JEITA thresholds.
  46. - qcom,gamma-setting Array of gamma values for JEITA. The sequence is
  47. <"Cold Hard" "Hot Hard" "Cold Soft" "Hot Soft">. Gamma value
  48. indicates the ratio of the pull up resistors and NTC
  49. resistor in battery pack. There are 4 options referring to
  50. the graphic user interface.
  51. - qcom,thermal-mitigation: Array of input current limit values for different
  52. system thermal mitigation level.
  53. - regulator-name A string used as a descriptive name for OTG regulator.
  54. - therm-bias-supply The supply that provides bias voltage to the battery
  55. thermistor. This is useful in designs that do not use the SYSON
  56. pin to bias the thermistor.
  57. - usb-pullup-supply The supply regulator that act as pull-up for USB data lines.
  58. - qcom,parallel-charger: A flag to indicate if the charger merely assists for USB
  59. charging. In this case the input current from USB is split
  60. between a main charger and smb135x for reducing thermal impact
  61. of high current charging from USB path.
  62. - qcom,inhibit-disabled: Disables the charger-inhibit function.
  63. - qcom,bms-controlled-charging: This property enables BMS to control EOC and
  64. recharge. BMS and charger communicates with each
  65. other via power_supply framework. This
  66. property should be used with 'qcom,iterm-disabled'
  67. to ensure EOC detection in charger is
  68. disabled.
  69. - qcom,fastchg-ma: Specifies the maximum fastcharge current.
  70. The possible range for fastcharge current is
  71. from 300mA to 3000mA.
  72. - qcom,id-line-not-connected: Specifies if smb135x charger is not monitoring the USB_ID line.
  73. - qcom,parallel-en-pin-polarity Specify the polarity of enable signal controlled
  74. via pin in a parallel-charger configuration.
  75. 0 - Active low and 1 - Active high.
  76. If not specified the default value is active-low.
  77. Example:
  78. i2c@f9967000 {
  79. smb1357-charger@1b {
  80. compatible = "qcom,smb1357-charger";
  81. reg = <0x1b>;
  82. interrupt-parent = <&spmi_bus>;
  83. interrupts = <0x00 0xCD 0>;
  84. qcom,float-voltage-mv = <4200>;
  85. qcom,iterm-ma = <100>;
  86. qcom,dc-psy-type = <8>;
  87. qcom,dc-psy-ma = <800>;
  88. qcom,charging-disabled;
  89. qcom,recharge-thresh-mv = <100>;
  90. regulator-name = "smb1357-otg";
  91. qcom,thermal-mitigation = <1500 700 600 325>;
  92. qcom,gamma-setting = <3 2 0 2>;
  93. qcom,fastchg-ma = <3000>;
  94. };
  95. };