ramips: mt7621: convert usb power to regulators

These things are regulators. Should silence dmesg messages about using
dummy regulators.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16804
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rosen Penev 2024-10-24 14:51:29 -07:00 committed by Robert Marko
parent ef4df2b5e9
commit e612900ae0
7 changed files with 86 additions and 52 deletions

View File

@ -80,15 +80,13 @@
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
power_usb3 {
gpio-export,name = "power_usb3";
gpio-export,output = <1>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
reg_power_usb3: regulator {
compatible = "regulator-fixed";
regulator-name = "power_usb3";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
@ -155,6 +153,10 @@
};
};
&xhci {
vbus-supply = <&reg_power_usb3>;
};
&pcie {
status = "okay";
};

View File

@ -19,16 +19,6 @@
label-mac-device = &gmac1;
};
gpio-export {
compatible = "gpio-export";
gpio-usb-power {
gpio-export,name = "power:usb";
gpio-export,output = <1>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
};
leds {
compatible = "gpio-leds";
@ -65,6 +55,15 @@
linux,code = <KEY_RESTART>;
};
};
reg_power_usb: regulator {
compatible = "regulator-fixed";
regulator-name = "power:usb";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&spi0 {
@ -131,6 +130,10 @@
};
};
&xhci {
vbus-supply = <&reg_power_usb>;
};
&pcie {
status = "okay";
};

View File

@ -13,13 +13,20 @@
gpio-export,output = <0>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
usb_power {
gpio-export,name = "usb_power";
gpio-export,output = <1>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
};
reg_usb_power: regulator {
compatible = "regulator-fixed";
regulator-name = "usb_power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&xhci {
vbus-supply = <&reg_usb_power>;
};
&keys {

View File

@ -48,6 +48,15 @@
};
};
reg_power_usb: regulator {
compatible = "regulator-fixed";
regulator-name = "power_usb";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
@ -72,15 +81,13 @@
gpio-export,output = <1>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
ext-usb {
gpio-export,name = "ext-usb";
gpio-export,output = <1>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
};
};
&xhci {
vbus-supply = <&reg_power_usb>;
};
&sdhci {
status = "okay";
};

View File

@ -47,6 +47,15 @@
};
};
reg_power_usb: regulator {
compatible = "regulator-fixed";
regulator-name = "power_usb";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
@ -71,15 +80,13 @@
gpio-export,output = <1>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
ext-usb {
gpio-export,name = "ext-usb";
gpio-export,output = <1>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
};
};
&xhci {
vbus-supply = <&reg_power_usb>;
};
&sdhci {
status = "okay";
};

View File

@ -96,17 +96,18 @@
};
reg_power_usb: regulator {
compatible = "regulator-fixed";
regulator-name = "power_usb";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&gpio {
status = "okay";
enable_usb_power {
gpio-hog;
line-name = "enable USB power";
gpios = <7 GPIO_ACTIVE_HIGH>;
output-high;
};
&xhci {
vbus-supply = <&reg_power_usb>;
};
&nand {

View File

@ -92,13 +92,20 @@
gpio-export,output = <0>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
usb_power {
gpio-export,name = "usb_power";
gpio-export,output = <1>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
};
reg_usb_power: regulator {
compatible = "regulator-fixed";
reglator-name = "usb_power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&xhci {
vbus-supply = <&reg_usb_power>;
};
&nand {