sunxi: driver refresh for 3.13
[openwrt.git] / target / linux / sunxi / patches-3.13 / 181-2-dt-sun5i-add-vbus-reg-dtsi.patch
1 From d11b47592e6af40fff595900c2af30774ee0b88e Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Sun, 9 Feb 2014 14:17:28 +0100
4 Subject: [PATCH] ARM: sun5i: dt: Add sun5i-a1*-usb-vbus-reg dts include files
5
6 Almost all sun5i-a10s boards have a gpio controlled vbus for usb1 using gpio
7 pin PB10 as in the reference design. This commit adds an include file for this,
8 avoiding the need to copy and paste the dts code.
9
10 For sun5i-a13 based board the reference design uses a gpio on the pmic, which
11 we don't support yet. Still for consistency with all the other dts files also
12 add a sun5i-a13-usb-vbus-reg.dtsi files, without a gpio reference for now.
13
14 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
15 ---
16  arch/arm/boot/dts/sun5i-a10s-usb-vbus-reg.dtsi | 36 ++++++++++++++++++++++++++
17  arch/arm/boot/dts/sun5i-a13-usb-vbus-reg.dtsi  | 23 ++++++++++++++++
18  2 files changed, 59 insertions(+)
19  create mode 100644 arch/arm/boot/dts/sun5i-a10s-usb-vbus-reg.dtsi
20  create mode 100644 arch/arm/boot/dts/sun5i-a13-usb-vbus-reg.dtsi
21
22 diff --git a/arch/arm/boot/dts/sun5i-a10s-usb-vbus-reg.dtsi b/arch/arm/boot/dts/sun5i-a10s-usb-vbus-reg.dtsi
23 new file mode 100644
24 index 0000000..bb1a693
25 --- /dev/null
26 +++ b/arch/arm/boot/dts/sun5i-a10s-usb-vbus-reg.dtsi
27 @@ -0,0 +1,36 @@
28 +/*
29 + * sun5i a10s boards usb vbus supply common code
30 + *
31 + * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
32 + *
33 + * The code contained herein is licensed under the GNU General Public
34 + * License. You may obtain a copy of the GNU General Public License
35 + * Version 2 or later at the following locations:
36 + *
37 + * http://www.opensource.org/licenses/gpl-license.html
38 + * http://www.gnu.org/copyleft/gpl.html
39 + */
40 +
41 +/ {
42 +       soc@01c00000 {
43 +               pio: pinctrl@01c20800 {
44 +                       usb1_vbus_pin_a: usb1_vbus_pin@0 {
45 +                               allwinner,pins = "PB10";
46 +                               allwinner,function = "gpio_out";
47 +                               allwinner,drive = <0>;
48 +                               allwinner,pull = <0>;
49 +                       };
50 +               };
51 +       };
52 +
53 +       reg_usb1_vbus: usb1-vbus {
54 +               compatible = "regulator-fixed";
55 +               pinctrl-names = "default";
56 +               pinctrl-0 = <&usb1_vbus_pin_a>;
57 +               regulator-name = "usb1-vbus";
58 +               regulator-min-microvolt = <5000000>;
59 +               regulator-max-microvolt = <5000000>;
60 +               enable-active-high;
61 +               gpio = <&pio 1 10 0>;
62 +       };
63 +};
64 diff --git a/arch/arm/boot/dts/sun5i-a13-usb-vbus-reg.dtsi b/arch/arm/boot/dts/sun5i-a13-usb-vbus-reg.dtsi
65 new file mode 100644
66 index 0000000..4d70b9a
67 --- /dev/null
68 +++ b/arch/arm/boot/dts/sun5i-a13-usb-vbus-reg.dtsi
69 @@ -0,0 +1,23 @@
70 +/*
71 + * sun5i a13 boards usb vbus supply common code
72 + *
73 + * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
74 + *
75 + * The code contained herein is licensed under the GNU General Public
76 + * License. You may obtain a copy of the GNU General Public License
77 + * Version 2 or later at the following locations:
78 + *
79 + * http://www.opensource.org/licenses/gpl-license.html
80 + * http://www.gnu.org/copyleft/gpl.html
81 + */
82 +
83 +/ {
84 +       reg_usb1_vbus: usb1-vbus {
85 +               compatible = "regulator-fixed";
86 +               pinctrl-names = "default";
87 +               regulator-name = "usb1-vbus";
88 +               regulator-min-microvolt = <5000000>;
89 +               regulator-max-microvolt = <5000000>;
90 +               enable-active-high;
91 +       };
92 +};
93 -- 
94 1.8.5.5
95