Linux 6.7-rc7
[linux-modified.git] / Documentation / devicetree / bindings / mfd / ti,tps6594.yaml
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/ti,tps6594.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: TI TPS6594 Power Management Integrated Circuit
8
9 maintainers:
10   - Julien Panis <jpanis@baylibre.com>
11
12 description:
13   TPS6594 is a Power Management IC which provides regulators and others
14   features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and
15   PFSM (Pre-configurable Finite State Machine) managing the state of the device.
16   TPS6594 is the super-set device while TPS6593 and LP8764 are derivatives.
17
18 properties:
19   compatible:
20     enum:
21       - ti,lp8764-q1
22       - ti,tps6593-q1
23       - ti,tps6594-q1
24
25   reg:
26     description: I2C slave address or SPI chip select number.
27     maxItems: 1
28
29   ti,primary-pmic:
30     type: boolean
31     description: |
32       Identify the primary PMIC on SPMI bus.
33       A multi-PMIC synchronization scheme is implemented in the PMIC device
34       to synchronize the power state changes with other PMIC devices. This is
35       accomplished through a SPMI bus: the primary PMIC is the controller
36       device on the SPMI bus, and the secondary PMICs are the target devices
37       on the SPMI bus.
38
39   system-power-controller: true
40
41   gpio-controller: true
42
43   '#gpio-cells':
44     const: 2
45     description: |
46       The first cell is the pin number, the second cell is used to specify flags.
47       See ../gpio/gpio.txt for more information.
48
49   interrupts:
50     maxItems: 1
51
52   regulators:
53     type: object
54     description: List of regulators provided by this controller.
55
56     patternProperties:
57       "^buck([1-5]|12|34|123|1234)$":
58         type: object
59         $ref: /schemas/regulator/regulator.yaml#
60
61         unevaluatedProperties: false
62
63       "^ldo[1-4]$":
64         type: object
65         $ref: /schemas/regulator/regulator.yaml#
66
67         unevaluatedProperties: false
68
69     allOf:
70       - if:
71           required:
72             - buck12
73         then:
74           properties:
75             buck123: false
76             buck1234: false
77       - if:
78           required:
79             - buck123
80         then:
81           properties:
82             buck34: false
83       - if:
84           required:
85             - buck1234
86         then:
87           properties:
88             buck34: false
89
90     additionalProperties: false
91
92 patternProperties:
93   "^buck([1-5]|12|34|123|1234)-supply$":
94     description: Input supply phandle for each buck.
95
96   "^ldo[1-4]-supply$":
97     description: Input supply phandle for each ldo.
98
99 required:
100   - compatible
101   - reg
102   - interrupts
103
104 additionalProperties: false
105
106 examples:
107   - |
108     #include <dt-bindings/interrupt-controller/arm-gic.h>
109     i2c {
110         #address-cells = <1>;
111         #size-cells = <0>;
112
113         tps6593: pmic@48 {
114             compatible = "ti,tps6593-q1";
115             reg = <0x48>;
116             ti,primary-pmic;
117             system-power-controller;
118
119             gpio-controller;
120             #gpio-cells = <2>;
121
122             pinctrl-names = "default";
123             pinctrl-0 = <&pmic_irq_pins_default>;
124             interrupt-parent = <&mcu_gpio0>;
125             interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
126
127             buck123-supply = <&vcc_3v3_sys>;
128             buck4-supply = <&vcc_3v3_sys>;
129             buck5-supply = <&vcc_3v3_sys>;
130             ldo1-supply = <&vcc_3v3_sys>;
131             ldo2-supply = <&vcc_3v3_sys>;
132             ldo3-supply = <&buck5>;
133             ldo4-supply = <&vcc_3v3_sys>;
134
135             regulators {
136                 buck123: buck123 {
137                     regulator-name = "vcc_core";
138                     regulator-min-microvolt = <750000>;
139                     regulator-max-microvolt = <850000>;
140                     regulator-boot-on;
141                     regulator-always-on;
142                 };
143
144                 buck4: buck4 {
145                     regulator-name = "vcc_1v1";
146                     regulator-min-microvolt = <1100000>;
147                     regulator-max-microvolt = <1100000>;
148                     regulator-boot-on;
149                     regulator-always-on;
150                 };
151
152                 buck5: buck5 {
153                     regulator-name = "vcc_1v8_sys";
154                     regulator-min-microvolt = <1800000>;
155                     regulator-max-microvolt = <1800000>;
156                     regulator-boot-on;
157                     regulator-always-on;
158                 };
159
160                 ldo1: ldo1 {
161                     regulator-name = "vddshv5_sdio";
162                     regulator-min-microvolt = <3300000>;
163                     regulator-max-microvolt = <3300000>;
164                     regulator-boot-on;
165                     regulator-always-on;
166                 };
167
168                 ldo2: ldo2 {
169                     regulator-name = "vpp_1v8";
170                     regulator-min-microvolt = <1800000>;
171                     regulator-max-microvolt = <1800000>;
172                     regulator-boot-on;
173                     regulator-always-on;
174                 };
175
176                 ldo3: ldo3 {
177                     regulator-name = "vcc_0v85";
178                     regulator-min-microvolt = <850000>;
179                     regulator-max-microvolt = <850000>;
180                     regulator-boot-on;
181                     regulator-always-on;
182                 };
183
184                 ldo4: ldo4 {
185                     regulator-name = "vdda_1v8";
186                     regulator-min-microvolt = <1800000>;
187                     regulator-max-microvolt = <1800000>;
188                     regulator-boot-on;
189                     regulator-always-on;
190                 };
191             };
192         };
193     };