Skip to contentSkip to conversation

ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes

PATCH New Brian Kim 2 participants 3 messages Sep 30, 2016 – Oct 4, 2016

Subsystems (2)
lore
Share & tools
lore

Brian Kim

author
#0 lore raw

PATCH 1/1 ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes

Enable both gxbb USB controller and add a 5V regulator for the OTG port VBUS

---
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +29 -0
index 8d89edc..997c671 100644
@@ -64,6 +64,18 @@
 		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
+	usb_pwr: regulator-usb-pwrs {
+		compatible = "regulator-fixed";
+
+		regulator-name = "USB_PWR";
+
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		blue {
@@ -149,6 +161,23 @@
 	pinctrl-names = "default";
 };
 
+&usb0_phy {
+	status = "okay";
+	phy-supply = <&usb_pwr>;
+};
+
+&usb1_phy {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
+
 /* SD */
 &sd_emmc_b {
 	status = "okay";
Signature · 1 line
2.7.4
maintainer
#1 lore raw

PATCH 1/1 ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes

Quoted 4 lines · Brian Kim

Enable both gxbb USB controller and add a 5V regulator for the OTG port VBUS

Thanks for the patch.

In the future, please state what branch the patch should apply to when not using mainline. Because of the sd_emmc nodes in your patch, I could tell that it was based on my integ branch so was able to figure it out, but it's very helpful to maintainers if you state the branch and/or any dependencies explicity.

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 67

Quoted 13 lines
---
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -0
index 8d89edc..997c671 100644
@@ -64,6 +64,18 @@
 		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
+	usb_pwr: regulator-usb-pwrs {

minor nit: since this is specific to the OTG part, can you call this usb_otg_pwr? ...

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 70

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +3 -0
+		compatible = "regulator-fixed";
+
+		regulator-name = "USB_PWR";

... and rename this also?

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 78

Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +7 -0
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+

Thanks

Kevin

author
#2 lore raw

PATCH 1/1 ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes

Quoted 5 lines · Kevin Hilman
Quoted 3 lines · Brian Kim

Enable both gxbb USB controller and add a 5V regulator for the OTG port VBUS

Quoted 8 lines
Quoted 1 line

Thanks for the patch.

In the future, please state what branch the patch should apply to when not using mainline. Because of the sd_emmc nodes in your patch, I could tell that it was based on my integ branch so was able to figure it out, but it's very helpful to maintainers if you state the branch and/or any dependencies explicity.

Okay, I will do next time.
I guessed the branch is your latest working branch by the commit logs.

Quoted 13 lines
Quoted 13 lines
---
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +0 -0
index 8d89edc..997c671 100644
@@ -64,6 +64,18 @@
 		reg = <0x0 0x0 0x0 0x80000000>;
 	};
 
Quoted 3 lines

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 67

Quoted 1 line
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -0
+	usb_pwr: regulator-usb-pwrs {

minor nit: since this is specific to the OTG part, can you call this usb_otg_pwr? ...

Sure.

Quoted 5 lines

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 70

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +3 -0
+		compatible = "regulator-fixed";
+
+		regulator-name = "USB_PWR";

... and rename this also?

Yes, I will change the name to "USB_OTG_PWR".

Quoted 12 lines

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 78

Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +7 -0
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+

Thanks

Kevin