Skip to contentSkip to conversation

ARM: dts: stm32: Convert GPIO hog to USB connector Vbus supply on STM32MP15xx DHCOM PicoITX

PATCH New Marek Vasut 1 participant 1 message Oct 22

Subsystems (3)
lore
Share & tools
lore

Marek Vasut

author maintainer
#0 lore raw

PATCH 1/1 ARM: dts: stm32: Convert GPIO hog to USB connector Vbus supply on STM32MP15xx DHCOM PicoITX

Replace current GPIO hog with USB-A connector vbus-supply. This moves the Vbus GPIO into port control, where it can be enabled and disabled by the controller as needed.

---
Cc: Alexandre Torgue <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 .../dts/st/stm32mp15xx-dhcom-picoitx.dtsi     | 27 +++++++++----------
 1 file changed, 12 insertions(+), 15 deletions(-)
arch/arm/boot/dts/st/stm32mp15xx-dhcom-picoitx.dtsi +12 -15
index 01c693cc03446..7f444bd4c58d3 100644
@@ -16,6 +16,14 @@ led-0 {
 			default-state = "off";
 		};
 	};
+
+	usb_vbus: vbus-regulator {
+		compatible = "regulator-fixed";
+		gpio = <&gpioa 13 GPIO_ACTIVE_LOW>;
+		regulator-name = "Vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
 };
 
 &adc {
@@ -30,21 +38,6 @@ &fmc {
 	status = "disabled";
 };
 
-&gpioa {
-	/*
-	 * NOTE: The USB Port on the PicoITX needs a PWR_EN signal to enable
-	 * port power. This signal should be handled by USB power sequencing
-	 * in order to turn on port power when USB bus is powered up, but so
-	 * far there is no such functionality.
-	 */
-	usb-port-power-hog {
-		gpio-hog;
-		gpios = <13 0>;
-		output-low;
-		line-name = "usb-port-power";
-	};
-};
-
 &gpioc {
 	gpio-line-names = "", "", "", "",
 			  "", "", "PicoITX-In1", "",
@@ -132,6 +125,10 @@ &usbphyc {
 
 &usbphyc_port0 {
 	phy-supply = <&vdd_usb>;
+	connector {
+		compatible = "usb-a-connector";
+		vbus-supply = <&usb_vbus>;
+	};
 };
 
 &usbphyc_port1 {
Signature · 1 line
2.53.0