07dda97efae7a25075ef1da8e95b489e67bb4f08
[openwrt/staging/dedeckeh.git] / target / linux / sunxi / patches-3.14 / 141-dt-sunxi-add-common-regulator-include.patch
1 From 6e763a8ebe7a16ae5635ade146fd2930749ed775 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Sat, 1 Mar 2014 14:57:56 +0100
4 Subject: [PATCH] ARM: sunxi: dt: Add sunxi-common-regulators include file
5
6 Most sunxi boards with a sata connector also have a gpio controlled connector
7 for sata target power and almost all sunxi boards have a gpio controlled vbus
8 for usb1 and usb2.
9
10 This commit adds an include file for the regulators representing these
11 supplies, avoiding the need to copy and paste the regulator code to allmost
12 all sunxi board dts files.
13
14 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
15 ---
16 arch/arm/boot/dts/sunxi-common-regulators.dtsi | 75 ++++++++++++++++++++++++++
17 1 file changed, 75 insertions(+)
18 create mode 100644 arch/arm/boot/dts/sunxi-common-regulators.dtsi
19
20 diff --git a/arch/arm/boot/dts/sunxi-common-regulators.dtsi b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
21 new file mode 100644
22 index 0000000..18eeac0
23 --- /dev/null
24 +++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
25 @@ -0,0 +1,75 @@
26 +/*
27 + * sunxi boards common regulator (ahci target power supply, usb-vbus) code
28 + *
29 + * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
30 + *
31 + * The code contained herein is licensed under the GNU General Public
32 + * License. You may obtain a copy of the GNU General Public License
33 + * Version 2 or later at the following locations:
34 + *
35 + * http://www.opensource.org/licenses/gpl-license.html
36 + * http://www.gnu.org/copyleft/gpl.html
37 + */
38 +
39 +/ {
40 + soc@01c00000 {
41 + pio: pinctrl@01c20800 {
42 + ahci_pwr_pin_a: ahci_pwr_pin@0 {
43 + allwinner,pins = "PB8";
44 + allwinner,function = "gpio_out";
45 + allwinner,drive = <0>;
46 + allwinner,pull = <0>;
47 + };
48 +
49 + usb1_vbus_pin_a: usb1_vbus_pin@0 {
50 + allwinner,pins = "PH6";
51 + allwinner,function = "gpio_out";
52 + allwinner,drive = <0>;
53 + allwinner,pull = <0>;
54 + };
55 +
56 + usb2_vbus_pin_a: usb2_vbus_pin@0 {
57 + allwinner,pins = "PH3";
58 + allwinner,function = "gpio_out";
59 + allwinner,drive = <0>;
60 + allwinner,pull = <0>;
61 + };
62 + };
63 + };
64 +
65 + reg_ahci_5v: ahci-5v {
66 + compatible = "regulator-fixed";
67 + pinctrl-names = "default";
68 + pinctrl-0 = <&ahci_pwr_pin_a>;
69 + regulator-name = "ahci-5v";
70 + regulator-min-microvolt = <5000000>;
71 + regulator-max-microvolt = <5000000>;
72 + enable-active-high;
73 + gpio = <&pio 1 8 0>;
74 + status = "disabled";
75 + };
76 +
77 + reg_usb1_vbus: usb1-vbus {
78 + compatible = "regulator-fixed";
79 + pinctrl-names = "default";
80 + pinctrl-0 = <&usb1_vbus_pin_a>;
81 + regulator-name = "usb1-vbus";
82 + regulator-min-microvolt = <5000000>;
83 + regulator-max-microvolt = <5000000>;
84 + enable-active-high;
85 + gpio = <&pio 7 6 0>;
86 + status = "disabled";
87 + };
88 +
89 + reg_usb2_vbus: usb2-vbus {
90 + compatible = "regulator-fixed";
91 + pinctrl-names = "default";
92 + pinctrl-0 = <&usb2_vbus_pin_a>;
93 + regulator-name = "usb2-vbus";
94 + regulator-min-microvolt = <5000000>;
95 + regulator-max-microvolt = <5000000>;
96 + enable-active-high;
97 + gpio = <&pio 7 3 0>;
98 + status = "disabled";
99 + };
100 +};
101 --
102 2.0.3
103