Skip to content

Commit d2b2613

Browse files
committed
regulator: mt6358: Remove bogus regulators and
Merge series from Chen-Yu Tsai <[email protected]>: This series is a cleanup and improvement of the MT6358 regulator driver. Various discrepancies were found while preparing to upstream MT8186 device trees, which utilize the MT6366 PMIC, that is also covered by this driver. Patches 1~8 should go through the regulator tree, and patch 9 through the soc tree. This series can be seen as two parts: Part 1 - Fixing bogus regulators (patches 1~4 and 9) There are some regulators listed in the bindings and driver that have no corresponding pin on the actual hardware. MediaTek says these are a hardware construct for shared control of the same regulator in the VCN33 case and an alternative control scheme for low power suspend. In the VCN33 case, there's only one actual regulator, so we merge the two and rename them to match the hardware pin. No existing devices use these AFAICT, so this should be safe to change. In the *_SSHUB case, the two extra regulators refer to alternative configuration registers of the same regulators. They are intended for the SoC's low power mode companion processor to use, not the main processor or OS. It should be left to the implementation to choose which set of registers to actually control. Part 2 - Code cleanup (patches 5 and 6) Various tables in the regulator driver were not constant, even though they are just lookup tables. With some reworking of the code, they are made constant. Also, some regulators that have a single linear range were using linear range helpers. This is more complicated than just declaring the range and step directly in the description. This is simplified to use the latter approach. Please have a look. After this series is done I'll send out patches for the MT6366 PMIC, which is what started this. That will also include updated YAML bindings for MT6366. I think we can merge MT6358 bindings into them afterwards. [1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
2 parents 2b026ea + ea861df commit d2b2613

File tree

3 files changed

+110
-155
lines changed

3 files changed

+110
-155
lines changed

Documentation/devicetree/bindings/regulator/mt6358-regulator.txt

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ Documentation/devicetree/bindings/regulator/regulator.txt.
88

99
The valid names for regulators are::
1010
BUCK:
11-
buck_vdram1, buck_vcore, buck_vcore_sshub, buck_vpa, buck_vproc11,
12-
buck_vproc12, buck_vgpu, buck_vs2, buck_vmodem, buck_vs1
11+
buck_vdram1, buck_vcore, buck_vpa, buck_vproc11, buck_vproc12, buck_vgpu,
12+
buck_vs2, buck_vmodem, buck_vs1
1313
LDO:
1414
ldo_vdram2, ldo_vsim1, ldo_vibr, ldo_vrf12, ldo_vio18, ldo_vusb, ldo_vcamio,
1515
ldo_vcamd, ldo_vcn18, ldo_vfe28, ldo_vsram_proc11, ldo_vcn28, ldo_vsram_others,
16-
ldo_vsram_others_sshub, ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18,
17-
ldo_vmch, ldo_vbif28, ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12,
18-
ldo_vrf18, ldo_vcn33_bt, ldo_vcn33_wifi, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28,
19-
ldo_vsim2
16+
ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18, ldo_vmch, ldo_vbif28,
17+
ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12, ldo_vrf18,
18+
ldo_vcn33, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28, ldo_vsim2
2019

2120
Example:
2221

@@ -305,15 +304,8 @@ Example:
305304
regulator-enable-ramp-delay = <120>;
306305
};
307306

308-
mt6358_vcn33_bt_reg: ldo_vcn33_bt {
309-
regulator-name = "vcn33_bt";
310-
regulator-min-microvolt = <3300000>;
311-
regulator-max-microvolt = <3500000>;
312-
regulator-enable-ramp-delay = <270>;
313-
};
314-
315-
mt6358_vcn33_wifi_reg: ldo_vcn33_wifi {
316-
regulator-name = "vcn33_wifi";
307+
mt6358_vcn33_reg: ldo_vcn33 {
308+
regulator-name = "vcn33";
317309
regulator-min-microvolt = <3300000>;
318310
regulator-max-microvolt = <3500000>;
319311
regulator-enable-ramp-delay = <270>;
@@ -354,17 +346,5 @@ Example:
354346
regulator-max-microvolt = <3100000>;
355347
regulator-enable-ramp-delay = <540>;
356348
};
357-
358-
mt6358_vcore_sshub_reg: buck_vcore_sshub {
359-
regulator-name = "vcore_sshub";
360-
regulator-min-microvolt = <500000>;
361-
regulator-max-microvolt = <1293750>;
362-
};
363-
364-
mt6358_vsram_others_sshub_reg: ldo_vsram_others_sshub {
365-
regulator-name = "vsram_others_sshub";
366-
regulator-min-microvolt = <500000>;
367-
regulator-max-microvolt = <1293750>;
368-
};
369349
};
370350
};

0 commit comments

Comments
 (0)