upgrade 3.13 targets to 3.13.2, refresh patches
[openwrt.git] / target / linux / sunxi / patches-3.13 / 174-3-dt-sun7i-add-ehci-cubieboard2.patch
1 From 8ba068f40cce9612d2ac0879b6978274ab497d31 Mon Sep 17 00:00:00 2001
2 From: arokux <arokux@gmail.com>
3 Date: Thu, 19 Sep 2013 21:29:45 +0200
4 Subject: [PATCH] ARM: sun7i: dt: Add USB EHCI bindings for Cubieboard2
5
6 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7
8 Conflicts:
9         arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
10 ---
11  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 45 +++++++++++++++++++++++++++++
12  1 file changed, 45 insertions(+)
13
14 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
15 +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
16 @@ -69,6 +69,20 @@
17                                 allwinner,drive = <0>;
18                                 allwinner,pull = <0>;
19                         };
20 +
21 +                       usb1_vbus_pin: usb1_vbus_pin@0 {
22 +                                       allwinner,pins = "PH6";
23 +                                       allwinner,function = "gpio_out";
24 +                                       allwinner,drive = <0>;
25 +                                       allwinner,pull = <2>;
26 +                       };
27 +
28 +                       usb2_vbus_pin: usb2_vbus_pin@0 {
29 +                                       allwinner,pins = "PH3";
30 +                                       allwinner,function = "gpio_out";
31 +                                       allwinner,drive = <0>;
32 +                                       allwinner,pull = <2>;
33 +                       };
34                 };
35  
36                 uart0: serial@01c28000 {
37 @@ -86,6 +100,15 @@
38                 i2c1: i2c@01c2b000 {
39                         pinctrl-names = "default";
40                         pinctrl-0 = <&i2c1_pins_a>;
41 +               };
42 +
43 +               ehci0: ehci0@0x01c14000 {
44 +                       vbus-supply = <&reg_usb1_vbus>;
45 +                       status = "okay";
46 +               };
47 +
48 +               ehci1: ehci1@0x01c1c000 {
49 +                       vbus-supply = <&reg_usb2_vbus>;
50                         status = "okay";
51                 };
52         };
53 @@ -119,5 +142,27 @@
54                         gpio = <&pio 1 8 0>;
55                         enable-active-high;
56                 };
57 +
58 +               reg_usb1_vbus: usb1-vbus {
59 +                       compatible = "regulator-fixed";
60 +                       pinctrl-names = "default";
61 +                       pinctrl-0 = <&usb1_vbus_pin>;
62 +                       regulator-name = "usb1-vbus";
63 +                       regulator-min-microvolt = <3300000>;
64 +                       regulator-max-microvolt = <3300000>;
65 +                       enable-active-high;
66 +                       gpio = <&pio 7 6 0>;
67 +               };
68 +
69 +               reg_usb2_vbus: usb2-vbus {
70 +                       compatible = "regulator-fixed";
71 +                       pinctrl-names = "default";
72 +                       pinctrl-0 = <&usb2_vbus_pin>;
73 +                       regulator-name = "usb2-vbus";
74 +                       regulator-min-microvolt = <3300000>;
75 +                       regulator-max-microvolt = <3300000>;
76 +                       enable-active-high;
77 +                       gpio = <&pio 7 3 0>;
78 +               };
79         };
80  };