Commit 5313ea66 authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Maxime Ripard

arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board

Orange Pi PC 2 board features a OTG port like the one on older H3 Orange
Pi's, with PG12 pin being the id det pin and PL2 being the vbus driver
pin.

Add support for it.
Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.xyz>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 9d41bbb6
...@@ -90,6 +90,16 @@ sw4 { ...@@ -90,6 +90,16 @@ sw4 {
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
}; };
}; };
reg_usb0_vbus: usb0-vbus {
compatible = "regulator-fixed";
regulator-name = "usb0-vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
status = "okay";
};
}; };
&codec { &codec {
...@@ -100,6 +110,10 @@ &codec { ...@@ -100,6 +110,10 @@ &codec {
status = "okay"; status = "okay";
}; };
&ehci0 {
status = "okay";
};
&ehci1 { &ehci1 {
status = "okay"; status = "okay";
}; };
...@@ -127,6 +141,10 @@ &mmc0 { ...@@ -127,6 +141,10 @@ &mmc0 {
status = "okay"; status = "okay";
}; };
&ohci0 {
status = "okay";
};
&ohci1 { &ohci1 {
status = "okay"; status = "okay";
}; };
...@@ -157,7 +175,14 @@ &uart2 { ...@@ -157,7 +175,14 @@ &uart2 {
status = "disabled"; status = "disabled";
}; };
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy { &usbphy {
/* USB VBUS is always on */ /* USB Type-A ports' VBUS is always on */
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
usb0_vbus-supply = <&reg_usb0_vbus>;
status = "okay"; status = "okay";
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment