0f00c2564e79912f305c9212072a05b493fe7b04
[openwrt/openwrt.git] / target / linux / sunxi / patches-3.12 / 162-2-dt-sun7i-add-ehci-for-cb2.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 diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
15 index a26711c..10ea99d 100644
16 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
17 +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
18 @@ -54,6 +54,20 @@
19 allwinner,drive = <0>;
20 allwinner,pull = <0>;
21 };
22 +
23 + usb1_vbus_pin: usb1_vbus_pin@0 {
24 + allwinner,pins = "PH6";
25 + allwinner,function = "gpio_out";
26 + allwinner,drive = <0>;
27 + allwinner,pull = <2>;
28 + };
29 +
30 + usb2_vbus_pin: usb2_vbus_pin@0 {
31 + allwinner,pins = "PH3";
32 + allwinner,function = "gpio_out";
33 + allwinner,drive = <0>;
34 + allwinner,pull = <2>;
35 + };
36 };
37
38 uart0: serial@01c28000 {
39 @@ -71,6 +85,15 @@
40 i2c1: i2c@01c2b000 {
41 pinctrl-names = "default";
42 pinctrl-0 = <&i2c1_pins_a>;
43 + };
44 +
45 + ehci0: ehci0@0x01c14000 {
46 + vbus-supply = <&reg_usb1_vbus>;
47 + status = "okay";
48 + };
49 +
50 + ehci1: ehci1@0x01c1c000 {
51 + vbus-supply = <&reg_usb2_vbus>;
52 status = "okay";
53 };
54
55 @@ -112,5 +135,27 @@
56 gpio = <&pio 1 8 0>;
57 enable-active-high;
58 };
59 +
60 + reg_usb1_vbus: usb1-vbus {
61 + compatible = "regulator-fixed";
62 + pinctrl-names = "default";
63 + pinctrl-0 = <&usb1_vbus_pin>;
64 + regulator-name = "usb1-vbus";
65 + regulator-min-microvolt = <3300000>;
66 + regulator-max-microvolt = <3300000>;
67 + enable-active-high;
68 + gpio = <&pio 7 6 0>;
69 + };
70 +
71 + reg_usb2_vbus: usb2-vbus {
72 + compatible = "regulator-fixed";
73 + pinctrl-names = "default";
74 + pinctrl-0 = <&usb2_vbus_pin>;
75 + regulator-name = "usb2-vbus";
76 + regulator-min-microvolt = <3300000>;
77 + regulator-max-microvolt = <3300000>;
78 + enable-active-high;
79 + gpio = <&pio 7 3 0>;
80 + };
81 };
82 };
83 --
84 1.8.5.1
85