xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/mediatek,mt6360.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1*d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*d5b0e70fSEmmanuel Vadot%YAML 1.2
3*d5b0e70fSEmmanuel Vadot---
4*d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/mediatek,mt6360.yaml#
5*d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*d5b0e70fSEmmanuel Vadot
7*d5b0e70fSEmmanuel Vadottitle: MT6360 PMIC from MediaTek Integrated
8*d5b0e70fSEmmanuel Vadot
9*d5b0e70fSEmmanuel Vadotmaintainers:
10*d5b0e70fSEmmanuel Vadot  - Gene Chen <gene_chen@richtek.com>
11*d5b0e70fSEmmanuel Vadot
12*d5b0e70fSEmmanuel Vadotdescription: |
13*d5b0e70fSEmmanuel Vadot  MT6360 is a PMIC device with the following sub modules.
14*d5b0e70fSEmmanuel Vadot  It is interfaced to host controller using I2C interface.
15*d5b0e70fSEmmanuel Vadot
16*d5b0e70fSEmmanuel Vadot  This document describes the binding for PMIC device and its sub module.
17*d5b0e70fSEmmanuel Vadot
18*d5b0e70fSEmmanuel Vadotproperties:
19*d5b0e70fSEmmanuel Vadot  compatible:
20*d5b0e70fSEmmanuel Vadot    const: mediatek,mt6360
21*d5b0e70fSEmmanuel Vadot
22*d5b0e70fSEmmanuel Vadot  reg:
23*d5b0e70fSEmmanuel Vadot    maxItems: 1
24*d5b0e70fSEmmanuel Vadot
25*d5b0e70fSEmmanuel Vadot  wakeup-source: true
26*d5b0e70fSEmmanuel Vadot
27*d5b0e70fSEmmanuel Vadot  interrupts:
28*d5b0e70fSEmmanuel Vadot    maxItems: 1
29*d5b0e70fSEmmanuel Vadot
30*d5b0e70fSEmmanuel Vadot  interrupt-names:
31*d5b0e70fSEmmanuel Vadot    const: IRQB
32*d5b0e70fSEmmanuel Vadot
33*d5b0e70fSEmmanuel Vadot  interrupt-controller: true
34*d5b0e70fSEmmanuel Vadot
35*d5b0e70fSEmmanuel Vadot  "#interrupt-cells":
36*d5b0e70fSEmmanuel Vadot    const: 1
37*d5b0e70fSEmmanuel Vadot    description:
38*d5b0e70fSEmmanuel Vadot      The first cell is the IRQ number.
39*d5b0e70fSEmmanuel Vadot
40*d5b0e70fSEmmanuel Vadot  regulators:
41*d5b0e70fSEmmanuel Vadot    $ref: /schemas/regulator/mt6360-regulator.yaml#
42*d5b0e70fSEmmanuel Vadot
43*d5b0e70fSEmmanuel Vadot  charger:
44*d5b0e70fSEmmanuel Vadot    $ref: /schemas/power/supply/mt6360_charger.yaml#
45*d5b0e70fSEmmanuel Vadot
46*d5b0e70fSEmmanuel Vadot  tcpc:
47*d5b0e70fSEmmanuel Vadot    $ref: /schemas/usb/mediatek,mt6360-tcpc.yaml#
48*d5b0e70fSEmmanuel Vadot
49*d5b0e70fSEmmanuel Vadot  led-controller:
50*d5b0e70fSEmmanuel Vadot    $ref: /schemas/leds/leds-mt6360.yaml#
51*d5b0e70fSEmmanuel Vadot
52*d5b0e70fSEmmanuel Vadotrequired:
53*d5b0e70fSEmmanuel Vadot  - compatible
54*d5b0e70fSEmmanuel Vadot  - reg
55*d5b0e70fSEmmanuel Vadot  - interrupts
56*d5b0e70fSEmmanuel Vadot  - interrupt-controller
57*d5b0e70fSEmmanuel Vadot  - "#interrupt-cells"
58*d5b0e70fSEmmanuel Vadot
59*d5b0e70fSEmmanuel VadotadditionalProperties:
60*d5b0e70fSEmmanuel Vadot  type: object
61*d5b0e70fSEmmanuel Vadot
62*d5b0e70fSEmmanuel Vadotexamples:
63*d5b0e70fSEmmanuel Vadot  - |
64*d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
65*d5b0e70fSEmmanuel Vadot    #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
66*d5b0e70fSEmmanuel Vadot    #include <dt-bindings/leds/common.h>
67*d5b0e70fSEmmanuel Vadot    #include <dt-bindings/usb/pd.h>
68*d5b0e70fSEmmanuel Vadot    i2c {
69*d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
70*d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
71*d5b0e70fSEmmanuel Vadot
72*d5b0e70fSEmmanuel Vadot        pmic@34 {
73*d5b0e70fSEmmanuel Vadot            compatible = "mediatek,mt6360";
74*d5b0e70fSEmmanuel Vadot            reg = <0x34>;
75*d5b0e70fSEmmanuel Vadot            wakeup-source;
76*d5b0e70fSEmmanuel Vadot            interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
77*d5b0e70fSEmmanuel Vadot            interrupt-names = "IRQB";
78*d5b0e70fSEmmanuel Vadot            interrupt-controller;
79*d5b0e70fSEmmanuel Vadot            #interrupt-cells = <1>;
80*d5b0e70fSEmmanuel Vadot
81*d5b0e70fSEmmanuel Vadot            mt6360_charger: charger {
82*d5b0e70fSEmmanuel Vadot                compatible = "mediatek,mt6360-chg";
83*d5b0e70fSEmmanuel Vadot                richtek,vinovp-microvolt = <14500000>;
84*d5b0e70fSEmmanuel Vadot
85*d5b0e70fSEmmanuel Vadot                otg_vbus_regulator: usb-otg-vbus-regulator {
86*d5b0e70fSEmmanuel Vadot                    regulator-name = "usb-otg-vbus";
87*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <4425000>;
88*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <5825000>;
89*d5b0e70fSEmmanuel Vadot                };
90*d5b0e70fSEmmanuel Vadot            };
91*d5b0e70fSEmmanuel Vadot
92*d5b0e70fSEmmanuel Vadot            led-controller {
93*d5b0e70fSEmmanuel Vadot                compatible = "mediatek,mt6360-led";
94*d5b0e70fSEmmanuel Vadot                #address-cells = <1>;
95*d5b0e70fSEmmanuel Vadot                #size-cells = <0>;
96*d5b0e70fSEmmanuel Vadot
97*d5b0e70fSEmmanuel Vadot                multi-led@0 {
98*d5b0e70fSEmmanuel Vadot                    reg = <0>;
99*d5b0e70fSEmmanuel Vadot                    function = LED_FUNCTION_INDICATOR;
100*d5b0e70fSEmmanuel Vadot                    color = <LED_COLOR_ID_RGB>;
101*d5b0e70fSEmmanuel Vadot                    led-max-microamp = <24000>;
102*d5b0e70fSEmmanuel Vadot                    #address-cells = <1>;
103*d5b0e70fSEmmanuel Vadot                    #size-cells = <0>;
104*d5b0e70fSEmmanuel Vadot                    led@0 {
105*d5b0e70fSEmmanuel Vadot                        reg = <0>;
106*d5b0e70fSEmmanuel Vadot                        color = <LED_COLOR_ID_RED>;
107*d5b0e70fSEmmanuel Vadot                    };
108*d5b0e70fSEmmanuel Vadot                    led@1 {
109*d5b0e70fSEmmanuel Vadot                        reg = <1>;
110*d5b0e70fSEmmanuel Vadot                        color = <LED_COLOR_ID_GREEN>;
111*d5b0e70fSEmmanuel Vadot                    };
112*d5b0e70fSEmmanuel Vadot                    led@2 {
113*d5b0e70fSEmmanuel Vadot                        reg = <2>;
114*d5b0e70fSEmmanuel Vadot                        color = <LED_COLOR_ID_BLUE>;
115*d5b0e70fSEmmanuel Vadot                    };
116*d5b0e70fSEmmanuel Vadot                };
117*d5b0e70fSEmmanuel Vadot                led@3 {
118*d5b0e70fSEmmanuel Vadot                    reg = <3>;
119*d5b0e70fSEmmanuel Vadot                    function = LED_FUNCTION_INDICATOR;
120*d5b0e70fSEmmanuel Vadot                    color = <LED_COLOR_ID_WHITE>;
121*d5b0e70fSEmmanuel Vadot                    led-max-microamp = <150000>;
122*d5b0e70fSEmmanuel Vadot                };
123*d5b0e70fSEmmanuel Vadot                led@4 {
124*d5b0e70fSEmmanuel Vadot                    reg = <4>;
125*d5b0e70fSEmmanuel Vadot                    function = LED_FUNCTION_FLASH;
126*d5b0e70fSEmmanuel Vadot                    color = <LED_COLOR_ID_WHITE>;
127*d5b0e70fSEmmanuel Vadot                    function-enumerator = <1>;
128*d5b0e70fSEmmanuel Vadot                    led-max-microamp = <200000>;
129*d5b0e70fSEmmanuel Vadot                    flash-max-microamp = <500000>;
130*d5b0e70fSEmmanuel Vadot                    flash-max-timeout-us = <1024000>;
131*d5b0e70fSEmmanuel Vadot                };
132*d5b0e70fSEmmanuel Vadot                led@5 {
133*d5b0e70fSEmmanuel Vadot                    reg = <5>;
134*d5b0e70fSEmmanuel Vadot                    function = LED_FUNCTION_FLASH;
135*d5b0e70fSEmmanuel Vadot                    color = <LED_COLOR_ID_WHITE>;
136*d5b0e70fSEmmanuel Vadot                    function-enumerator = <2>;
137*d5b0e70fSEmmanuel Vadot                    led-max-microamp = <200000>;
138*d5b0e70fSEmmanuel Vadot                    flash-max-microamp = <500000>;
139*d5b0e70fSEmmanuel Vadot                    flash-max-timeout-us = <1024000>;
140*d5b0e70fSEmmanuel Vadot                };
141*d5b0e70fSEmmanuel Vadot            };
142*d5b0e70fSEmmanuel Vadot
143*d5b0e70fSEmmanuel Vadot            regulators {
144*d5b0e70fSEmmanuel Vadot                compatible = "mediatek,mt6360-regulator";
145*d5b0e70fSEmmanuel Vadot                LDO_VIN3-supply = <&BUCK2>;
146*d5b0e70fSEmmanuel Vadot                buck1 {
147*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,buck1";
148*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <300000>;
149*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <1300000>;
150*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
151*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP
152*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_ULP>;
153*d5b0e70fSEmmanuel Vadot                };
154*d5b0e70fSEmmanuel Vadot                BUCK2: buck2 {
155*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,buck2";
156*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <300000>;
157*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <1300000>;
158*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
159*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP
160*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_ULP>;
161*d5b0e70fSEmmanuel Vadot                };
162*d5b0e70fSEmmanuel Vadot                ldo6 {
163*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,ldo6";
164*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <500000>;
165*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <2100000>;
166*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
167*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP>;
168*d5b0e70fSEmmanuel Vadot                };
169*d5b0e70fSEmmanuel Vadot                ldo7 {
170*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,ldo7";
171*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <500000>;
172*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <2100000>;
173*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
174*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP>;
175*d5b0e70fSEmmanuel Vadot                };
176*d5b0e70fSEmmanuel Vadot                ldo1 {
177*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,ldo1";
178*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <1200000>;
179*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <3600000>;
180*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
181*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP>;
182*d5b0e70fSEmmanuel Vadot                };
183*d5b0e70fSEmmanuel Vadot                ldo2 {
184*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,ldo2";
185*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <1200000>;
186*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <3600000>;
187*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
188*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP>;
189*d5b0e70fSEmmanuel Vadot                };
190*d5b0e70fSEmmanuel Vadot                ldo3 {
191*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,ldo3";
192*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <1200000>;
193*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <3600000>;
194*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
195*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP>;
196*d5b0e70fSEmmanuel Vadot                };
197*d5b0e70fSEmmanuel Vadot                ldo5 {
198*d5b0e70fSEmmanuel Vadot                    regulator-name = "mt6360,ldo5";
199*d5b0e70fSEmmanuel Vadot                    regulator-min-microvolt = <2700000>;
200*d5b0e70fSEmmanuel Vadot                    regulator-max-microvolt = <3600000>;
201*d5b0e70fSEmmanuel Vadot                    regulator-allowed-modes = <MT6360_OPMODE_NORMAL
202*d5b0e70fSEmmanuel Vadot                         MT6360_OPMODE_LP>;
203*d5b0e70fSEmmanuel Vadot                };
204*d5b0e70fSEmmanuel Vadot            };
205*d5b0e70fSEmmanuel Vadot
206*d5b0e70fSEmmanuel Vadot            tcpc {
207*d5b0e70fSEmmanuel Vadot                compatible = "mediatek,mt6360-tcpc";
208*d5b0e70fSEmmanuel Vadot                interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
209*d5b0e70fSEmmanuel Vadot                interrupt-names = "PD_IRQB";
210*d5b0e70fSEmmanuel Vadot
211*d5b0e70fSEmmanuel Vadot                connector {
212*d5b0e70fSEmmanuel Vadot                    compatible = "usb-c-connector";
213*d5b0e70fSEmmanuel Vadot                    label = "USB-C";
214*d5b0e70fSEmmanuel Vadot                    data-role = "dual";
215*d5b0e70fSEmmanuel Vadot                    power-role = "dual";
216*d5b0e70fSEmmanuel Vadot                    try-power-role = "sink";
217*d5b0e70fSEmmanuel Vadot                    source-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
218*d5b0e70fSEmmanuel Vadot                    sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
219*d5b0e70fSEmmanuel Vadot                    op-sink-microwatt = <10000000>;
220*d5b0e70fSEmmanuel Vadot
221*d5b0e70fSEmmanuel Vadot                    ports {
222*d5b0e70fSEmmanuel Vadot                        #address-cells = <1>;
223*d5b0e70fSEmmanuel Vadot                        #size-cells = <0>;
224*d5b0e70fSEmmanuel Vadot
225*d5b0e70fSEmmanuel Vadot                        port@0 {
226*d5b0e70fSEmmanuel Vadot                            reg = <0>;
227*d5b0e70fSEmmanuel Vadot                            endpoint {
228*d5b0e70fSEmmanuel Vadot                                remote-endpoint = <&usb_hs>;
229*d5b0e70fSEmmanuel Vadot                            };
230*d5b0e70fSEmmanuel Vadot                        };
231*d5b0e70fSEmmanuel Vadot                        port@1 {
232*d5b0e70fSEmmanuel Vadot                            reg = <1>;
233*d5b0e70fSEmmanuel Vadot                            endpoint {
234*d5b0e70fSEmmanuel Vadot                                remote-endpoint = <&usb_ss>;
235*d5b0e70fSEmmanuel Vadot                          };
236*d5b0e70fSEmmanuel Vadot                        };
237*d5b0e70fSEmmanuel Vadot                        port@2 {
238*d5b0e70fSEmmanuel Vadot                            reg = <2>;
239*d5b0e70fSEmmanuel Vadot                            endpoint {
240*d5b0e70fSEmmanuel Vadot                                remote-endpoint = <&dp_aux>;
241*d5b0e70fSEmmanuel Vadot                            };
242*d5b0e70fSEmmanuel Vadot                        };
243*d5b0e70fSEmmanuel Vadot                    };
244*d5b0e70fSEmmanuel Vadot                };
245*d5b0e70fSEmmanuel Vadot            };
246*d5b0e70fSEmmanuel Vadot        };
247*d5b0e70fSEmmanuel Vadot    };
248