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