@@ -16,30 +16,18 @@ description:
1616
1717properties :
1818 compatible :
19- const : mediatek,mt6358-regulator
20-
21- ldo_vxo22 :
22- description : LDOs with fixed 2.2V output and 0~100/10mV tuning
23- type : object
24- $ref : regulator.yaml#
25- properties :
26- regulator-allowed-modes : false
27- unevaluatedProperties : false
28-
29- ldo_vusb :
30- description : LDOs with fixed 3.0V output and 0~100/10mV tuning
31- type : object
32- $ref : regulator.yaml#
33- properties :
34- regulator-allowed-modes : false
35- unevaluatedProperties : false
19+ oneOf :
20+ - const : mediatek,mt6358-regulator
21+ - items :
22+ - const : mediatek,mt6366-regulator
23+ - const : mediatek,mt6358-regulator
3624
3725 vsys-ldo1-supply :
3826 description : Supply for LDOs vfe28, vxo22, vcn28, vaux18, vaud28, vsim1, vusb, vbif28
3927 vsys-ldo2-supply :
40- description : Supply for LDOs vldo28, vio28, vmc, vmch, vsim2
28+ description : Supply for LDOs vldo28 (MT6358 only) , vio28, vmc, vmch, vsim2
4129 vsys-ldo3-supply :
42- description : Supply for LDOs vcn33, vcama1, vcama2 , vemc, vibr
30+ description : Supply for LDOs vcn33, vcama[12] (MT6358 only) , vemc, vibr
4331 vsys-vcore-supply :
4432 description : Supply for buck regulator vcore
4533 vsys-vdram1-supply :
@@ -59,18 +47,20 @@ properties:
5947 vsys-vs2-supply :
6048 description : Supply for buck regulator vs2
6149 vs1-ldo1-supply :
62- description : Supply for LDOs vrf18, vefuse, vcn18, vcamio, vio18
50+ description :
51+ Supply for LDOs vrf18, vefuse, vcn18, vcamio (MT6358 only), vio18, vm18 (MT6366 only)
6352 vs2-ldo1-supply :
64- description : Supply for LDOs vdram2
53+ description : Supply for LDOs vdram2, vmddr (MT6366 only)
6554 vs2-ldo2-supply :
6655 description : Supply for LDOs vrf12, va12
6756 vs2-ldo3-supply :
68- description : Supply for LDOs vsram-gpu, vsram-others, vsram-proc11, vsram-proc12
57+ description :
58+ Supply for LDOs vsram-core (MT6366 only), vsram-gpu, vsram-others, vsram-proc11, vsram-proc12
6959 vs2-ldo4-supply :
7060 description : Supply for LDO vcamd
7161
7262patternProperties :
73- " ^buck_v (core|dram1|gpu|modem|pa|proc1[12]|s[12])$ " :
63+ " ^(buck_)?v (core|dram1|gpu|modem|pa|proc1[12]|s[12])$ " :
7464 description : Buck regulators
7565 type : object
7666 $ref : regulator.yaml#
@@ -85,39 +75,56 @@ patternProperties:
8575 enum : [0, 1]
8676 unevaluatedProperties : false
8777
88- " ^ldo_v (a|rf)12$ " :
78+ " ^(ldo_)?v (a|rf)12$ " :
8979 description : LDOs with fixed 1.2V output and 0~100/10mV tuning
9080 type : object
9181 $ref : regulator.yaml#
9282 properties :
9383 regulator-allowed-modes : false
9484 unevaluatedProperties : false
9585
96- " ^ldo_v((aux|cn|io|rf)18|camio)$ " :
97- description : LDOs with fixed 1.8V output and 0~100/10mV tuning
86+ " ^(ldo_)?v((aux|cn|io|rf)18|camio)$ " :
87+ description :
88+ LDOs with fixed 1.8V output and 0~100/10mV tuning (vcn18 on MT6366 has variable output)
89+ type : object
90+ $ref : regulator.yaml#
91+ properties :
92+ regulator-allowed-modes : false
93+ unevaluatedProperties : false
94+
95+ " ^(ldo_)?vxo22$ " :
96+ description : LDOs with fixed 2.2V output and 0~100/10mV tuning
9897 type : object
9998 $ref : regulator.yaml#
10099 properties :
101100 regulator-allowed-modes : false
102101 unevaluatedProperties : false
103102
104- " ^ldo_v (aud|bif|cn|fe|io)28$ " :
103+ " ^(ldo_)?v (aud|bif|cn|fe|io)28$ " :
105104 description : LDOs with fixed 2.8V output and 0~100/10mV tuning
106105 type : object
107106 $ref : regulator.yaml#
108107 properties :
109108 regulator-allowed-modes : false
110109 unevaluatedProperties : false
111110
112- " ^ldo_vsram_(gpu|others|proc1[12])$ " :
111+ " ^(ldo_)?vusb$ " :
112+ description : LDOs with fixed 3.0V output and 0~100/10mV tuning
113+ type : object
114+ $ref : regulator.yaml#
115+ properties :
116+ regulator-allowed-modes : false
117+ unevaluatedProperties : false
118+
119+ " ^(ldo_)?vsram[_-](core|gpu|others|proc1[12])$ " :
113120 description : LDOs with variable output
114121 type : object
115122 $ref : regulator.yaml#
116123 properties :
117124 regulator-allowed-modes : false
118125 unevaluatedProperties : false
119126
120- " ^ldo_v( cama[12]|camd|cn33|dram2|efuse|emc|ibr|ldo28|mc|mch|sim[12])$ " :
127+ " ^(ldo_)?v( cama[12]|camd|cn33|dram2|efuse|emc|ibr|ldo28|m18| mc|mch|mddr |sim[12])$ " :
121128 description : LDOs with variable output and 0~100/10mV tuning
122129 type : object
123130 $ref : regulator.yaml#
@@ -130,6 +137,45 @@ required:
130137
131138additionalProperties : false
132139
140+ allOf :
141+ - if :
142+ properties :
143+ compatible :
144+ const : mediatek,mt6358-regulator
145+ then :
146+ patternProperties :
147+ # Old regulator node name scheme (with prefix and underscores) only
148+ # ([^y-] is used to avoid matching -supply
149+ " ^(?<!buck_)(?<!ldo_)v.*[^y-](?!-supply)$ " : false
150+ " ^ldo_vsram- " : false
151+ # vsram_core regulator doesn't exist on MT6358
152+ " ^ldo_vsram[-_]core$ " : false
153+
154+ properties :
155+ # vm18 and vmddr regulators don't exist on MT6358
156+ ldo_vm18 : false
157+ ldo_vmddr : false
158+
159+ - if :
160+ properties :
161+ compatible :
162+ contains :
163+ const : mediatek,mt6366-regulator
164+ then :
165+ patternProperties :
166+ # Prefer cleaned up regulator node names
167+ " ^(buck|ldo)_ " : false
168+ # Don't allow underscores
169+ " ^vsram_ " : false
170+ # vcam* regulators don't exist on MT6366
171+ " ^vcam " : false
172+
173+ properties :
174+ # vldo28 regulator doesn't exist on MT6366
175+ vldo28 : false
176+ # vs2_ldo4 supply pin doesn't exist on MT6366
177+ vs2-ldo4-supply : false
178+
133179examples :
134180 - |
135181 #include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
@@ -156,4 +202,49 @@ examples:
156202 };
157203 };
158204
205+ - |
206+ #include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
207+
208+ regulator {
209+ compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator";
210+
211+ vdram1 {
212+ regulator-name = "pp1125_emi_vdd2";
213+ regulator-min-microvolt = <1125000>;
214+ regulator-max-microvolt = <1125000>;
215+ regulator-ramp-delay = <12500>;
216+ regulator-enable-ramp-delay = <0>;
217+ regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
218+ MT6397_BUCK_MODE_FORCE_PWM>;
219+ regulator-always-on;
220+ };
221+
222+ vproc11 {
223+ regulator-name = "ppvar_dvdd_proc_bc_mt6366";
224+ regulator-min-microvolt = <600000>;
225+ regulator-max-microvolt = <1200000>;
226+ regulator-ramp-delay = <6250>;
227+ regulator-enable-ramp-delay = <200>;
228+ regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
229+ MT6397_BUCK_MODE_FORCE_PWM>;
230+ regulator-always-on;
231+ };
232+
233+ vmddr {
234+ regulator-name = "pm0750_emi_vmddr";
235+ regulator-min-microvolt = <700000>;
236+ regulator-max-microvolt = <750000>;
237+ regulator-enable-ramp-delay = <325>;
238+ regulator-always-on;
239+ };
240+
241+ vsram-proc11 {
242+ regulator-name = "pp0900_dvdd_sram_bc";
243+ regulator-min-microvolt = <850000>;
244+ regulator-max-microvolt = <1120000>;
245+ regulator-ramp-delay = <6250>;
246+ regulator-enable-ramp-delay = <240>;
247+ regulator-always-on;
248+ };
249+ };
159250 ...
0 commit comments