]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: dts: adjust the power regulators of MMC controller 18886/head
authorShiji Yang <yangshiji66@outlook.com>
Mon, 19 May 2025 23:50:56 +0000 (07:50 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 7 Jun 2025 18:28:11 +0000 (20:28 +0200)
- Fix MMC bus IO voltage. The GPIO voltage of mt762x series SoCs
  is fixed 3.3V. There are no visible registers that can control
  the voltage level. Also add "no-1-8-v" property to indicate that
  MMC controller doesn't support 1.8V IO.

- Drop useless property "enable-active-high". These dummy fixed
  voltage regulators are not controlled by the GPIO. We don't need
  to set the GPIO polarity.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/dts/mt7620a.dtsi
target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
target/linux/ramips/dts/mt7621.dtsi
target/linux/ramips/dts/mt7628an.dtsi

index 0555674802c0a3b710f6d044e804edb11ce0117d..7542d43bae08c4ae0c114740c5e921905cb00a94 100644 (file)
                compatible = "mti,cpu-interrupt-controller";
        };
 
-       mmc_reg_1v8: regulator-1v8 {
+       reg_vmmc: regulator-vmmc {
                compatible = "regulator-fixed";
-
-               enable-active-high;
-
                regulator-always-on;
-               regulator-max-microvolt = <1800000>;
-               regulator-min-microvolt = <1800000>;
-               regulator-name = "mmc_io";
+               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <3300000>;
+               regulator-name = "mmc_power";
        };
 
-       mmc_reg_3v3: regulator-3v3 {
+       reg_vqmmc: regulator-vqmmc {
                compatible = "regulator-fixed";
-
-               enable-active-high;
-
                regulator-always-on;
                regulator-max-microvolt = <3300000>;
                regulator-min-microvolt = <3300000>;
-               regulator-name = "mmc_power";
+               regulator-name = "mmc_io";
        };
 
        palmbus: palmbus@10000000 {
                reg = <0x10130000 0x4000>;
 
                bus-width = <4>;
-
+               max-frequency = <24000000>;
                cap-mmc-highspeed;
                cap-sd-highspeed;
+               disable-wp;
+               no-1-8-v;
 
                clocks = <&sysc 15>, <&sysc 15>;
                clock-names = "source", "hclk";
 
-               disable-wp;
-
                interrupt-parent = <&intc>;
                interrupts = <14>;
 
-               max-frequency = <24000000>;
-
                pinctrl-names = "default", "state_uhs";
                pinctrl-0 = <&sdhci_pins>;
                pinctrl-1 = <&sdhci_pins>;
                resets = <&sysc 30>;
                reset-names = "hrst";
 
-               vmmc-supply = <&mmc_reg_3v3>;
-               vqmmc-supply = <&mmc_reg_1v8>;
+               vmmc-supply = <&reg_vmmc>;
+               vqmmc-supply = <&reg_vqmmc>;
 
                status = "disabled";
        };
index dacd5f27de2689f4a038685e535b7191b318ad44..fcd40402921a03542b12d2604460582ce2f5ddad 100644 (file)
        mediatek,ephy-base = /bits/ 8 <12>;
 };
 
-&mmc_reg_3v3 {
-       /delete-property/ enable-active-high;
-
-       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
-};
-
 &pcie {
        status = "okay";
 };
        };
 };
 
+&reg_vmmc {
+       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+};
+
 &wmac {
        pinctrl-names = "default", "pa_gpio";
        pinctrl-0 = <&pa_pins>;
index 711f84689faa14518942a93b45f158f1af98c06d..0031f74c7520e156864fb43c87140b7abfcb14b6 100644 (file)
                bootargs = "console=ttyS0,57600";
        };
 
-       mmc_reg_1v8: regulator-1v8 {
+       reg_vmmc: regulator-vmmc {
                compatible = "regulator-fixed";
-
-               enable-active-high;
-
                regulator-always-on;
-               regulator-max-microvolt = <1800000>;
-               regulator-min-microvolt = <1800000>;
-               regulator-name = "mmc_io";
+               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <3300000>;
+               regulator-name = "mmc_power";
        };
 
-       mmc_reg_3v3: regulator-3v3 {
+       reg_vqmmc: regulator-vqmmc {
                compatible = "regulator-fixed";
-
-               enable-active-high;
-
                regulator-always-on;
                regulator-max-microvolt = <3300000>;
                regulator-min-microvolt = <3300000>;
-               regulator-name = "mmc_power";
+               regulator-name = "mmc_io";
        };
 
        reg_vbus: regulator-vbus {
                reg = <0x1e130000 0x4000>;
 
                bus-width = <4>;
-
+               max-frequency = <48000000>;
                cap-mmc-highspeed;
                cap-sd-highspeed;
+               disable-wp;
+               no-1-8-v;
 
                clocks = <&sysc MT7621_CLK_SHXC>, <&sysc MT7621_CLK_SHXC>;
                clock-names = "source", "hclk";
 
-               disable-wp;
-
                interrupt-parent = <&gic>;
                interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
 
-               max-frequency = <48000000>;
-
                pinctrl-names = "default", "state_uhs";
                pinctrl-0 = <&sdhci_pins>;
                pinctrl-1 = <&sdhci_pins>;
                resets = <&sysc MT7621_RST_SDXC>;
                reset-names = "hrst";
 
-               vmmc-supply = <&mmc_reg_3v3>;
-               vqmmc-supply = <&mmc_reg_1v8>;
+               vmmc-supply = <&reg_vmmc>;
+               vqmmc-supply = <&reg_vqmmc>;
 
                status = "disabled";
        };
index 79763332b8bf589da568812096745e97b1567450..e705d46b1e5092ce931dd2e05139ef5cdfd3ffca 100644 (file)
                compatible = "mti,cpu-interrupt-controller";
        };
 
-       mmc_reg_1v8: regulator-1v8 {
+       reg_vmmc: regulator-vmmc {
                compatible = "regulator-fixed";
-
-               enable-active-high;
-
                regulator-always-on;
-               regulator-max-microvolt = <1800000>;
-               regulator-min-microvolt = <1800000>;
-               regulator-name = "mmc_io";
+               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <3300000>;
+               regulator-name = "mmc_power";
        };
 
-       mmc_reg_3v3: regulator-3v3 {
+       reg_vqmmc: regulator-vqmmc {
                compatible = "regulator-fixed";
-
-               enable-active-high;
-
                regulator-always-on;
                regulator-max-microvolt = <3300000>;
                regulator-min-microvolt = <3300000>;
-               regulator-name = "mmc_power";
+               regulator-name = "mmc_io";
        };
 
        palmbus: palmbus@10000000 {
                reg = <0x10130000 0x4000>;
 
                bus-width = <4>;
-
+               max-frequency = <24000000>;
                cap-mmc-highspeed;
                cap-sd-highspeed;
+               disable-wp;
+               no-1-8-v;
 
                clocks = <&sysc 16>, <&sysc 16>;
                clock-names = "source", "hclk";
 
-               disable-wp;
-
                interrupt-parent = <&intc>;
                interrupts = <14>;
 
-               max-frequency = <24000000>;
-
                pinctrl-names = "default", "state_uhs";
                pinctrl-0 = <&sdxc_pins>;
                pinctrl-1 = <&sdxc_pins>;
                resets = <&sysc 30>;
                reset-names = "hrst";
 
-               vmmc-supply = <&mmc_reg_3v3>;
-               vqmmc-supply = <&mmc_reg_1v8>;
+               vmmc-supply = <&reg_vmmc>;
+               vqmmc-supply = <&reg_vqmmc>;
 
                status = "disabled";
        };