kernel: add missing config symbols to 3.13
[openwrt.git] / target / linux / sunxi / patches-3.13 / 162-1-dt-sun4i-add-ahci-nodes.patch
1 From 23af610e09f78822ade4067a400ff9ceb5b020ea Mon Sep 17 00:00:00 2001
2 From: Oliver Schinagl <oliver@schinagl.nl>
3 Date: Tue, 3 Dec 2013 12:10:11 +0100
4 Subject: [PATCH] ARM: sun4i: dts: Add ahci / sata support
5
6 This patch adds sunxi sata support to A10 boards that have such a connector.
7 Some boards also feature a regulator via a GPIO and support for this is also
8 added.
9
10 Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
11 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
12 ---
13  arch/arm/boot/dts/sun4i-a10-a1000.dts      |  4 ++++
14  arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 27 +++++++++++++++++++++++++++
15  arch/arm/boot/dts/sun4i-a10.dtsi           |  9 +++++++++
16  3 files changed, 40 insertions(+)
17
18 --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts
19 +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts
20 @@ -48,6 +48,10 @@
21                         status = "okay";
22                 };
23  
24 +               sata: ahci@01c18000 {
25 +                       status = "okay";
26 +               };
27 +
28                 pinctrl@01c20800 {
29                         mmc0_cd_pin_a1000: mmc0_cd_pin@0 {
30                                 allwinner,pins = "PH1";
31 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
32 +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
33 @@ -51,7 +51,19 @@
34                         status = "okay";
35                 };
36  
37 +               sata: ahci@01c18000 {
38 +                       pwr-supply = <&reg_ahci_5v>;
39 +                       status = "okay";
40 +               };
41 +
42                 pinctrl@01c20800 {
43 +                       ahci_pwr_pin_cubieboard: ahci_pwr_pin@0 {
44 +                               allwinner,pins = "PB8";
45 +                               allwinner,function = "gpio_out";
46 +                               allwinner,drive = <0>;
47 +                               allwinner,pull = <0>;
48 +                       };
49 +
50                         mmc0_cd_pin_cubieboard: mmc0_cd_pin@0 {
51                                 allwinner,pins = "PH1";
52                                 allwinner,function = "gpio_in";
53 @@ -102,4 +114,19 @@
54                         linux,default-trigger = "heartbeat";
55                 };
56         };
57 +
58 +       regulators {
59 +               compatible = "simple-bus";
60 +               pinctrl-names = "default";
61 +
62 +               reg_ahci_5v: ahci-5v {
63 +                       compatible = "regulator-fixed";
64 +                       regulator-name = "ahci-5v";
65 +                       regulator-min-microvolt = <5000000>;
66 +                       regulator-max-microvolt = <5000000>;
67 +                       pinctrl-0 = <&ahci_pwr_pin_cubieboard>;
68 +                       gpio = <&pio 1 8 0>;
69 +                       enable-active-high;
70 +               };
71 +       };
72  };
73 --- a/arch/arm/boot/dts/sun4i-a10.dtsi
74 +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
75 @@ -338,6 +338,15 @@
76                         status = "disabled";
77                 };
78  
79 +               sata: ahci@01c18000 {
80 +                       compatible = "allwinner,sun4i-a10-ahci";
81 +                       reg = <0x01c18000 0x1000>;
82 +                       interrupts = <56>;
83 +                       clocks = <&ahb_gates 25>, <&pll6 0>;
84 +                       clock-names = "ahb_sata", "pll6_sata";
85 +                       status = "disabled";
86 +               };
87 +
88                 intc: interrupt-controller@01c20400 {
89                         compatible = "allwinner,sun4i-ic";
90                         reg = <0x01c20400 0x400>;