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