ARM: sun7i: dt: Add ahci / sata support
authorHans de Goede <hdegoede@redhat.com>
Sat, 1 Mar 2014 19:26:22 +0000 (20:26 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 4 Mar 2014 16:42:53 +0000 (17:42 +0100)
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>
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
arch/arm/boot/dts/sun7i-a20-cubietruck.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/boot/dts/sun7i-a20.dtsi

index 7bf4935a58a9fd8b864516365f9f142f1c21a729..4bed1159ceeb208dbcac33f7bb674cb05e2c5dbb 100644 (file)
 
 /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";
+       };
 };
index 025ce5234692532f990a44e925049c3147d65d5e..ef5fed898a1d57b0d5a49801b4af6df93782bea6 100644 (file)
 
 /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";
                        gpios = <&pio 7 7 0>;
                };
        };
+
+       reg_ahci_5v: ahci-5v {
+               pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
+               gpio = <&pio 7 12 0>;
+               status = "okay";
+       };
 };
index 9d98316c9928cf6c5ecb232da686575569ea35f1..c9b0f370b03d878b54579e79e5ccec62e3cc53e4 100644 (file)
@@ -13,6 +13,7 @@
 
 /dts-v1/;
 /include/ "sun7i-a20.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
 
 / {
        model = "Olimex A20-Olinuxino Micro";
                        status = "okay";
                };
 
+               ahci: sata@01c18000 {
+                       target-supply = <&reg_ahci_5v>;
+                       status = "okay";
+               };
+
                pinctrl@01c20800 {
                        led_pins_olinuxino: led_pins@0 {
                                allwinner,pins = "PH2";
                        default-state = "on";
                };
        };
+
+       reg_ahci_5v: ahci-5v {
+               status = "okay";
+       };
 };
index fa0e5f8c4483950427eeab497d347ee3b3dce835..38916fbffaa87156dcd786d851c15d7ee48f06c9 100644 (file)
                        #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>;
This page took 0.029766 seconds and 5 git commands to generate.