From: sr@denx.de (Stefan Roese)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: sunxi: Add sun4i and cubieboard support
Date: Mon, 19 Nov 2012 12:09:42 +0100 [thread overview]
Message-ID: <1353323383-11827-3-git-send-email-sr@denx.de> (raw)
In-Reply-To: <1353323383-11827-1-git-send-email-sr@denx.de>
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>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/boot/dts/Makefile | 3 ++-
arch/arm/boot/dts/sun4i-cubieboard.dts | 38 ++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/sunxi.dtsi | 9 ++++++++
arch/arm/mach-sunxi/sunxi.c | 1 +
4 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/sun4i-cubieboard.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 9b2d3f0..4dd567b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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
index 0000000..f4ca126
--- /dev/null
+++ b/arch/arm/boot/dts/sun4i-cubieboard.dts
@@ -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 at 01c28000 {
+ status = "okay";
+ };
+
+ uart1: uart at 01c28400 {
+ status = "okay";
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi
index 9e476de..8284fbd 100644
--- a/arch/arm/boot/dts/sunxi.dtsi
+++ b/arch/arm/boot/dts/sunxi.dtsi
@@ -54,6 +54,15 @@
#interrupt-cells = <1>;
};
+ uart0: uart at 01c28000 {
+ compatible = "ns8250";
+ reg = <0x01c28000 0x400>;
+ interrupts = <1>;
+ reg-shift = <2>;
+ clock-frequency = <24000000>;
+ status = "disabled";
+ };
+
uart1: uart at 01c28400 {
compatible = "ns8250";
reg = <0x01c28400 0x400>;
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 8f42df8..13d4d96 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -46,6 +46,7 @@ static void __init sunxi_dt_init(void)
}
static const char * const sunxi_board_dt_compat[] = {
+ "allwinner,sun4i",
"allwinner,sun5i",
NULL,
};
--
1.8.0
next prev parent reply other threads:[~2012-11-19 11:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 11:09 [PATCH 1/4] ARM: sunxi: Restructure sunxi dts/dtsi files Stefan Roese
2012-11-19 11:09 ` [PATCH 2/4] ARM: sunxi: Add earlyprintk support for UART0 (sun4i) Stefan Roese
2012-11-19 15:22 ` Maxime Ripard
2012-11-19 15:53 ` Arnd Bergmann
2012-11-19 11:09 ` Stefan Roese [this message]
2012-11-19 15:22 ` [PATCH 3/4] ARM: sunxi: Add sun4i and cubieboard support Maxime Ripard
2012-11-19 15:53 ` Arnd Bergmann
2012-11-19 11:09 ` [PATCH 4/4] ARM: sunxi: Add sunxi restart function via onchip watchdog Stefan Roese
2012-11-19 15:43 ` Maxime Ripard
2012-11-19 16:13 ` Stefan Roese
2012-11-19 15:55 ` Arnd Bergmann
2012-11-19 15:22 ` [PATCH 1/4] ARM: sunxi: Restructure sunxi dts/dtsi files Maxime Ripard
2012-11-19 15:52 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353323383-11827-3-git-send-email-sr@denx.de \
--to=sr@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).