ARM: sunxi: Add sun4i and cubieboard support
authorStefan Roese <sr@denx.de>
Mon, 19 Nov 2012 11:09:42 +0000 (12:09 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 20 Nov 2012 14:36:34 +0000 (15:36 +0100)
This patch adds support for the Cubieboard based on the Allwinner
A10/sun4i SoC. Currently only UART is supported. Other devices
will eventually follow.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/sun4i-cubieboard.dts [new file with mode: 0644]
arch/arm/boot/dts/sunxi.dtsi
arch/arm/mach-sunxi/sunxi.c

index 9b2d3f061f1382661e1f99051c526fe285de37b2..4dd567b62d2ab65a7fb507e70545c238f7a92908 100644 (file)
@@ -84,7 +84,8 @@ dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \
        spear310-evb.dtb \
        spear320-evb.dtb
 dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb
-dtb-$(CONFIG_ARCH_SUNXI) += sun5i-olinuxino.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun4i-cubieboard.dtb \
+       sun5i-olinuxino.dtb
 dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
        tegra20-medcom-wide.dtb \
        tegra20-paz00.dtb \
diff --git a/arch/arm/boot/dts/sun4i-cubieboard.dts b/arch/arm/boot/dts/sun4i-cubieboard.dts
new file mode 100644 (file)
index 0000000..f4ca126
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2012 Stefan Roese
+ * Stefan Roese <sr@denx.de>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+/include/ "sun4i.dtsi"
+
+/ {
+       model = "Cubietech Cubieboard";
+       compatible = "cubietech,cubieboard", "allwinner,sun4i";
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       chosen {
+               bootargs = "earlyprintk console=ttyS0,115200";
+       };
+
+       soc {
+               uart0: uart@01c28000 {
+                       status = "okay";
+               };
+
+               uart1: uart@01c28400 {
+                       status = "okay";
+               };
+       };
+};
index 9e476deb8809790d92b165a1be566698a3417033..8284fbd7ddab7595d1cb3082ca369fee2216e79d 100644 (file)
                        #interrupt-cells = <1>;
                };
 
+               uart0: uart@01c28000 {
+                       compatible = "ns8250";
+                       reg = <0x01c28000 0x400>;
+                       interrupts = <1>;
+                       reg-shift = <2>;
+                       clock-frequency = <24000000>;
+                       status = "disabled";
+               };
+
                uart1: uart@01c28400 {
                        compatible = "ns8250";
                        reg = <0x01c28400 0x400>;
index 8f42df8af1da5c6abe33dfdb8500ecc3dbe9810c..13d4d96cbc85dacefc5db283594e16fc613e0ec8 100644 (file)
@@ -46,6 +46,7 @@ static void __init sunxi_dt_init(void)
 }
 
 static const char * const sunxi_board_dt_compat[] = {
+       "allwinner,sun4i",
        "allwinner,sun5i",
        NULL,
 };