From patchwork Wed Oct 17 16:53:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: julien.boibessot@free.fr X-Patchwork-Id: 1607031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id DD2D8DFABE for ; Wed, 17 Oct 2012 16:55:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TOWsp-0002On-4A; Wed, 17 Oct 2012 16:54:15 +0000 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TOWsk-0002N2-J7 for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2012 16:54:12 +0000 Received: from localhost.localdomain (unknown [82.234.232.91]) by smtp2-g21.free.fr (Postfix) with ESMTP id 372E54B0047; Wed, 17 Oct 2012 18:54:00 +0200 (CEST) From: julien.boibessot@free.fr To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: mxs: Add support for the Armadeus Systems APF28 module Date: Wed, 17 Oct 2012 18:53:52 +0200 Message-Id: <1350492832-7044-1-git-send-email-julien.boibessot@free.fr> X-Mailer: git-send-email 1.7.5.4 X-Spam-Note: CRM114 invocation failed 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 ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (julien.boibessot[at]free.fr) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: shawn.guo@linaro.org, Gwenhael Goavec-Merou , Julien Boibessot 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 From: Julien Boibessot The APF28 is a small SOM built around an i.MX28 processor with 128MBytes DDR2, 256MBytes NAND Flash and an Ethernet PHY. Signed-off-by: Julien Boibessot Signed-off-by: Gwenhael Goavec-Merou --- Changes since v1 (as advised by Shawn Guo): * add imx28-apf28.dtb to arch/arm/boot/dts/Makefile * fix partitions declaration for gpmi-nand in imx28-apf28.dts arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/imx28-apf28.dts | 85 +++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 7 +++ 3 files changed, 94 insertions(+), 1 deletions(-) create mode 100644 arch/arm/boot/dts/imx28-apf28.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index c1ce813..5baf5a0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -59,7 +59,8 @@ dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \ imx28-cfa10049.dtb \ imx28-evk.dtb \ imx28-m28evk.dtb \ - imx28-tx28.dtb + imx28-tx28.dtb \ + imx28-apf28.dtb dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ omap3-beagle-xm.dtb \ omap3-evm.dtb \ diff --git a/arch/arm/boot/dts/imx28-apf28.dts b/arch/arm/boot/dts/imx28-apf28.dts new file mode 100644 index 0000000..7eb0758 --- /dev/null +++ b/arch/arm/boot/dts/imx28-apf28.dts @@ -0,0 +1,85 @@ +/* + * Copyright 2012 Armadeus Systems - + * + * 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/ "imx28.dtsi" + +/ { + model = "Armadeus Systems APF28 module"; + compatible = "armadeus,imx28-apf28", "fsl,imx28"; + + memory { + reg = <0x40000000 0x08000000>; + }; + + apb@80000000 { + apbh@80000000 { + gpmi-nand@8000c000 { + pinctrl-names = "default"; + pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; + status = "okay"; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x300000>; + }; + + partition@300000 { + label = "env"; + reg = <0x300000 0x80000>; + }; + + partition@380000 { + label = "env2"; + reg = <0x380000 0x80000>; + }; + + partition@400000 { + label = "dtb"; + reg = <0x400000 0x80000>; + }; + + partition@480000 { + label = "splash"; + reg = <0x480000 0x80000>; + }; + + partition@500000 { + label = "kernel"; + reg = <0x500000 0x800000>; + }; + + partition@d00000 { + label = "rootfs"; + reg = <0xd00000 0xf300000>; + }; + }; + }; + + apbx@80040000 { + duart: serial@80074000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + }; + }; + + ahb@80080000 { + mac0: ethernet@800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + phy-reset-gpios = <&gpio4 13 0>; + status = "okay"; + }; + }; +}; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index b8c452a..9cfb25c 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -367,6 +367,11 @@ static void __init cfa10049_init(void) update_fec_mac_prop(OUI_CRYSTALFONTZ); } +static void __init apf28_init(void) +{ + enable_clk_enet_out(); +} + static void __init mxs_machine_init(void) { if (of_machine_is_compatible("fsl,imx28-evk")) @@ -379,6 +384,8 @@ static void __init mxs_machine_init(void) apx4devkit_init(); else if (of_machine_is_compatible("crystalfontz,cfa10049")) cfa10049_init(); + else if (of_machine_is_compatible("armadeus,imx28-apf28")) + apf28_init(); of_platform_populate(NULL, of_default_bus_match_table, mxs_auxdata_lookup, NULL);