kernel: update 3.14 to 3.14.18
[openwrt.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 --- /dev/null
21 +++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
22 @@ -0,0 +1,75 @@
23 +/*
24 + * sunxi boards common regulator (ahci target power supply, usb-vbus) code
25 + *
26 + * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
27 + *
28 + * The code contained herein is licensed under the GNU General Public
29 + * License. You may obtain a copy of the GNU General Public License
30 + * Version 2 or later at the following locations:
31 + *
32 + * http://www.opensource.org/licenses/gpl-license.html
33 + * http://www.gnu.org/copyleft/gpl.html
34 + */
35 +
36 +/ {
37 +       soc@01c00000 {
38 +               pio: pinctrl@01c20800 {
39 +                       ahci_pwr_pin_a: ahci_pwr_pin@0 {
40 +                               allwinner,pins = "PB8";
41 +                               allwinner,function = "gpio_out";
42 +                               allwinner,drive = <0>;
43 +                               allwinner,pull = <0>;
44 +                       };
45 +
46 +                       usb1_vbus_pin_a: usb1_vbus_pin@0 {
47 +                               allwinner,pins = "PH6";
48 +                               allwinner,function = "gpio_out";
49 +                               allwinner,drive = <0>;
50 +                               allwinner,pull = <0>;
51 +                       };
52 +
53 +                       usb2_vbus_pin_a: usb2_vbus_pin@0 {
54 +                               allwinner,pins = "PH3";
55 +                               allwinner,function = "gpio_out";
56 +                               allwinner,drive = <0>;
57 +                               allwinner,pull = <0>;
58 +                       };
59 +               };
60 +       };
61 +
62 +       reg_ahci_5v: ahci-5v {
63 +               compatible = "regulator-fixed";
64 +               pinctrl-names = "default";
65 +               pinctrl-0 = <&ahci_pwr_pin_a>;
66 +               regulator-name = "ahci-5v";
67 +               regulator-min-microvolt = <5000000>;
68 +               regulator-max-microvolt = <5000000>;
69 +               enable-active-high;
70 +               gpio = <&pio 1 8 0>;
71 +               status = "disabled";
72 +       };
73 +
74 +       reg_usb1_vbus: usb1-vbus {
75 +               compatible = "regulator-fixed";
76 +               pinctrl-names = "default";
77 +               pinctrl-0 = <&usb1_vbus_pin_a>;
78 +               regulator-name = "usb1-vbus";
79 +               regulator-min-microvolt = <5000000>;
80 +               regulator-max-microvolt = <5000000>;
81 +               enable-active-high;
82 +               gpio = <&pio 7 6 0>;
83 +               status = "disabled";
84 +       };
85 +
86 +       reg_usb2_vbus: usb2-vbus {
87 +               compatible = "regulator-fixed";
88 +               pinctrl-names = "default";
89 +               pinctrl-0 = <&usb2_vbus_pin_a>;
90 +               regulator-name = "usb2-vbus";
91 +               regulator-min-microvolt = <5000000>;
92 +               regulator-max-microvolt = <5000000>;
93 +               enable-active-high;
94 +               gpio = <&pio 7 3 0>;
95 +               status = "disabled";
96 +       };
97 +};