smb138x-charger.txt 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. Qualcomm Technologies, Inc. SMB138X Charger Specific Bindings
  2. SMB138X Charger is an efficient programmable battery charger capable of charging
  3. a high-capacity lithium-ion battery over micro-USB or USB Type-C ultrafast with
  4. Quick Charge 2.0, Quick Charge 3.0 support. Wireless charging features full
  5. A4WP Rezence 1.2, WPC 1.2, and PMA support.
  6. =======================
  7. Required Node Structure
  8. =======================
  9. SMB138X Charger must be described in two levels of devices nodes.
  10. ==================================
  11. First Level Node - SMB138X Charger
  12. ==================================
  13. Charger specific properties:
  14. - compatible
  15. Usage: required
  16. Value type: <string>
  17. Definition: String which indicates the charging mode. Can be one of the
  18. following:
  19. Standalone/Parallel Master - "qcom,smb138x-charger"
  20. Parallel Slave - "qcom,smb138x-parallel-slave"
  21. - qcom,pmic-revid
  22. Usage: required
  23. Value type: phandle
  24. Definition: Should specify the phandle of SMB's
  25. revid module. This is used to identify
  26. the SMB subtype.
  27. - qcom,parallel-mode
  28. Usage: optional
  29. Value type: <u32>
  30. Definition: Specifies parallel charging mode. If not specified, MID-MID
  31. option is selected by default.
  32. - qcom,suspend-input
  33. Usage: optional
  34. Value type: <empty>
  35. Definition: Boolean flag which indicates that the charger should not draw
  36. current from any of its input sources (USB, DC).
  37. - qcom,use-extcon
  38. Usage: optional
  39. Value type: <empty>
  40. Definition: Boolean flag which specify that smb138x will act as main charger
  41. to do extcon USB calls. If not defined, other charger driver can
  42. act as main charger to do extcon USB calls.
  43. - qcom,fcc-max-ua
  44. Usage: optional
  45. Value type: <u32>
  46. Definition: Specifies the maximum fast charge current in micro-amps.
  47. - qcom,usb-icl-ua
  48. Usage: optional
  49. Value type: <u32>
  50. Definition: Specifies the USB input current limit in micro-amps.
  51. - qcom,dc-icl-ua
  52. Usage: optional
  53. Value type: <u32>
  54. Definition: Specifies the DC input current limit in micro-amps.
  55. - qcom,charger-temp-max-mdegc
  56. Usage: optional
  57. Value type: <u32>
  58. Definition: Specifies the maximum charger temperature in milli-degrees
  59. Celsius. If unspecified a default of 80000 will be used.
  60. - qcom,connector-temp-max-mdegc
  61. Usage: optional
  62. Value type: <u32>
  63. Definition: Specifies the maximum connector temperature in milli-degrees
  64. Celsius. If unspecified a default value of 105000 will be used.
  65. - io-channels
  66. Usage: optional
  67. Value type: List of <phandle u32>
  68. Definition: List of phandle and IIO specifier pairs, one pair
  69. for each IIO input to the device. Note: if the
  70. IIO provider specifies '0' for #io-channel-cells,
  71. then only the phandle portion of the pair will appear.
  72. - io-channel-names
  73. Usage: optional
  74. Value type: List of <string>
  75. Definition: List of IIO input name strings sorted in the same
  76. order as the io-channels property. Consumer drivers
  77. will use io-channel-names to match IIO input names
  78. with IIO specifiers.
  79. - qcom,stacked-batfet
  80. Usage: optional
  81. Value type: <empty>
  82. Definition: boolean flag. Specifies if parallel charger has stacked BATFET
  83. cofiguration.
  84. ================================================
  85. Second Level Nodes - SMB138X Charger Peripherals
  86. ================================================
  87. Peripheral specific properties:
  88. - reg
  89. Usage: required
  90. Value type: <prop-encoded-array>
  91. Definition: Address and size of the peripheral's register block.
  92. - interrupts
  93. Usage: required
  94. Value type: <prop-encoded-array>
  95. Definition: Peripheral interrupt specifier.
  96. - interrupt-names
  97. Usage: required
  98. Value type: <stringlist>
  99. Definition: Interrupt names. This list must match up 1-to-1 with the
  100. interrupts specified in the 'interrupts' property.
  101. =======================================
  102. Second Level Nodes - SMB138X Regulators
  103. =======================================
  104. The following regulator nodes are supported:
  105. "qcom,smb138x-vbus" - Regulator for enabling VBUS
  106. "qcom,smb138x-vconn" - Regulator for enabling VCONN
  107. - regulator-name
  108. Usage: required
  109. Value type: <string>
  110. Definition: Specifies the name for this regulator.
  111. =======
  112. Example
  113. =======
  114. smb138x_charger: qcom,smb138x-charger {
  115. compatible = "qcom,qpnp-smb138x-charger";
  116. #address-cells = <1>;
  117. #size-cells = <1>;
  118. qcom,suspend-input;
  119. dpdm-supply = <&qusb_phy0>;
  120. qcom,chgr@1000 {
  121. reg = <0x1000 0x100>;
  122. interrupts = <0x10 0x0 IRQ_TYPE_EDGE_BOTH>,
  123. <0x10 0x1 IRQ_TYPE_EDGE_BOTH>,
  124. <0x10 0x2 IRQ_TYPE_EDGE_BOTH>,
  125. <0x10 0x3 IRQ_TYPE_EDGE_BOTH>,
  126. <0x10 0x4 IRQ_TYPE_EDGE_BOTH>;
  127. interrupt-names = "chg-error",
  128. "chg-state-change",
  129. "step-chg-state-change",
  130. "step-chg-soc-update-fail",
  131. "step-chg-soc-update-request";
  132. };
  133. qcom,otg@1100 {
  134. reg = <0x1100 0x100>;
  135. interrupts = <0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
  136. <0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
  137. <0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
  138. <0x11 0x3 IRQ_TYPE_EDGE_BOTH>;
  139. interrupt-names = "otg-fail",
  140. "otg-overcurrent",
  141. "otg-oc-dis-sw-sts",
  142. "testmode-change-detect";
  143. };
  144. qcom,bat-if@1200 {
  145. reg = <0x1200 0x100>;
  146. interrupts = <0x12 0x0 IRQ_TYPE_EDGE_BOTH>,
  147. <0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
  148. <0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
  149. <0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
  150. <0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
  151. <0x12 0x5 IRQ_TYPE_EDGE_BOTH>;
  152. interrupt-names = "bat-temp",
  153. "bat-ocp",
  154. "bat-ov",
  155. "bat-low",
  156. "bat-therm-or-id-missing",
  157. "bat-terminal-missing";
  158. };
  159. qcom,usb-chgpth@1300 {
  160. reg = <0x1300 0x100>;
  161. interrupts = <0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
  162. <0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
  163. <0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
  164. <0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
  165. <0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
  166. <0x13 0x5 IRQ_TYPE_EDGE_BOTH>,
  167. <0x13 0x6 IRQ_TYPE_EDGE_BOTH>,
  168. <0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
  169. interrupt-names = "usbin-collapse",
  170. "usbin-lt-3p6v",
  171. "usbin-uv",
  172. "usbin-ov",
  173. "usbin-plugin",
  174. "usbin-src-change",
  175. "usbin-icl-change",
  176. "type-c-change";
  177. };
  178. qcom,dc-chgpth@1400 {
  179. reg = <0x1400 0x100>;
  180. interrupts = <0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
  181. <0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
  182. <0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
  183. <0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
  184. <0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
  185. <0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
  186. <0x14 0x6 IRQ_TYPE_EDGE_BOTH>;
  187. interrupt-names = "dcin-collapse",
  188. "dcin-lt-3p6v",
  189. "dcin-uv",
  190. "dcin-ov",
  191. "dcin-plugin",
  192. "div2-en-dg",
  193. "dcin-icl-change";
  194. };
  195. qcom,chgr-misc@1600 {
  196. reg = <0x1600 0x100>;
  197. interrupts = <0x16 0x0 IRQ_TYPE_EDGE_BOTH>,
  198. <0x16 0x1 IRQ_TYPE_EDGE_BOTH>,
  199. <0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
  200. <0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
  201. <0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
  202. <0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
  203. <0x16 0x6 IRQ_TYPE_EDGE_BOTH>,
  204. <0x16 0x7 IRQ_TYPE_EDGE_BOTH>;
  205. interrupt-names = "wdog-snarl",
  206. "wdog-bark",
  207. "aicl-fail",
  208. "aicl-done",
  209. "high-duty-cycle",
  210. "input-current-limiting",
  211. "temperature-change",
  212. "switcher-power-ok";
  213. };
  214. };