1 From cf454a47b64ef78ff85b097c8cb404120c14e6a5 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Fri, 3 Jan 2014 10:27:51 +0100
4 Subject: [PATCH] ARM: sun7i: dt: Add ahci / sata support
6 This patch adds sunxi sata support to A20 boards that have such a connector.
7 Some boards also feature a regulator via a GPIO and support for this is also
10 Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
11 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 10 ++++++++++
14 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 19 +++++++++++++++++++
15 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 10 ++++++++++
16 arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++++++
17 4 files changed, 47 insertions(+)
19 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
20 +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
24 /include/ "sun7i-a20.dtsi"
25 +/include/ "sunxi-common-regulators.dtsi"
28 model = "Cubietech Cubieboard2";
29 compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
32 + ahci: sata@01c18000 {
33 + target-supply = <®_ahci_5v>;
38 led_pins_cubieboard2: led_pins@0 {
39 allwinner,pins = "PH20", "PH21";
41 gpios = <&pio 7 20 0>;
45 + reg_ahci_5v: ahci-5v {
49 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
50 +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
54 /include/ "sun7i-a20.dtsi"
55 +/include/ "sunxi-common-regulators.dtsi"
58 model = "Cubietech Cubietruck";
59 compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
62 + ahci: sata@01c18000 {
63 + target-supply = <®_ahci_5v>;
68 + ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
69 + allwinner,pins = "PH12";
70 + allwinner,function = "gpio_out";
71 + allwinner,drive = <0>;
72 + allwinner,pull = <0>;
75 led_pins_cubietruck: led_pins@0 {
76 allwinner,pins = "PH7", "PH11", "PH20", "PH21";
77 allwinner,function = "gpio_out";
83 + reg_ahci_5v: ahci-5v {
84 + pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
85 + gpio = <&pio 7 12 0>;
89 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
90 +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
94 /include/ "sun7i-a20.dtsi"
95 +/include/ "sunxi-common-regulators.dtsi"
98 model = "Olimex A20-Olinuxino Micro";
103 + ahci: sata@01c18000 {
104 + target-supply = <®_ahci_5v>;
109 led_pins_olinuxino: led_pins@0 {
110 allwinner,pins = "PH2";
112 default-state = "on";
116 + reg_ahci_5v: ahci-5v {
120 --- a/arch/arm/boot/dts/sun7i-a20.dtsi
121 +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
126 + ahci: sata@01c18000 {
127 + compatible = "allwinner,sun4i-a10-ahci";
128 + reg = <0x01c18000 0x1000>;
129 + interrupts = <0 56 4>;
130 + clocks = <&pll6 0>, <&ahb_gates 25>;
131 + status = "disabled";
135 compatible = "allwinner,sun4i-a10-spi";
136 reg = <0x01c1f000 0x1000>;