qualcommax: use PHY regulator for USB GPIO

The PHY can handle turning off the GPIOs when turning off all USB ports.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17192
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rosen Penev 2024-12-03 13:40:28 -08:00 committed by Robert Marko
parent 502916468e
commit 1306237fab
4 changed files with 17 additions and 22 deletions

View File

@ -444,7 +444,6 @@ CONFIG_REGMAP_MMIO=y
CONFIG_REGULATOR=y CONFIG_REGULATOR=y
# CONFIG_REGULATOR_CPR3 is not set # CONFIG_REGULATOR_CPR3 is not set
CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_USERSPACE_CONSUMER=y
# CONFIG_REGULATOR_VQMMC_IPQ4019 is not set # CONFIG_REGULATOR_VQMMC_IPQ4019 is not set
CONFIG_RELOCATABLE=y CONFIG_RELOCATABLE=y
CONFIG_REMOTEPROC=y CONFIG_REMOTEPROC=y

View File

@ -123,11 +123,6 @@
gpio = <&tlmm 61 GPIO_ACTIVE_LOW>; gpio = <&tlmm 61 GPIO_ACTIVE_LOW>;
regulator-boot-on; regulator-boot-on;
}; };
output-usb0-power {
compatible = "regulator-output";
vout-supply = <&reg_usb_vbus>;
};
}; };
&tlmm { &tlmm {
@ -246,6 +241,8 @@
&qusb_phy_0 { &qusb_phy_0 {
status = "okay"; status = "okay";
vdd-supply = <&reg_usb_vbus>;
}; };
&ssphy_0 { &ssphy_0 {

View File

@ -57,12 +57,6 @@
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>; gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
}; };
usb-vbus {
gpio-export,name = "usb_vbus";
gpio-export,output = <0>;
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
};
}; };
keys { keys {
@ -160,6 +154,15 @@
gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>; gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>;
}; };
}; };
usb_vbus: regulator-usb-vbus {
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tlmm 9 GPIO_ACTIVE_LOW>;
regulator-boot-on;
};
}; };
&tlmm { &tlmm {
@ -221,6 +224,8 @@
&qusb_phy_1 { &qusb_phy_1 {
status = "okay"; status = "okay";
vdd-supply = <&usb_vbus>;
}; };
&ssphy_0 { &ssphy_0 {

View File

@ -160,16 +160,6 @@
enable-active-high; enable-active-high;
regulator-boot-on; regulator-boot-on;
}; };
output-usb0-power {
compatible = "regulator-output";
vout-supply = <&usb0_vbus>;
};
output-usb1-power {
compatible = "regulator-output";
vout-supply = <&usb1_vbus>;
};
}; };
&cpu0_thermal { &cpu0_thermal {
@ -374,6 +364,8 @@
&qusb_phy_0 { &qusb_phy_0 {
status = "okay"; status = "okay";
vdda-phy-supply = <&usb0_vbus>;
}; };
&ssphy_1 { &ssphy_1 {
@ -382,6 +374,8 @@
&qusb_phy_1 { &qusb_phy_1 {
status = "okay"; status = "okay";
vdda-phy-supply = <&usb1_vbus>;
}; };
&usb_0 { &usb_0 {