rohm,bd71828-pmic.yaml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/rohm,bd71828-pmic.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: ROHM BD71828 Power Management Integrated Circuit
  7. maintainers:
  8. - Matti Vaittinen <mazziesaccount@gmail.com>
  9. description: |
  10. BD71828GW is a single-chip power management IC for battery-powered portable
  11. devices. The IC integrates 7 buck converters, 7 LDOs, and a 1500 mA
  12. single-cell linear charger. Also included is a Coulomb counter, a real-time
  13. clock (RTC), and a 32.768 kHz clock gate.
  14. properties:
  15. compatible:
  16. oneOf:
  17. - const: rohm,bd71828
  18. - items:
  19. - const: rohm,bd71879
  20. - const: rohm,bd71828
  21. reg:
  22. description:
  23. I2C slave address.
  24. maxItems: 1
  25. interrupts:
  26. maxItems: 1
  27. gpio-controller: true
  28. "#gpio-cells":
  29. const: 2
  30. description: |
  31. The first cell is the pin number and the second cell is used to specify
  32. flags. See ../gpio/gpio.txt for more information.
  33. clocks:
  34. maxItems: 1
  35. "#clock-cells":
  36. const: 0
  37. clock-output-names:
  38. const: bd71828-32k-out
  39. rohm,clkout-open-drain:
  40. description: clk32kout mode. Set to 1 for "open-drain" or 0 for "cmos".
  41. $ref: /schemas/types.yaml#/definitions/uint32
  42. minimum: 0
  43. maximum: 1
  44. rohm,charger-sense-resistor-ohms:
  45. minimum: 10000000
  46. maximum: 50000000
  47. description: |
  48. BD71827 and BD71828 have SAR ADC for measuring charging currents.
  49. External sense resistor (RSENSE in data sheet) should be used. If some
  50. other but 30MOhm resistor is used the resistance value should be given
  51. here in Ohms.
  52. regulators:
  53. $ref: /schemas/regulator/rohm,bd71828-regulator.yaml
  54. description:
  55. List of child nodes that specify the regulators.
  56. leds:
  57. $ref: /schemas/leds/rohm,bd71828-leds.yaml
  58. gpio-reserved-ranges:
  59. description: |
  60. Usage of BD71828 GPIO pins can be changed via OTP. This property can be
  61. used to mark the pins which should not be configured for GPIO. Please see
  62. the ../gpio/gpio.txt for more information.
  63. system-power-controller: true
  64. required:
  65. - compatible
  66. - reg
  67. - interrupts
  68. - clocks
  69. - "#clock-cells"
  70. - regulators
  71. - gpio-controller
  72. - "#gpio-cells"
  73. additionalProperties: false
  74. examples:
  75. - |
  76. #include <dt-bindings/interrupt-controller/irq.h>
  77. #include <dt-bindings/leds/common.h>
  78. i2c {
  79. #address-cells = <1>;
  80. #size-cells = <0>;
  81. pmic: pmic@4b {
  82. compatible = "rohm,bd71828";
  83. reg = <0x4b>;
  84. interrupt-parent = <&gpio1>;
  85. interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
  86. clocks = <&osc 0>;
  87. #clock-cells = <0>;
  88. clock-output-names = "bd71828-32k-out";
  89. gpio-controller;
  90. #gpio-cells = <2>;
  91. gpio-reserved-ranges = <0 1>, <2 1>;
  92. rohm,charger-sense-resistor-ohms = <10000000>;
  93. regulators {
  94. buck1: BUCK1 {
  95. regulator-name = "buck1";
  96. regulator-min-microvolt = <500000>;
  97. regulator-max-microvolt = <2000000>;
  98. regulator-ramp-delay = <2500>;
  99. };
  100. buck2: BUCK2 {
  101. regulator-name = "buck2";
  102. regulator-min-microvolt = <500000>;
  103. regulator-max-microvolt = <2000000>;
  104. regulator-ramp-delay = <2500>;
  105. };
  106. buck3: BUCK3 {
  107. regulator-name = "buck3";
  108. regulator-min-microvolt = <1200000>;
  109. regulator-max-microvolt = <2000000>;
  110. };
  111. buck4: BUCK4 {
  112. regulator-name = "buck4";
  113. regulator-min-microvolt = <1000000>;
  114. regulator-max-microvolt = <1800000>;
  115. };
  116. buck5: BUCK5 {
  117. regulator-name = "buck5";
  118. regulator-min-microvolt = <2500000>;
  119. regulator-max-microvolt = <3300000>;
  120. };
  121. buck6: BUCK6 {
  122. regulator-name = "buck6";
  123. regulator-min-microvolt = <500000>;
  124. regulator-max-microvolt = <2000000>;
  125. regulator-ramp-delay = <2500>;
  126. };
  127. buck7: BUCK7 {
  128. regulator-name = "buck7";
  129. regulator-min-microvolt = <500000>;
  130. regulator-max-microvolt = <2000000>;
  131. regulator-ramp-delay = <2500>;
  132. };
  133. ldo1: LDO1 {
  134. regulator-name = "ldo1";
  135. regulator-min-microvolt = <800000>;
  136. regulator-max-microvolt = <3300000>;
  137. };
  138. ldo2: LDO2 {
  139. regulator-name = "ldo2";
  140. regulator-min-microvolt = <800000>;
  141. regulator-max-microvolt = <3300000>;
  142. };
  143. ldo3: LDO3 {
  144. regulator-name = "ldo3";
  145. regulator-min-microvolt = <800000>;
  146. regulator-max-microvolt = <3300000>;
  147. };
  148. ldo4: LDO4 {
  149. regulator-name = "ldo4";
  150. regulator-min-microvolt = <800000>;
  151. regulator-max-microvolt = <3300000>;
  152. };
  153. ldo5: LDO5 {
  154. regulator-name = "ldo5";
  155. regulator-min-microvolt = <800000>;
  156. regulator-max-microvolt = <3300000>;
  157. };
  158. ldo6: LDO6 {
  159. regulator-name = "ldo6";
  160. regulator-min-microvolt = <1800000>;
  161. regulator-max-microvolt = <1800000>;
  162. };
  163. ldo7_reg: LDO7 {
  164. regulator-name = "ldo7";
  165. regulator-min-microvolt = <800000>;
  166. regulator-max-microvolt = <3300000>;
  167. };
  168. };
  169. leds {
  170. compatible = "rohm,bd71828-leds";
  171. led-1 {
  172. rohm,led-compatible = "bd71828-grnled";
  173. function = LED_FUNCTION_INDICATOR;
  174. color = <LED_COLOR_ID_GREEN>;
  175. };
  176. led-2 {
  177. rohm,led-compatible = "bd71828-ambled";
  178. function = LED_FUNCTION_CHARGING;
  179. color = <LED_COLOR_ID_AMBER>;
  180. };
  181. };
  182. };
  183. };