summaryrefslogtreecommitdiff
path: root/target/linux/sunxi/patches-3.14/151-dt-sun7i-add-ahci.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/sunxi/patches-3.14/151-dt-sun7i-add-ahci.patch')
-rw-r--r--target/linux/sunxi/patches-3.14/151-dt-sun7i-add-ahci.patch147
1 files changed, 147 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.14/151-dt-sun7i-add-ahci.patch b/target/linux/sunxi/patches-3.14/151-dt-sun7i-add-ahci.patch
new file mode 100644
index 0000000..d4685d9
--- /dev/null
+++ b/target/linux/sunxi/patches-3.14/151-dt-sun7i-add-ahci.patch
@@ -0,0 +1,147 @@
+From cf454a47b64ef78ff85b097c8cb404120c14e6a5 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 3 Jan 2014 10:27:51 +0100
+Subject: [PATCH] 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>
+---
+ arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 10 ++++++++++
+ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 19 +++++++++++++++++++
+ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 10 ++++++++++
+ arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++++++
+ 4 files changed, 47 insertions(+)
+
+diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+index 7bf4935..4bed115 100644
+--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
++++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+@@ -13,12 +13,18 @@
+
+ /dts-v1/;
+ /include/ "sun7i-a20.dtsi"
++/include/ "sunxi-common-regulators.dtsi"
+
+ / {
+ model = "Cubietech Cubieboard2";
+ compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
+
+ soc@01c00000 {
++ ahci: sata@01c18000 {
++ target-supply = <&reg_ahci_5v>;
++ status = "okay";
++ };
++
+ pinctrl@01c20800 {
+ led_pins_cubieboard2: led_pins@0 {
+ allwinner,pins = "PH20", "PH21";
+@@ -74,4 +80,8 @@
+ gpios = <&pio 7 20 0>;
+ };
+ };
++
++ reg_ahci_5v: ahci-5v {
++ status = "okay";
++ };
+ };
+diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+index 025ce52..ef5fed8 100644
+--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
++++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+@@ -13,13 +13,26 @@
+
+ /dts-v1/;
+ /include/ "sun7i-a20.dtsi"
++/include/ "sunxi-common-regulators.dtsi"
+
+ / {
+ model = "Cubietech Cubietruck";
+ compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
+
+ soc@01c00000 {
++ ahci: sata@01c18000 {
++ target-supply = <&reg_ahci_5v>;
++ status = "okay";
++ };
++
+ pinctrl@01c20800 {
++ ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
++ allwinner,pins = "PH12";
++ allwinner,function = "gpio_out";
++ allwinner,drive = <0>;
++ allwinner,pull = <0>;
++ };
++
+ led_pins_cubietruck: led_pins@0 {
+ allwinner,pins = "PH7", "PH11", "PH20", "PH21";
+ allwinner,function = "gpio_out";
+@@ -90,4 +103,10 @@
+ gpios = <&pio 7 7 0>;
+ };
+ };
++
++ reg_ahci_5v: ahci-5v {
++ pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
++ gpio = <&pio 7 12 0>;
++ status = "okay";
++ };
+ };
+diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+index 9d98316..c9b0f37 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 @@
+
+ /dts-v1/;
+ /include/ "sun7i-a20.dtsi"
++/include/ "sunxi-common-regulators.dtsi"
+
+ / {
+ model = "Olimex A20-Olinuxino Micro";
+@@ -36,6 +37,11 @@
+ status = "okay";
+ };
+
++ ahci: sata@01c18000 {
++ target-supply = <&reg_ahci_5v>;
++ status = "okay";
++ };
++
+ pinctrl@01c20800 {
+ led_pins_olinuxino: led_pins@0 {
+ allwinner,pins = "PH2";
+@@ -105,4 +111,8 @@
+ default-state = "on";
+ };
+ };
++
++ reg_ahci_5v: ahci-5v {
++ status = "okay";
++ };
+ };
+diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
+index 6161fd8..864b7c6 100644
+--- a/arch/arm/boot/dts/sun7i-a20.dtsi
++++ b/arch/arm/boot/dts/sun7i-a20.dtsi
+@@ -450,6 +450,14 @@
+ #size-cells = <0>;
+ };
+
++ ahci: sata@01c18000 {
++ compatible = "allwinner,sun4i-a10-ahci";
++ reg = <0x01c18000 0x1000>;
++ interrupts = <0 56 4>;
++ clocks = <&pll6 0>, <&ahb_gates 25>;
++ status = "disabled";
++ };
++
+ spi3: spi@01c1f000 {
+ compatible = "allwinner,sun4i-a10-spi";
+ reg = <0x01c1f000 0x1000>;
+--
+2.0.3
+