diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-03-01 14:26:22 -0500 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-03-04 11:42:53 -0500 |
commit | 902febf9ea856dc9a9376bcdc70dfaa9b3ad5a74 (patch) | |
tree | 1db3573f3f316582de85bd70faa8fc1ad2622d69 | |
parent | 248bd1e228eb9cc7ff9577d45b5d1b6d52c43cd9 (diff) |
ARM: sun7i: dt: Add ahci / sata support
This patch adds sunxi sata support to A20 boards that have such a connector.
Some boards also feature a regulator via a GPIO and support for this is also
added.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 10 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 19 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 10 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20.dtsi | 8 |
4 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 7bf4935a58a9..4bed1159ceeb 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | |||
@@ -13,12 +13,18 @@ | |||
13 | 13 | ||
14 | /dts-v1/; | 14 | /dts-v1/; |
15 | /include/ "sun7i-a20.dtsi" | 15 | /include/ "sun7i-a20.dtsi" |
16 | /include/ "sunxi-common-regulators.dtsi" | ||
16 | 17 | ||
17 | / { | 18 | / { |
18 | model = "Cubietech Cubieboard2"; | 19 | model = "Cubietech Cubieboard2"; |
19 | compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20"; | 20 | compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20"; |
20 | 21 | ||
21 | soc@01c00000 { | 22 | soc@01c00000 { |
23 | ahci: sata@01c18000 { | ||
24 | target-supply = <®_ahci_5v>; | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | |||
22 | pinctrl@01c20800 { | 28 | pinctrl@01c20800 { |
23 | led_pins_cubieboard2: led_pins@0 { | 29 | led_pins_cubieboard2: led_pins@0 { |
24 | allwinner,pins = "PH20", "PH21"; | 30 | allwinner,pins = "PH20", "PH21"; |
@@ -74,4 +80,8 @@ | |||
74 | gpios = <&pio 7 20 0>; | 80 | gpios = <&pio 7 20 0>; |
75 | }; | 81 | }; |
76 | }; | 82 | }; |
83 | |||
84 | reg_ahci_5v: ahci-5v { | ||
85 | status = "okay"; | ||
86 | }; | ||
77 | }; | 87 | }; |
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index 025ce5234692..ef5fed898a1d 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts | |||
@@ -13,13 +13,26 @@ | |||
13 | 13 | ||
14 | /dts-v1/; | 14 | /dts-v1/; |
15 | /include/ "sun7i-a20.dtsi" | 15 | /include/ "sun7i-a20.dtsi" |
16 | /include/ "sunxi-common-regulators.dtsi" | ||
16 | 17 | ||
17 | / { | 18 | / { |
18 | model = "Cubietech Cubietruck"; | 19 | model = "Cubietech Cubietruck"; |
19 | compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; | 20 | compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; |
20 | 21 | ||
21 | soc@01c00000 { | 22 | soc@01c00000 { |
23 | ahci: sata@01c18000 { | ||
24 | target-supply = <®_ahci_5v>; | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | |||
22 | pinctrl@01c20800 { | 28 | pinctrl@01c20800 { |
29 | ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { | ||
30 | allwinner,pins = "PH12"; | ||
31 | allwinner,function = "gpio_out"; | ||
32 | allwinner,drive = <0>; | ||
33 | allwinner,pull = <0>; | ||
34 | }; | ||
35 | |||
23 | led_pins_cubietruck: led_pins@0 { | 36 | led_pins_cubietruck: led_pins@0 { |
24 | allwinner,pins = "PH7", "PH11", "PH20", "PH21"; | 37 | allwinner,pins = "PH7", "PH11", "PH20", "PH21"; |
25 | allwinner,function = "gpio_out"; | 38 | allwinner,function = "gpio_out"; |
@@ -90,4 +103,10 @@ | |||
90 | gpios = <&pio 7 7 0>; | 103 | gpios = <&pio 7 7 0>; |
91 | }; | 104 | }; |
92 | }; | 105 | }; |
106 | |||
107 | reg_ahci_5v: ahci-5v { | ||
108 | pinctrl-0 = <&ahci_pwr_pin_cubietruck>; | ||
109 | gpio = <&pio 7 12 0>; | ||
110 | status = "okay"; | ||
111 | }; | ||
93 | }; | 112 | }; |
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts index 9d98316c9928..c9b0f370b03d 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | /dts-v1/; | 14 | /dts-v1/; |
15 | /include/ "sun7i-a20.dtsi" | 15 | /include/ "sun7i-a20.dtsi" |
16 | /include/ "sunxi-common-regulators.dtsi" | ||
16 | 17 | ||
17 | / { | 18 | / { |
18 | model = "Olimex A20-Olinuxino Micro"; | 19 | model = "Olimex A20-Olinuxino Micro"; |
@@ -36,6 +37,11 @@ | |||
36 | status = "okay"; | 37 | status = "okay"; |
37 | }; | 38 | }; |
38 | 39 | ||
40 | ahci: sata@01c18000 { | ||
41 | target-supply = <®_ahci_5v>; | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
39 | pinctrl@01c20800 { | 45 | pinctrl@01c20800 { |
40 | led_pins_olinuxino: led_pins@0 { | 46 | led_pins_olinuxino: led_pins@0 { |
41 | allwinner,pins = "PH2"; | 47 | allwinner,pins = "PH2"; |
@@ -105,4 +111,8 @@ | |||
105 | default-state = "on"; | 111 | default-state = "on"; |
106 | }; | 112 | }; |
107 | }; | 113 | }; |
114 | |||
115 | reg_ahci_5v: ahci-5v { | ||
116 | status = "okay"; | ||
117 | }; | ||
108 | }; | 118 | }; |
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index fa0e5f8c4483..38916fbffaa8 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
@@ -450,6 +450,14 @@ | |||
450 | #size-cells = <0>; | 450 | #size-cells = <0>; |
451 | }; | 451 | }; |
452 | 452 | ||
453 | ahci: sata@01c18000 { | ||
454 | compatible = "allwinner,sun4i-a10-ahci"; | ||
455 | reg = <0x01c18000 0x1000>; | ||
456 | interrupts = <0 56 4>; | ||
457 | clocks = <&pll6 0>, <&ahb_gates 25>; | ||
458 | status = "disabled"; | ||
459 | }; | ||
460 | |||
453 | spi3: spi@01c1f000 { | 461 | spi3: spi@01c1f000 { |
454 | compatible = "allwinner,sun4i-a10-spi"; | 462 | compatible = "allwinner,sun4i-a10-spi"; |
455 | reg = <0x01c1f000 0x1000>; | 463 | reg = <0x01c1f000 0x1000>; |