[PATCHv3 1/6] ARM: dts: meson8b: odroidc1: Add usb phy power node

From: Anand Moon
Date: Tue Aug 17 2021 - 00:17:38 EST


Add missing usb phy power node for usb node fix below warning.
P5V0 regulator supply input voltage range to USB host controller.
As described in the C1+ schematics, GPIO GPIOAO_5 is used to
enable input power to USB ports, set it to Active Low.

[ 1.260772] dwc2 c90c0000.usb: Looking up vbus-supply from device tree
[ 1.260784] dwc2 c90c0000.usb: Looking up vbus-supply property in
mode /soc/usb@c90c0000 failed

Fixes: 2eb79a4d15ff (ARM: dts: meson: enabling the USB Host
controller on Odroid-C1/C1+ board)

Cc: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
Signed-off-by: Anand Moon <linux.amoon@xxxxxxxxx>
---
V2 > changes gpio polarity ACTIVE_HIGH to ACTIVE_LOW.
Fix the source power from phy-supply to vbus-supply.

[1] https://lore.kernel.org/linux-devicetree/20210716103651.1455-2-linux.amoon@xxxxxxxxx/

V1 > Fix the Input GPIO polarity from HIGH to LOW.

previous version
[0] https://patchwork.kernel.org/project/linux-amlogic/patch/20190113181808.5768-1-linux.amoon@xxxxxxxxx

changes fix the vbus-suppy to phy-supply, drop enable usb0

USB_PWR 2 1 0 unknown 5000mV 0mA 5000mV 5000mV
phy-c1108820.phy.0-phy 2 0mA 0mV 0mV
---
arch/arm/boot/dts/meson8b-odroidc1.dts | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
index c440ef94e082..30ec6a7f20c7 100644
--- a/arch/arm/boot/dts/meson8b-odroidc1.dts
+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
@@ -32,6 +32,23 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
};

+ usb_pwr_en: regulator-usb-pwr-en {
+ compatible = "regulator-fixed";
+
+ regulator-name = "USB_OTG_PWR";
+
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ /*
+ * signal name from schematics: USB_POWER - P5V0
+ */
+ vin-supply = <&p5v0>;
+ /*
+ * signal name from schematics: PWREN - GPIOAO.BIT5
+ */
+ gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_LOW>;
+ };
+
leds {
compatible = "gpio-leds";
blue {
@@ -119,7 +136,6 @@ vcc_3v3: regulator-vcc-3v3 {
regulator-name = "VCC3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
-
vin-supply = <&p5v0>;
};

@@ -382,4 +398,5 @@ &usb1_phy {

&usb1 {
status = "okay";
+ vbus-supply = <&usb_pwr_en>;
};
--
2.32.0