From patchwork Mon Nov 19 11:09:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1764401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id BBD093FCAE for ; Mon, 19 Nov 2012 11:12:28 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TaPEn-0002oA-Et; Mon, 19 Nov 2012 11:10:02 +0000 Received: from mo6-p05-ob.rzone.de ([2a01:238:20a:202:5305::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TaPEj-0002mm-UR for linux-arm-kernel@lists.infradead.org; Mon, 19 Nov 2012 11:09:58 +0000 X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mCZCG4i4= X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B94205.dip.t-dialin.net [87.185.66.5]) by smtp.strato.de (jored mo34) (RZmta 31.4 DYNA|AUTH) with ESMTPA id j02f1aoAJAVoL5 ; Mon, 19 Nov 2012 12:09:53 +0100 (CET) From: 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 Message-Id: <1353323383-11827-3-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1353323383-11827-1-git-send-email-sr@denx.de> References: <1353323383-11827-1-git-send-email-sr@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121119_060958_277267_A5788199 X-CRM114-Status: GOOD ( 12.74 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Maxime Ripard , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Cc: Maxime Ripard Cc: Arnd Bergmann Acked-by: Arnd Bergmann --- 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 + * + * 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"; + }; + }; +}; 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@01c28000 { + compatible = "ns8250"; + reg = <0x01c28000 0x400>; + interrupts = <1>; + reg-shift = <2>; + clock-frequency = <24000000>; + status = "disabled"; + }; + uart1: uart@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, };