403e185459b15a17520d9c8a92c2cfce8b41b830
[openwrt/openwrt.git] / target / linux / sunxi / patches-4.4 / 134-dt-sun8i-orangepiplus-enable-usbhost.patch
1 From 37e04fd781d3fc6d08116d38d34ec8124d916441 Mon Sep 17 00:00:00 2001
2 From: Jens Kuske <jenskuske@gmail.com>
3 Date: Tue, 17 Nov 2015 17:12:07 +0100
4 Subject: [PATCH] ARM: dts: sun8i-h3-orangepi-plus: Enable USB host controllers
5
6 Enable the 2 USB host controllers used on the Orange Pi Plus
7 and add the necessary regulators.
8
9 Signed-off-by: Reinder de Haan <patchesrdh@mveas.com>
10 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
11 Signed-off-by: Jens Kuske <jenskuske@gmail.com>
12 ---
13 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 44 ++++++++++++++++++++++++++++
14 1 file changed, 44 insertions(+)
15
16 diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
17 index e67df59..1cb6c66 100644
18 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
19 +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
20 @@ -58,6 +58,35 @@
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24 +
25 + reg_usb3_vbus: usb3-vbus {
26 + compatible = "regulator-fixed";
27 + pinctrl-names = "default";
28 + pinctrl-0 = <&usb3_vbus_pin_a>;
29 + regulator-name = "usb3-vbus";
30 + regulator-min-microvolt = <5000000>;
31 + regulator-max-microvolt = <5000000>;
32 + regulator-boot-on;
33 + enable-active-high;
34 + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
35 + };
36 +};
37 +
38 +&ehci1 {
39 + status = "okay";
40 +};
41 +
42 +&ehci3 {
43 + status = "okay";
44 +};
45 +
46 +&pio {
47 + usb3_vbus_pin_a: usb3_vbus_pin@0 {
48 + allwinner,pins = "PG11";
49 + allwinner,function = "gpio_out";
50 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
51 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
52 + };
53 };
54
55 &mmc0 {
56 @@ -70,8 +99,23 @@
57 status = "okay";
58 };
59
60 +&reg_usb1_vbus {
61 + gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
62 + status = "okay";
63 +};
64 +
65 &uart0 {
66 pinctrl-names = "default";
67 pinctrl-0 = <&uart0_pins_a>;
68 status = "okay";
69 };
70 +
71 +&usb1_vbus_pin_a {
72 + allwinner,pins = "PG13";
73 +};
74 +
75 +&usbphy {
76 + usb1_vbus-supply = <&reg_usb1_vbus>;
77 + usb3_vbus-supply = <&reg_usb3_vbus>;
78 + status = "okay";
79 +};