From: Dong Aisheng <b29396@freescale.com>
To: devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: vinod.koul@linux.intel.com, s.hauer@pengutronix.de,
rob.herring@calxeda.com, grant.likely@secretlab.ca,
rdunlap@xenotime.net, kernel@pengutronix.de, cjb@laptop.org,
shawn.guo@freescale.com
Subject: [PATCH v1 1/5] ARM: imx28: add basic dt support
Date: Tue, 13 Mar 2012 16:47:04 +0800 [thread overview]
Message-ID: <1331628428-24017-2-git-send-email-b29396@freescale.com> (raw)
In-Reply-To: <1331628428-24017-1-git-send-email-b29396@freescale.com>
From: Dong Aisheng <dong.aisheng@linaro.org>
This patch includes basic dt support which can boot via nfs rootfs.
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
---
Documentation/devicetree/bindings/arm/fsl.txt | 4 +
arch/arm/boot/dts/imx28-evk.dts | 31 +++++++++
arch/arm/boot/dts/imx28.dtsi | 88 +++++++++++++++++++++++++
arch/arm/mach-mxs/Kconfig | 9 +++
arch/arm/mach-mxs/Makefile | 1 +
arch/arm/mach-mxs/imx28-dt.c | 67 +++++++++++++++++++
6 files changed, 200 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index 54bddda..9f21faf 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -1,6 +1,10 @@
Freescale i.MX Platforms Device Tree Bindings
-----------------------------------------------
+i.MX28 Evaluation Kit
+Required root node properties:
+ - compatible = "fsl,imx28-evk", "fsl,imx28";
+
i.MX51 Babbage Board
Required root node properties:
- compatible = "fsl,imx51-babbage", "fsl,imx51";
diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
new file mode 100644
index 0000000..9758dc4
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-evk.dts
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ *
+ * 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 = "Freescale i.MX28 Evaluation Kit";
+ compatible = "fsl,imx28-evk", "fsl,imx28";
+
+ memory {
+ device_type = "memory";
+ reg = <0x40000000 0x08000000>;
+ };
+
+ ahb@80080000 {
+ fec@800f0000 {
+ phy-mode = "rmii";
+ local-mac-address = [00 04 9F 01 7D 5B];
+ status = "okay";
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
new file mode 100644
index 0000000..acf0dab
--- /dev/null
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ interrupt-parent = <&icoll>;
+
+ aliases {
+ serial0 = &uart1;
+ };
+
+ cpus {
+ cpu@0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ apb@80000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x80000000 0x80000>;
+ ranges;
+
+ apbh@80000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x80000000 0x3c900>;
+ ranges;
+
+ icoll: interrupt-controller@80000000 {
+ compatible = "fsl,imx28-icoll";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ reg = <0x80000000 0x2000>;
+ };
+ };
+
+ apbx@80040000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x80040000 0x40000>;
+ ranges;
+
+ uart1: uart@80074000 {
+ compatible = "arm,pl011", "arm,primecell";
+ reg = <0x80074000 0x2000>;
+ interrupts = <47>;
+ };
+ };
+ };
+
+ ahb@80080000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x80080000 0x80000>;
+ ranges;
+
+ fec@800f0000 {
+ compatible = "fsl,imx28-fec";
+ reg = <0x800f0000 0x4000>;
+ interrupts = <101>;
+ status = "disabled";
+ };
+
+ fec@800f4000 {
+ compatible = "fsl,imx28-fec";
+ reg = <0x800f4000 0x4000>;
+ interrupts = <102>;
+ status = "disabled";
+ };
+
+ };
+};
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index c57f996..6ab66af 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -17,6 +17,15 @@ config SOC_IMX28
comment "MXS platforms:"
+config MACH_IMX28_DT
+ bool "Support i.MX28 platforms from device tree"
+ select SOC_IMX28
+ select USE_OF
+ select MACH_MX28EVK
+ help
+ Include support for Freescale i.MX28 based platforms
+ using the device tree for discovery
+
config MACH_STMP378X_DEVB
bool "Support STMP378x_devb Platform"
select SOC_IMX23
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile
index 908bf9a..25a4122 100644
--- a/arch/arm/mach-mxs/Makefile
+++ b/arch/arm/mach-mxs/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_SOC_IMX23) += clock-mx23.o
obj-$(CONFIG_SOC_IMX28) += clock-mx28.o
+obj-$(CONFIG_MACH_IMX28_DT) += imx28-dt.o
obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
diff --git a/arch/arm/mach-mxs/imx28-dt.c b/arch/arm/mach-mxs/imx28-dt.c
new file mode 100644
index 0000000..78d1129
--- /dev/null
+++ b/arch/arm/mach-mxs/imx28-dt.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * 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
+ */
+
+#include <linux/init.h>
+#include <linux/irqdomain.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+#include <mach/common.h>
+#include <mach/mx28.h>
+
+static const struct of_dev_auxdata imx28_auxdata_lookup[] __initconst = {
+ OF_DEV_AUXDATA("arm,pl011", MX28_DUART_BASE_ADDR, "duart", NULL),
+ OF_DEV_AUXDATA("fsl,imx28-fec", MX28_ENET_MAC0_BASE_ADDR, "imx28-fec.0", NULL),
+ OF_DEV_AUXDATA("fsl,imx28-fec", MX28_ENET_MAC1_BASE_ADDR, "imx28-fec.1", NULL),
+ { /* sentinel */ }
+};
+
+static void __init imx28_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table,
+ imx28_auxdata_lookup, NULL);
+}
+
+static const struct of_device_id icoll_of_match[] __initconst = {
+ { .compatible = "fsl,imx28-icoll", },
+ {},
+};
+
+static void __init imx28_dt_init_irq(void)
+{
+ irq_domain_generate_simple(icoll_of_match, MX28_ICOLL_BASE_ADDR, 0);
+ mx28_init_irq();
+}
+
+static void __init imx28_timer_init(void)
+{
+ mx28_clocks_init();
+}
+
+static struct sys_timer imx28_timer = {
+ .init = imx28_timer_init,
+};
+
+static const char *imx28_dt_compat[] __initdata = {
+ "fsl,imx28-evk",
+ NULL,
+};
+
+DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)")
+ .map_io = mx28_map_io,
+ .init_irq = imx28_dt_init_irq,
+ .timer = &imx28_timer,
+ .init_machine = imx28_init,
+ .dt_compat = imx28_dt_compat,
+ .restart = mxs_restart,
+MACHINE_END
--
1.7.0.4
next prev parent reply other threads:[~2012-03-13 8:47 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 8:47 [PATCH v1 0/5] dt: add basic imx28 support Dong Aisheng
2012-03-13 8:47 ` Dong Aisheng [this message]
2012-03-13 14:35 ` [PATCH v1 1/5] ARM: imx28: add basic dt support Rob Herring
2012-03-13 14:59 ` Zach Sadecki
2012-03-13 17:28 ` Grant Likely
2012-03-14 5:38 ` Shawn Guo
2012-03-14 6:23 ` Dong Aisheng
2012-03-14 6:51 ` Marek Vasut
2012-03-14 13:05 ` Rob Herring
2012-03-15 2:57 ` Dong Aisheng
2012-03-13 17:23 ` Grant Likely
2012-03-14 5:41 ` Shawn Guo
2012-03-14 5:56 ` Marek Vasut
2012-03-14 6:30 ` Dong Aisheng
2012-03-14 12:45 ` Dong Aisheng
2012-03-14 14:16 ` s.hauer
2012-03-15 3:02 ` Dong Aisheng
2012-03-15 6:53 ` Lothar Waßmann
2012-03-15 10:59 ` Dong Aisheng
[not found] ` <20120315105927.GE13022-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-15 11:22 ` Lothar Waßmann
2012-03-16 3:01 ` Dong Aisheng
2012-03-16 7:48 ` Lothar Waßmann
2012-03-16 8:22 ` Dong Aisheng
[not found] ` <20120316030134.GA5161-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-18 18:47 ` Grant Likely
2012-03-19 6:54 ` Lothar Waßmann
[not found] ` <20326.55337.249575.289067-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2012-03-19 15:06 ` Grant Likely
2012-03-19 16:49 ` Lothar Waßmann
[not found] ` <20327.25470.723875.916422-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2012-03-19 22:02 ` Grant Likely
2012-03-20 12:49 ` Dong Aisheng
2012-03-20 13:17 ` Lothar Waßmann
2012-03-21 11:06 ` Dong Aisheng
2012-03-16 8:49 ` Shawn Guo
2012-03-15 11:24 ` s.hauer
2012-03-16 3:05 ` Dong Aisheng
2012-03-14 19:41 ` Sascha Hauer
2012-03-15 3:05 ` Dong Aisheng
2012-03-13 8:47 ` [PATCH v1 2/5] mmc: mxs-mmc: add dt probe support Dong Aisheng
2012-03-13 17:42 ` Grant Likely
2012-03-14 6:42 ` Dong Aisheng
2012-03-14 5:58 ` Marek Vasut
2012-03-14 6:55 ` Dong Aisheng
2012-03-14 7:09 ` Marek Vasut
2012-03-14 7:13 ` s.hauer
2012-03-14 7:26 ` Dong Aisheng
2012-03-14 11:17 ` Marek Vasut
2012-03-14 7:23 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 8:09 ` Dong Aisheng
[not found] ` <20120314080939.GA1180-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-14 8:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 8:47 ` [PATCH v1 3/5] ARM: imx28evk: add mmc dt support Dong Aisheng
2012-03-13 14:39 ` Rob Herring
2012-03-13 16:52 ` Sascha Hauer
2012-03-13 17:45 ` Rob Herring
2012-03-14 7:30 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 8:20 ` Dong Aisheng
2012-03-14 8:54 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 7:28 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 8:47 ` [PATCH v1 4/5] dma: mxs-dma: add dt probe support Dong Aisheng
2012-03-14 7:54 ` Huang Shijie
2012-03-14 8:23 ` Dong Aisheng
2012-03-13 8:47 ` [PATCH v1 5/5] ARM: mxs: add mxs dma dt support Dong Aisheng
2012-03-14 7:58 ` Huang Shijie
2012-03-14 8:30 ` Dong Aisheng
2012-03-14 8:43 ` Huang Shijie
2012-03-14 6:01 ` [PATCH v1 0/5] dt: add basic imx28 support Marek Vasut
2012-03-14 7:34 ` Dong Aisheng
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=1331628428-24017-2-git-send-email-b29396@freescale.com \
--to=b29396@freescale.com \
--cc=cjb@laptop.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=rob.herring@calxeda.com \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@freescale.com \
--cc=vinod.koul@linux.intel.com \
/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).