oxnas: use DHCP by default on ethernet interface (lan)
[oweals/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 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
17 +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
18 @@ -58,6 +58,35 @@
19         chosen {
20                 stdout-path = "serial0:115200n8";
21         };
22 +
23 +       reg_usb3_vbus: usb3-vbus {
24 +               compatible = "regulator-fixed";
25 +               pinctrl-names = "default";
26 +               pinctrl-0 = <&usb3_vbus_pin_a>;
27 +               regulator-name = "usb3-vbus";
28 +               regulator-min-microvolt = <5000000>;
29 +               regulator-max-microvolt = <5000000>;
30 +               regulator-boot-on;
31 +               enable-active-high;
32 +               gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
33 +       };
34 +};
35 +
36 +&ehci1 {
37 +       status = "okay";
38 +};
39 +
40 +&ehci3 {
41 +       status = "okay";
42 +};
43 +
44 +&pio {
45 +       usb3_vbus_pin_a: usb3_vbus_pin@0 {
46 +               allwinner,pins = "PG11";
47 +               allwinner,function = "gpio_out";
48 +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
49 +               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
50 +       };
51  };
52  
53  &mmc0 {
54 @@ -70,8 +99,23 @@
55         status = "okay";
56  };
57  
58 +&reg_usb1_vbus {
59 +       gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
60 +       status = "okay";
61 +};
62 +
63  &uart0 {
64         pinctrl-names = "default";
65         pinctrl-0 = <&uart0_pins_a>;
66         status = "okay";
67  };
68 +
69 +&usb1_vbus_pin_a {
70 +       allwinner,pins = "PG13";
71 +};
72 +
73 +&usbphy {
74 +       usb1_vbus-supply = <&reg_usb1_vbus>;
75 +       usb3_vbus-supply = <&reg_usb3_vbus>;
76 +       status = "okay";
77 +};