xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/richtek,rt5120.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*7ef62cebSEmmanuel Vadot%YAML 1.2
3*7ef62cebSEmmanuel Vadot---
4*7ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/richtek,rt5120.yaml#
5*7ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*7ef62cebSEmmanuel Vadot
7*7ef62cebSEmmanuel Vadottitle: Richtek RT5120 PMIC
8*7ef62cebSEmmanuel Vadot
9*7ef62cebSEmmanuel Vadotmaintainers:
10*7ef62cebSEmmanuel Vadot  - ChiYuan Huang <cy_huang@richtek.com>
11*7ef62cebSEmmanuel Vadot
12*7ef62cebSEmmanuel Vadotdescription: |
13*7ef62cebSEmmanuel Vadot  The RT5120 provides four high-efficiency buck converters and one LDO voltage
14*7ef62cebSEmmanuel Vadot  regulator. The device is targeted at providingthe processor voltage, memory,
15*7ef62cebSEmmanuel Vadot  I/O, and peripheral rails in home entertainment devices. The I2C interface is
16*7ef62cebSEmmanuel Vadot  used for dynamic voltage scaling of the processor voltage, power rails on/off
17*7ef62cebSEmmanuel Vadot  sequence control, operation mode selection.
18*7ef62cebSEmmanuel Vadot
19*7ef62cebSEmmanuel Vadotproperties:
20*7ef62cebSEmmanuel Vadot  compatible:
21*7ef62cebSEmmanuel Vadot    enum:
22*7ef62cebSEmmanuel Vadot      - richtek,rt5120
23*7ef62cebSEmmanuel Vadot
24*7ef62cebSEmmanuel Vadot  reg:
25*7ef62cebSEmmanuel Vadot    maxItems: 1
26*7ef62cebSEmmanuel Vadot
27*7ef62cebSEmmanuel Vadot  interrupts:
28*7ef62cebSEmmanuel Vadot    maxItems: 1
29*7ef62cebSEmmanuel Vadot
30*7ef62cebSEmmanuel Vadot  interrupt-controller: true
31*7ef62cebSEmmanuel Vadot
32*7ef62cebSEmmanuel Vadot  "#interrupt-cells":
33*7ef62cebSEmmanuel Vadot    const: 1
34*7ef62cebSEmmanuel Vadot
35*7ef62cebSEmmanuel Vadot  wakeup-source: true
36*7ef62cebSEmmanuel Vadot
37*7ef62cebSEmmanuel Vadot  richtek,enable-undervolt-hiccup:
38*7ef62cebSEmmanuel Vadot    type: boolean
39*7ef62cebSEmmanuel Vadot    description: |
40*7ef62cebSEmmanuel Vadot      If used, under voltage protection trigger hiccup behavior, else latchup as
41*7ef62cebSEmmanuel Vadot      default
42*7ef62cebSEmmanuel Vadot
43*7ef62cebSEmmanuel Vadot  richtek,enable-overvolt-hiccup:
44*7ef62cebSEmmanuel Vadot    type: boolean
45*7ef62cebSEmmanuel Vadot    description:
46*7ef62cebSEmmanuel Vadot      Like as 'enable-uv-hiccup', it configures over voltage protection to
47*7ef62cebSEmmanuel Vadot      hiccup, else latchup as default
48*7ef62cebSEmmanuel Vadot
49*7ef62cebSEmmanuel Vadot  vin1-supply:
50*7ef62cebSEmmanuel Vadot    description: phandle for buck1 input power source
51*7ef62cebSEmmanuel Vadot
52*7ef62cebSEmmanuel Vadot  vin2-supply:
53*7ef62cebSEmmanuel Vadot    description: phandle for buck2 input power source
54*7ef62cebSEmmanuel Vadot
55*7ef62cebSEmmanuel Vadot  vin3-supply:
56*7ef62cebSEmmanuel Vadot    description: phandle for buck3 input power source
57*7ef62cebSEmmanuel Vadot
58*7ef62cebSEmmanuel Vadot  vin4-supply:
59*7ef62cebSEmmanuel Vadot    description: phandle for buck4 input power source
60*7ef62cebSEmmanuel Vadot
61*7ef62cebSEmmanuel Vadot  vinldo-supply:
62*7ef62cebSEmmanuel Vadot    description: phandle for ldo input power source
63*7ef62cebSEmmanuel Vadot
64*7ef62cebSEmmanuel Vadot  regulators:
65*7ef62cebSEmmanuel Vadot    type: object
66*7ef62cebSEmmanuel Vadot
67*7ef62cebSEmmanuel Vadot    patternProperties:
68*7ef62cebSEmmanuel Vadot      "^buck[1-4]$":
69*7ef62cebSEmmanuel Vadot        type: object
70*7ef62cebSEmmanuel Vadot        $ref: /schemas/regulator/regulator.yaml#
71*7ef62cebSEmmanuel Vadot        unevaluatedProperties: false
72*7ef62cebSEmmanuel Vadot
73*7ef62cebSEmmanuel Vadot        properties:
74*7ef62cebSEmmanuel Vadot          regulator-allowed-modes:
75*7ef62cebSEmmanuel Vadot            description: |
76*7ef62cebSEmmanuel Vadot              Used to specify the allowed buck converter operating mode
77*7ef62cebSEmmanuel Vadot              mode mapping:
78*7ef62cebSEmmanuel Vadot                0: auto mode
79*7ef62cebSEmmanuel Vadot                1: force pwm mode
80*7ef62cebSEmmanuel Vadot            items:
81*7ef62cebSEmmanuel Vadot              enum: [0, 1]
82*7ef62cebSEmmanuel Vadot
83*7ef62cebSEmmanuel Vadot      "^(ldo|exten)$":
84*7ef62cebSEmmanuel Vadot        type: object
85*7ef62cebSEmmanuel Vadot        $ref: /schemas/regulator/regulator.yaml#
86*7ef62cebSEmmanuel Vadot        unevaluatedProperties: false
87*7ef62cebSEmmanuel Vadot
88*7ef62cebSEmmanuel Vadot    additionalProperties: false
89*7ef62cebSEmmanuel Vadot
90*7ef62cebSEmmanuel Vadot  powerkey:
91*7ef62cebSEmmanuel Vadot    type: object
92*7ef62cebSEmmanuel Vadot    description:
93*7ef62cebSEmmanuel Vadot      PON key that connected to RT5120 PMIC.
94*7ef62cebSEmmanuel Vadot
95*7ef62cebSEmmanuel Vadot    properties:
96*7ef62cebSEmmanuel Vadot      compatible:
97*7ef62cebSEmmanuel Vadot        enum:
98*7ef62cebSEmmanuel Vadot          - richtek,rt5120-pwrkey
99*7ef62cebSEmmanuel Vadot
100*7ef62cebSEmmanuel Vadot    required:
101*7ef62cebSEmmanuel Vadot      - compatible
102*7ef62cebSEmmanuel Vadot
103*7ef62cebSEmmanuel Vadot    additionalProperties: false
104*7ef62cebSEmmanuel Vadot
105*7ef62cebSEmmanuel Vadotrequired:
106*7ef62cebSEmmanuel Vadot  - compatible
107*7ef62cebSEmmanuel Vadot  - reg
108*7ef62cebSEmmanuel Vadot  - interrupts
109*7ef62cebSEmmanuel Vadot  - '#interrupt-cells'
110*7ef62cebSEmmanuel Vadot  - interrupt-controller
111*7ef62cebSEmmanuel Vadot  - regulators
112*7ef62cebSEmmanuel Vadot  - powerkey
113*7ef62cebSEmmanuel Vadot
114*7ef62cebSEmmanuel VadotadditionalProperties: false
115*7ef62cebSEmmanuel Vadot
116*7ef62cebSEmmanuel Vadotexamples:
117*7ef62cebSEmmanuel Vadot  - |
118*7ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
119*7ef62cebSEmmanuel Vadot
120*7ef62cebSEmmanuel Vadot    i2c {
121*7ef62cebSEmmanuel Vadot      #address-cells = <1>;
122*7ef62cebSEmmanuel Vadot      #size-cells = <0>;
123*7ef62cebSEmmanuel Vadot
124*7ef62cebSEmmanuel Vadot      pmic@62 {
125*7ef62cebSEmmanuel Vadot        compatible = "richtek,rt5120";
126*7ef62cebSEmmanuel Vadot        reg = <0x62>;
127*7ef62cebSEmmanuel Vadot        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
128*7ef62cebSEmmanuel Vadot        interrupt-controller;
129*7ef62cebSEmmanuel Vadot        #interrupt-cells = <1>;
130*7ef62cebSEmmanuel Vadot        wakeup-source;
131*7ef62cebSEmmanuel Vadot
132*7ef62cebSEmmanuel Vadot        regulators {
133*7ef62cebSEmmanuel Vadot          buck1 {
134*7ef62cebSEmmanuel Vadot            regulator-name = "rt5120-buck1";
135*7ef62cebSEmmanuel Vadot            regulator-min-microvolt = <600000>;
136*7ef62cebSEmmanuel Vadot            regulator-max-microvolt = <1393750>;
137*7ef62cebSEmmanuel Vadot            regulator-allowed-modes = <0 1>;
138*7ef62cebSEmmanuel Vadot            regulator-boot-on;
139*7ef62cebSEmmanuel Vadot          };
140*7ef62cebSEmmanuel Vadot          buck2 {
141*7ef62cebSEmmanuel Vadot            regulator-name = "rt5120-buck2";
142*7ef62cebSEmmanuel Vadot            regulator-min-microvolt = <1100000>;
143*7ef62cebSEmmanuel Vadot            regulator-max-microvolt = <1100000>;
144*7ef62cebSEmmanuel Vadot            regulator-allowed-modes = <0 1>;
145*7ef62cebSEmmanuel Vadot            regulator-always-on;
146*7ef62cebSEmmanuel Vadot          };
147*7ef62cebSEmmanuel Vadot          buck3 {
148*7ef62cebSEmmanuel Vadot            regulator-name = "rt5120-buck3";
149*7ef62cebSEmmanuel Vadot            regulator-min-microvolt = <1800000>;
150*7ef62cebSEmmanuel Vadot            regulator-max-microvolt = <1800000>;
151*7ef62cebSEmmanuel Vadot            regulator-allowed-modes = <0 1>;
152*7ef62cebSEmmanuel Vadot            regulator-always-on;
153*7ef62cebSEmmanuel Vadot          };
154*7ef62cebSEmmanuel Vadot          buck4 {
155*7ef62cebSEmmanuel Vadot            regulator-name = "rt5120-buck4";
156*7ef62cebSEmmanuel Vadot            regulator-min-microvolt = <3300000>;
157*7ef62cebSEmmanuel Vadot            regulator-max-microvolt = <3300000>;
158*7ef62cebSEmmanuel Vadot            regulator-allowed-modes = <0 1>;
159*7ef62cebSEmmanuel Vadot            regulator-always-on;
160*7ef62cebSEmmanuel Vadot          };
161*7ef62cebSEmmanuel Vadot          ldo {
162*7ef62cebSEmmanuel Vadot            regulator-name = "rt5120-ldo";
163*7ef62cebSEmmanuel Vadot            regulator-min-microvolt = <1800000>;
164*7ef62cebSEmmanuel Vadot            regulator-max-microvolt = <1800000>;
165*7ef62cebSEmmanuel Vadot            regulator-always-on;
166*7ef62cebSEmmanuel Vadot          };
167*7ef62cebSEmmanuel Vadot          exten {
168*7ef62cebSEmmanuel Vadot            regulator-name = "rt5120-exten";
169*7ef62cebSEmmanuel Vadot            regulator-min-microvolt = <3000000>;
170*7ef62cebSEmmanuel Vadot            regulator-max-microvolt = <3000000>;
171*7ef62cebSEmmanuel Vadot            regulator-always-on;
172*7ef62cebSEmmanuel Vadot          };
173*7ef62cebSEmmanuel Vadot        };
174*7ef62cebSEmmanuel Vadot        powerkey {
175*7ef62cebSEmmanuel Vadot          compatible = "richtek,rt5120-pwrkey";
176*7ef62cebSEmmanuel Vadot        };
177*7ef62cebSEmmanuel Vadot      };
178*7ef62cebSEmmanuel Vadot    };
179