* [PATCH 0/3] Initial device tree support for mxs
@ 2012-05-07 14:11 Shawn Guo
2012-05-07 14:11 ` [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board Shawn Guo
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Shawn Guo @ 2012-05-07 14:11 UTC (permalink / raw)
To: linux-arm-kernel
This series is based on mxs common clk and pinctrl support to recreate
the mxs/dt branch, which includes the initial device tree support, fec
and serial console for imx28-evk and imx23-evk boards.
Dong Aisheng (1):
ARM: mxs: add initial device tree support for imx28-evk board
Shawn Guo (2):
ARM: mxs: add initial device tree support for imx23-evk board
ARM: mxs: always build in device tree support
Documentation/devicetree/bindings/arm/fsl.txt | 8 +
arch/arm/Kconfig | 1 +
arch/arm/boot/dts/imx23-evk.dts | 32 ++
arch/arm/boot/dts/imx23.dtsi | 243 ++++++++++++++++
arch/arm/boot/dts/imx28-evk.dts | 48 +++
arch/arm/boot/dts/imx28.dtsi | 382 +++++++++++++++++++++++++
arch/arm/configs/mxs_defconfig | 1 +
arch/arm/mach-mxs/Kconfig | 10 +
arch/arm/mach-mxs/Makefile | 1 +
arch/arm/mach-mxs/devices/Kconfig | 1 -
arch/arm/mach-mxs/mach-mxs.c | 109 +++++++
drivers/clk/mxs/clk-imx23.c | 1 +
drivers/clk/mxs/clk-imx28.c | 1 +
13 files changed, 837 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/boot/dts/imx23-evk.dts
create mode 100644 arch/arm/boot/dts/imx23.dtsi
create mode 100644 arch/arm/boot/dts/imx28-evk.dts
create mode 100644 arch/arm/boot/dts/imx28.dtsi
create mode 100644 arch/arm/mach-mxs/mach-mxs.c
--
1.7.5.4
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board 2012-05-07 14:11 [PATCH 0/3] Initial device tree support for mxs Shawn Guo @ 2012-05-07 14:11 ` Shawn Guo 2012-05-07 16:09 ` Marek Vasut 2012-05-07 14:11 ` [PATCH 2/3] ARM: mxs: add initial device tree support for imx23-evk board Shawn Guo 2012-05-07 14:11 ` [PATCH 3/3] ARM: mxs: always build in device tree support Shawn Guo 2 siblings, 1 reply; 7+ messages in thread From: Shawn Guo @ 2012-05-07 14:11 UTC (permalink / raw) To: linux-arm-kernel 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> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- Documentation/devicetree/bindings/arm/fsl.txt | 4 + arch/arm/boot/dts/imx28-evk.dts | 48 +++ arch/arm/boot/dts/imx28.dtsi | 382 +++++++++++++++++++++++++ arch/arm/mach-mxs/Kconfig | 10 + arch/arm/mach-mxs/Makefile | 1 + arch/arm/mach-mxs/devices/Kconfig | 1 - arch/arm/mach-mxs/mach-mxs.c | 85 ++++++ drivers/clk/mxs/clk-imx28.c | 1 + 8 files changed, 531 insertions(+), 1 deletions(-) create mode 100644 arch/arm/boot/dts/imx28-evk.dts create mode 100644 arch/arm/boot/dts/imx28.dtsi create mode 100644 arch/arm/mach-mxs/mach-mxs.c diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index bfbc771..fecb580 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..5aee8ed --- /dev/null +++ b/arch/arm/boot/dts/imx28-evk.dts @@ -0,0 +1,48 @@ +/* + * 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 { + reg = <0x40000000 0x08000000>; + }; + + apb at 80000000 { + apbx at 80040000 { + duart: serial at 80074000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + }; + }; + + ahb at 80080000 { + mac0: ethernet at 800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + status = "okay"; + }; + + mac1: ethernet at 800f4000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac1_pins_a>; + status = "okay"; + }; + }; +}; diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi new file mode 100644 index 0000000..5daf757 --- /dev/null +++ b/arch/arm/boot/dts/imx28.dtsi @@ -0,0 +1,382 @@ +/* + * 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" + +/ { + interrupt-parent = <&icoll>; + + cpus { + cpu at 0 { + compatible = "arm,arm926ejs"; + }; + }; + + apb at 80000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80000000 0x80000>; + ranges; + + apbh at 80000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80000000 0x3c900>; + ranges; + + icoll: interrupt-controller at 80000000 { + compatible = "fsl,imx28-icoll", "fsl,mxs-icoll"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x80000000 0x2000>; + }; + + hsadc at 80002000 { + reg = <0x80002000 2000>; + interrupts = <13 87>; + status = "disabled"; + }; + + dma-apbh at 80004000 { + reg = <0x80004000 2000>; + status = "disabled"; + }; + + perfmon at 80006000 { + reg = <0x80006000 800>; + interrupts = <27>; + status = "disabled"; + }; + + bch at 8000a000 { + reg = <0x8000a000 2000>; + interrupts = <41>; + status = "disabled"; + }; + + gpmi at 8000c000 { + reg = <0x8000c000 2000>; + interrupts = <42 88>; + status = "disabled"; + }; + + ssp0: ssp at 80010000 { + reg = <0x80010000 2000>; + interrupts = <96 82>; + status = "disabled"; + }; + + ssp1: ssp at 80012000 { + reg = <0x80012000 2000>; + interrupts = <97 83>; + status = "disabled"; + }; + + ssp2: ssp at 80014000 { + reg = <0x80014000 2000>; + interrupts = <98 84>; + status = "disabled"; + }; + + ssp3: ssp at 80016000 { + reg = <0x80016000 2000>; + interrupts = <99 85>; + status = "disabled"; + }; + + pinctrl at 80018000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx28-pinctrl"; + reg = <0x80018000 2000>; + + duart_pins_a: duart at 0 { + reg = <0>; + fsl,pinmux-ids = <0x3102 0x3112>; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + mac0_pins_a: mac0 at 0 { + reg = <0>; + fsl,pinmux-ids = <0x4000 0x4010 0x4020 + 0x4030 0x4040 0x4060 0x4070 + 0x4080 0x4100>; + fsl,drive-strength = <1>; + fsl,voltage = <1>; + fsl,pull-up = <1>; + }; + + mac1_pins_a: mac1 at 0 { + reg = <0>; + fsl,pinmux-ids = <0x40f1 0x4091 0x40a1 + 0x40e1 0x40b1 0x40c1>; + fsl,drive-strength = <1>; + fsl,voltage = <1>; + fsl,pull-up = <1>; + }; + }; + + digctl at 8001c000 { + reg = <0x8001c000 2000>; + interrupts = <89>; + status = "disabled"; + }; + + etm at 80022000 { + reg = <0x80022000 2000>; + status = "disabled"; + }; + + dma-apbx at 80024000 { + reg = <0x80024000 2000>; + status = "disabled"; + }; + + dcp at 80028000 { + reg = <0x80028000 2000>; + interrupts = <52 53 54>; + status = "disabled"; + }; + + pxp at 8002a000 { + reg = <0x8002a000 2000>; + interrupts = <39>; + status = "disabled"; + }; + + ocotp at 8002c000 { + reg = <0x8002c000 2000>; + status = "disabled"; + }; + + axi-ahb at 8002e000 { + reg = <0x8002e000 2000>; + status = "disabled"; + }; + + lcdif at 80030000 { + reg = <0x80030000 2000>; + interrupts = <38 86>; + status = "disabled"; + }; + + can0: can at 80032000 { + reg = <0x80032000 2000>; + interrupts = <8>; + status = "disabled"; + }; + + can1: can at 80034000 { + reg = <0x80034000 2000>; + interrupts = <9>; + status = "disabled"; + }; + + simdbg at 8003c000 { + reg = <0x8003c000 200>; + status = "disabled"; + }; + + simgpmisel at 8003c200 { + reg = <0x8003c200 100>; + status = "disabled"; + }; + + simsspsel at 8003c300 { + reg = <0x8003c300 100>; + status = "disabled"; + }; + + simmemsel at 8003c400 { + reg = <0x8003c400 100>; + status = "disabled"; + }; + + gpiomon at 8003c500 { + reg = <0x8003c500 100>; + status = "disabled"; + }; + + simenet at 8003c700 { + reg = <0x8003c700 100>; + status = "disabled"; + }; + + armjtag at 8003c800 { + reg = <0x8003c800 100>; + status = "disabled"; + }; + }; + + apbx at 80040000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80040000 0x40000>; + ranges; + + clkctl at 80040000 { + reg = <0x80040000 2000>; + status = "disabled"; + }; + + saif0: saif at 80042000 { + reg = <0x80042000 2000>; + interrupts = <59 80>; + status = "disabled"; + }; + + power at 80044000 { + reg = <0x80044000 2000>; + status = "disabled"; + }; + + saif1: saif at 80046000 { + reg = <0x80046000 2000>; + interrupts = <58 81>; + status = "disabled"; + }; + + lradc at 80050000 { + reg = <0x80050000 2000>; + status = "disabled"; + }; + + spdif at 80054000 { + reg = <0x80054000 2000>; + interrupts = <45 66>; + status = "disabled"; + }; + + rtc at 80056000 { + reg = <0x80056000 2000>; + interrupts = <28 29>; + status = "disabled"; + }; + + i2c0: i2c at 80058000 { + reg = <0x80058000 2000>; + interrupts = <111 68>; + status = "disabled"; + }; + + i2c1: i2c at 8005a000 { + reg = <0x8005a000 2000>; + interrupts = <110 69>; + status = "disabled"; + }; + + pwm at 80064000 { + reg = <0x80064000 2000>; + status = "disabled"; + }; + + timrot at 80068000 { + reg = <0x80068000 2000>; + status = "disabled"; + }; + + auart0: serial at 8006a000 { + reg = <0x8006a000 0x2000>; + interrupts = <112 70 71>; + status = "disabled"; + }; + + auart1: serial at 8006c000 { + reg = <0x8006c000 0x2000>; + interrupts = <113 72 73>; + status = "disabled"; + }; + + auart2: serial at 8006e000 { + reg = <0x8006e000 0x2000>; + interrupts = <114 74 75>; + status = "disabled"; + }; + + auart3: serial at 80070000 { + reg = <0x80070000 0x2000>; + interrupts = <115 76 77>; + status = "disabled"; + }; + + auart4: serial at 80072000 { + reg = <0x80072000 0x2000>; + interrupts = <116 78 79>; + status = "disabled"; + }; + + duart: serial at 80074000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x80074000 0x1000>; + interrupts = <47>; + status = "disabled"; + }; + + usbphy0: usbphy at 8007c000 { + reg = <0x8007c000 0x2000>; + status = "disabled"; + }; + + usbphy1: usbphy at 8007e000 { + reg = <0x8007e000 0x2000>; + status = "disabled"; + }; + }; + }; + + ahb at 80080000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80080000 0x80000>; + ranges; + + usbctrl0: usbctrl at 80080000 { + reg = <0x80080000 0x10000>; + status = "disabled"; + }; + + usbctrl1: usbctrl at 80090000 { + reg = <0x80090000 0x10000>; + status = "disabled"; + }; + + dflpt at 800c0000 { + reg = <0x800c0000 0x10000>; + status = "disabled"; + }; + + mac0: ethernet at 800f0000 { + compatible = "fsl,imx28-fec"; + reg = <0x800f0000 0x4000>; + interrupts = <101>; + status = "disabled"; + }; + + mac1: ethernet at 800f4000 { + compatible = "fsl,imx28-fec"; + reg = <0x800f4000 0x4000>; + interrupts = <102>; + status = "disabled"; + }; + + switch at 800f8000 { + reg = <0x800f8000 0x8000>; + status = "disabled"; + }; + + }; +}; diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 07d5383..15bb4e2 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -7,18 +7,28 @@ config MXS_OCOTP config SOC_IMX23 bool + select ARM_AMBA select CPU_ARM926T select HAVE_PWM select PINCTRL_IMX23 config SOC_IMX28 bool + select ARM_AMBA select CPU_ARM926T select HAVE_PWM select PINCTRL_IMX28 comment "MXS platforms:" +config MACH_MXS_DT + bool "Support MXS platforms from device tree" + select SOC_IMX28 + select USE_OF + help + Include support for Freescale MXS platforms(i.MX23 and i.MX28) + 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 6ce21a2..e41590c 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile @@ -4,6 +4,7 @@ obj-y := devices.o icoll.o iomux.o system.o timer.o mm.o obj-$(CONFIG_MXS_OCOTP) += ocotp.o obj-$(CONFIG_PM) += pm.o +obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.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/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig index b8913df..19659de 100644 --- a/arch/arm/mach-mxs/devices/Kconfig +++ b/arch/arm/mach-mxs/devices/Kconfig @@ -1,6 +1,5 @@ config MXS_HAVE_AMBA_DUART bool - select ARM_AMBA config MXS_HAVE_PLATFORM_AUART bool diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c new file mode 100644 index 0000000..5d81a23 --- /dev/null +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -0,0 +1,85 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * Copyright 2012 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/clk.h> +#include <linux/clkdev.h> +#include <linux/err.h> +#include <linux/init.h> +#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> + +static int __init mxs_icoll_add_irq_domain(struct device_node *np, + struct device_node *interrupt_parent) +{ + irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL); + + return 0; +} + +static const struct of_device_id mxs_irq_match[] __initconst = { + { .compatible = "fsl,mxs-icoll", .data = mxs_icoll_add_irq_domain, }, + { /* sentinel */ } +}; + +static void __init mxs_dt_init_irq(void) +{ + icoll_init_irq(); + of_irq_init(mxs_irq_match); +} + +static void __init imx28_timer_init(void) +{ + mx28_clocks_init(); +} + +static struct sys_timer imx28_timer = { + .init = imx28_timer_init, +}; + +static void __init imx28_evk_init(void) +{ + struct clk *clk; + + /* Enable fec phy clock */ + clk = clk_get_sys("enet_out", NULL); + if (!IS_ERR(clk)) + clk_prepare_enable(clk); +} + +static void __init mxs_machine_init(void) +{ + if (of_machine_is_compatible("fsl,imx28-evk")) + imx28_evk_init(); + + of_platform_populate(NULL, of_default_bus_match_table, + NULL, NULL); +} + +static const char *imx28_dt_compat[] __initdata = { + "fsl,imx28-evk", + "fsl,imx28", + NULL, +}; + +DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)") + .map_io = mx28_map_io, + .init_irq = mxs_dt_init_irq, + .timer = &imx28_timer, + .init_machine = mxs_machine_init, + .dt_compat = imx28_dt_compat, + .restart = mxs_restart, +MACHINE_END diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index 2ae0d3d..92b6ce0 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -133,6 +133,7 @@ static struct clk_lookup hbus_lookups[] __initdata = { static struct clk_lookup xbus_lookups[] __initdata = { { .dev_id = "duart", .con_id = "apb_pclk"}, + { .dev_id = "80074000.serial", .con_id = "apb_pclk"}, { .dev_id = "mxs-dma-apbx", }, { .dev_id = "80024000.dma-apbx", }, }; -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board 2012-05-07 14:11 ` [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board Shawn Guo @ 2012-05-07 16:09 ` Marek Vasut 0 siblings, 0 replies; 7+ messages in thread From: Marek Vasut @ 2012-05-07 16:09 UTC (permalink / raw) To: linux-arm-kernel Dear Shawn Guo, > 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> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marek Vasut <marex@denx.de> > --- > Documentation/devicetree/bindings/arm/fsl.txt | 4 + > arch/arm/boot/dts/imx28-evk.dts | 48 +++ > arch/arm/boot/dts/imx28.dtsi | 382 > +++++++++++++++++++++++++ arch/arm/mach-mxs/Kconfig | > 10 + > arch/arm/mach-mxs/Makefile | 1 + > arch/arm/mach-mxs/devices/Kconfig | 1 - > arch/arm/mach-mxs/mach-mxs.c | 85 ++++++ > drivers/clk/mxs/clk-imx28.c | 1 + > 8 files changed, 531 insertions(+), 1 deletions(-) > create mode 100644 arch/arm/boot/dts/imx28-evk.dts > create mode 100644 arch/arm/boot/dts/imx28.dtsi > create mode 100644 arch/arm/mach-mxs/mach-mxs.c > > diff --git a/Documentation/devicetree/bindings/arm/fsl.txt > b/Documentation/devicetree/bindings/arm/fsl.txt index bfbc771..fecb580 > 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..5aee8ed > --- /dev/null > +++ b/arch/arm/boot/dts/imx28-evk.dts > @@ -0,0 +1,48 @@ > +/* > + * 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 { > + reg = <0x40000000 0x08000000>; > + }; > + > + apb at 80000000 { > + apbx at 80040000 { > + duart: serial at 80074000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&duart_pins_a>; > + status = "okay"; > + }; > + }; > + }; > + > + ahb at 80080000 { > + mac0: ethernet at 800f0000 { > + phy-mode = "rmii"; > + pinctrl-names = "default"; > + pinctrl-0 = <&mac0_pins_a>; > + status = "okay"; > + }; > + > + mac1: ethernet at 800f4000 { > + phy-mode = "rmii"; > + pinctrl-names = "default"; > + pinctrl-0 = <&mac1_pins_a>; > + status = "okay"; > + }; > + }; > +}; > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi > new file mode 100644 > index 0000000..5daf757 > --- /dev/null > +++ b/arch/arm/boot/dts/imx28.dtsi > @@ -0,0 +1,382 @@ > +/* > + * 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" > + > +/ { > + interrupt-parent = <&icoll>; > + > + cpus { > + cpu at 0 { > + compatible = "arm,arm926ejs"; > + }; > + }; > + > + apb at 80000000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80000000 0x80000>; > + ranges; > + > + apbh at 80000000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80000000 0x3c900>; > + ranges; > + > + icoll: interrupt-controller at 80000000 { > + compatible = "fsl,imx28-icoll", "fsl,mxs-icoll"; > + interrupt-controller; > + #interrupt-cells = <1>; > + reg = <0x80000000 0x2000>; > + }; > + > + hsadc at 80002000 { > + reg = <0x80002000 2000>; > + interrupts = <13 87>; > + status = "disabled"; > + }; > + > + dma-apbh at 80004000 { > + reg = <0x80004000 2000>; > + status = "disabled"; > + }; > + > + perfmon at 80006000 { > + reg = <0x80006000 800>; > + interrupts = <27>; > + status = "disabled"; > + }; > + > + bch at 8000a000 { > + reg = <0x8000a000 2000>; > + interrupts = <41>; > + status = "disabled"; > + }; > + > + gpmi at 8000c000 { > + reg = <0x8000c000 2000>; > + interrupts = <42 88>; > + status = "disabled"; > + }; > + > + ssp0: ssp at 80010000 { > + reg = <0x80010000 2000>; > + interrupts = <96 82>; > + status = "disabled"; > + }; > + > + ssp1: ssp at 80012000 { > + reg = <0x80012000 2000>; > + interrupts = <97 83>; > + status = "disabled"; > + }; > + > + ssp2: ssp at 80014000 { > + reg = <0x80014000 2000>; > + interrupts = <98 84>; > + status = "disabled"; > + }; > + > + ssp3: ssp at 80016000 { > + reg = <0x80016000 2000>; > + interrupts = <99 85>; > + status = "disabled"; > + }; > + > + pinctrl at 80018000 { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "fsl,imx28-pinctrl"; > + reg = <0x80018000 2000>; > + > + duart_pins_a: duart at 0 { > + reg = <0>; > + fsl,pinmux-ids = <0x3102 0x3112>; > + fsl,drive-strength = <0>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > + > + mac0_pins_a: mac0 at 0 { > + reg = <0>; > + fsl,pinmux-ids = <0x4000 0x4010 0x4020 > + 0x4030 0x4040 0x4060 0x4070 > + 0x4080 0x4100>; > + fsl,drive-strength = <1>; > + fsl,voltage = <1>; > + fsl,pull-up = <1>; > + }; > + > + mac1_pins_a: mac1 at 0 { > + reg = <0>; > + fsl,pinmux-ids = <0x40f1 0x4091 0x40a1 > + 0x40e1 0x40b1 0x40c1>; > + fsl,drive-strength = <1>; > + fsl,voltage = <1>; > + fsl,pull-up = <1>; > + }; > + }; > + > + digctl at 8001c000 { > + reg = <0x8001c000 2000>; > + interrupts = <89>; > + status = "disabled"; > + }; > + > + etm at 80022000 { > + reg = <0x80022000 2000>; > + status = "disabled"; > + }; > + > + dma-apbx at 80024000 { > + reg = <0x80024000 2000>; > + status = "disabled"; > + }; > + > + dcp at 80028000 { > + reg = <0x80028000 2000>; > + interrupts = <52 53 54>; > + status = "disabled"; > + }; > + > + pxp at 8002a000 { > + reg = <0x8002a000 2000>; > + interrupts = <39>; > + status = "disabled"; > + }; > + > + ocotp at 8002c000 { > + reg = <0x8002c000 2000>; > + status = "disabled"; > + }; > + > + axi-ahb at 8002e000 { > + reg = <0x8002e000 2000>; > + status = "disabled"; > + }; > + > + lcdif at 80030000 { > + reg = <0x80030000 2000>; > + interrupts = <38 86>; > + status = "disabled"; > + }; > + > + can0: can at 80032000 { > + reg = <0x80032000 2000>; > + interrupts = <8>; > + status = "disabled"; > + }; > + > + can1: can at 80034000 { > + reg = <0x80034000 2000>; > + interrupts = <9>; > + status = "disabled"; > + }; > + > + simdbg at 8003c000 { > + reg = <0x8003c000 200>; > + status = "disabled"; > + }; > + > + simgpmisel at 8003c200 { > + reg = <0x8003c200 100>; > + status = "disabled"; > + }; > + > + simsspsel at 8003c300 { > + reg = <0x8003c300 100>; > + status = "disabled"; > + }; > + > + simmemsel at 8003c400 { > + reg = <0x8003c400 100>; > + status = "disabled"; > + }; > + > + gpiomon at 8003c500 { > + reg = <0x8003c500 100>; > + status = "disabled"; > + }; > + > + simenet at 8003c700 { > + reg = <0x8003c700 100>; > + status = "disabled"; > + }; > + > + armjtag at 8003c800 { > + reg = <0x8003c800 100>; > + status = "disabled"; > + }; > + }; > + > + apbx at 80040000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80040000 0x40000>; > + ranges; > + > + clkctl at 80040000 { > + reg = <0x80040000 2000>; > + status = "disabled"; > + }; > + > + saif0: saif at 80042000 { > + reg = <0x80042000 2000>; > + interrupts = <59 80>; > + status = "disabled"; > + }; > + > + power at 80044000 { > + reg = <0x80044000 2000>; > + status = "disabled"; > + }; > + > + saif1: saif at 80046000 { > + reg = <0x80046000 2000>; > + interrupts = <58 81>; > + status = "disabled"; > + }; > + > + lradc at 80050000 { > + reg = <0x80050000 2000>; > + status = "disabled"; > + }; > + > + spdif at 80054000 { > + reg = <0x80054000 2000>; > + interrupts = <45 66>; > + status = "disabled"; > + }; > + > + rtc at 80056000 { > + reg = <0x80056000 2000>; > + interrupts = <28 29>; > + status = "disabled"; > + }; > + > + i2c0: i2c at 80058000 { > + reg = <0x80058000 2000>; > + interrupts = <111 68>; > + status = "disabled"; > + }; > + > + i2c1: i2c at 8005a000 { > + reg = <0x8005a000 2000>; > + interrupts = <110 69>; > + status = "disabled"; > + }; > + > + pwm at 80064000 { > + reg = <0x80064000 2000>; > + status = "disabled"; > + }; > + > + timrot at 80068000 { > + reg = <0x80068000 2000>; > + status = "disabled"; > + }; > + > + auart0: serial at 8006a000 { > + reg = <0x8006a000 0x2000>; > + interrupts = <112 70 71>; > + status = "disabled"; > + }; > + > + auart1: serial at 8006c000 { > + reg = <0x8006c000 0x2000>; > + interrupts = <113 72 73>; > + status = "disabled"; > + }; > + > + auart2: serial at 8006e000 { > + reg = <0x8006e000 0x2000>; > + interrupts = <114 74 75>; > + status = "disabled"; > + }; > + > + auart3: serial at 80070000 { > + reg = <0x80070000 0x2000>; > + interrupts = <115 76 77>; > + status = "disabled"; > + }; > + > + auart4: serial at 80072000 { > + reg = <0x80072000 0x2000>; > + interrupts = <116 78 79>; > + status = "disabled"; > + }; > + > + duart: serial at 80074000 { > + compatible = "arm,pl011", "arm,primecell"; > + reg = <0x80074000 0x1000>; > + interrupts = <47>; > + status = "disabled"; > + }; > + > + usbphy0: usbphy at 8007c000 { > + reg = <0x8007c000 0x2000>; > + status = "disabled"; > + }; > + > + usbphy1: usbphy at 8007e000 { > + reg = <0x8007e000 0x2000>; > + status = "disabled"; > + }; > + }; > + }; > + > + ahb at 80080000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80080000 0x80000>; > + ranges; > + > + usbctrl0: usbctrl at 80080000 { > + reg = <0x80080000 0x10000>; > + status = "disabled"; > + }; > + > + usbctrl1: usbctrl at 80090000 { > + reg = <0x80090000 0x10000>; > + status = "disabled"; > + }; > + > + dflpt at 800c0000 { > + reg = <0x800c0000 0x10000>; > + status = "disabled"; > + }; > + > + mac0: ethernet at 800f0000 { > + compatible = "fsl,imx28-fec"; > + reg = <0x800f0000 0x4000>; > + interrupts = <101>; > + status = "disabled"; > + }; > + > + mac1: ethernet at 800f4000 { > + compatible = "fsl,imx28-fec"; > + reg = <0x800f4000 0x4000>; > + interrupts = <102>; > + status = "disabled"; > + }; > + > + switch at 800f8000 { > + reg = <0x800f8000 0x8000>; > + status = "disabled"; > + }; > + > + }; > +}; > diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig > index 07d5383..15bb4e2 100644 > --- a/arch/arm/mach-mxs/Kconfig > +++ b/arch/arm/mach-mxs/Kconfig > @@ -7,18 +7,28 @@ config MXS_OCOTP > > config SOC_IMX23 > bool > + select ARM_AMBA > select CPU_ARM926T > select HAVE_PWM > select PINCTRL_IMX23 > > config SOC_IMX28 > bool > + select ARM_AMBA > select CPU_ARM926T > select HAVE_PWM > select PINCTRL_IMX28 > > comment "MXS platforms:" > > +config MACH_MXS_DT > + bool "Support MXS platforms from device tree" > + select SOC_IMX28 > + select USE_OF > + help > + Include support for Freescale MXS platforms(i.MX23 and i.MX28) > + 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 6ce21a2..e41590c 100644 > --- a/arch/arm/mach-mxs/Makefile > +++ b/arch/arm/mach-mxs/Makefile > @@ -4,6 +4,7 @@ obj-y := devices.o icoll.o iomux.o system.o timer.o mm.o > obj-$(CONFIG_MXS_OCOTP) += ocotp.o > obj-$(CONFIG_PM) += pm.o > > +obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.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/devices/Kconfig > b/arch/arm/mach-mxs/devices/Kconfig index b8913df..19659de 100644 > --- a/arch/arm/mach-mxs/devices/Kconfig > +++ b/arch/arm/mach-mxs/devices/Kconfig > @@ -1,6 +1,5 @@ > config MXS_HAVE_AMBA_DUART > bool > - select ARM_AMBA > > config MXS_HAVE_PLATFORM_AUART > bool > diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c > new file mode 100644 > index 0000000..5d81a23 > --- /dev/null > +++ b/arch/arm/mach-mxs/mach-mxs.c > @@ -0,0 +1,85 @@ > +/* > + * Copyright 2012 Freescale Semiconductor, Inc. > + * Copyright 2012 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/clk.h> > +#include <linux/clkdev.h> > +#include <linux/err.h> > +#include <linux/init.h> > +#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> > + > +static int __init mxs_icoll_add_irq_domain(struct device_node *np, > + struct device_node *interrupt_parent) > +{ > + irq_domain_add_legacy(np, 128, 0, 0, &irq_domain_simple_ops, NULL); > + > + return 0; > +} > + > +static const struct of_device_id mxs_irq_match[] __initconst = { > + { .compatible = "fsl,mxs-icoll", .data = mxs_icoll_add_irq_domain, }, > + { /* sentinel */ } > +}; > + > +static void __init mxs_dt_init_irq(void) > +{ > + icoll_init_irq(); > + of_irq_init(mxs_irq_match); > +} > + > +static void __init imx28_timer_init(void) > +{ > + mx28_clocks_init(); > +} > + > +static struct sys_timer imx28_timer = { > + .init = imx28_timer_init, > +}; > + > +static void __init imx28_evk_init(void) > +{ > + struct clk *clk; > + > + /* Enable fec phy clock */ > + clk = clk_get_sys("enet_out", NULL); > + if (!IS_ERR(clk)) > + clk_prepare_enable(clk); > +} > + > +static void __init mxs_machine_init(void) > +{ > + if (of_machine_is_compatible("fsl,imx28-evk")) > + imx28_evk_init(); > + > + of_platform_populate(NULL, of_default_bus_match_table, > + NULL, NULL); > +} > + > +static const char *imx28_dt_compat[] __initdata = { > + "fsl,imx28-evk", > + "fsl,imx28", > + NULL, > +}; > + > +DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)") > + .map_io = mx28_map_io, > + .init_irq = mxs_dt_init_irq, > + .timer = &imx28_timer, > + .init_machine = mxs_machine_init, > + .dt_compat = imx28_dt_compat, > + .restart = mxs_restart, > +MACHINE_END > diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c > index 2ae0d3d..92b6ce0 100644 > --- a/drivers/clk/mxs/clk-imx28.c > +++ b/drivers/clk/mxs/clk-imx28.c > @@ -133,6 +133,7 @@ static struct clk_lookup hbus_lookups[] __initdata = { > > static struct clk_lookup xbus_lookups[] __initdata = { > { .dev_id = "duart", .con_id = "apb_pclk"}, > + { .dev_id = "80074000.serial", .con_id = "apb_pclk"}, > { .dev_id = "mxs-dma-apbx", }, > { .dev_id = "80024000.dma-apbx", }, > }; ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] ARM: mxs: add initial device tree support for imx23-evk board 2012-05-07 14:11 [PATCH 0/3] Initial device tree support for mxs Shawn Guo 2012-05-07 14:11 ` [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board Shawn Guo @ 2012-05-07 14:11 ` Shawn Guo 2012-05-07 16:11 ` Marek Vasut 2012-05-07 14:11 ` [PATCH 3/3] ARM: mxs: always build in device tree support Shawn Guo 2 siblings, 1 reply; 7+ messages in thread From: Shawn Guo @ 2012-05-07 14:11 UTC (permalink / raw) To: linux-arm-kernel It adds initial device tree support for imx23-evk board, and only serial console is enabled. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- Documentation/devicetree/bindings/arm/fsl.txt | 4 + arch/arm/boot/dts/imx23-evk.dts | 32 ++++ arch/arm/boot/dts/imx23.dtsi | 243 +++++++++++++++++++++++++ arch/arm/mach-mxs/Kconfig | 1 + arch/arm/mach-mxs/mach-mxs.c | 24 +++ drivers/clk/mxs/clk-imx23.c | 1 + 6 files changed, 305 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/imx23-evk.dts create mode 100644 arch/arm/boot/dts/imx23.dtsi diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index fecb580..1708df5 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.MX23 Evaluation Kit +Required root node properties: + - compatible = "fsl,imx23-evk", "fsl,imx23"; + i.MX28 Evaluation Kit Required root node properties: - compatible = "fsl,imx28-evk", "fsl,imx28"; diff --git a/arch/arm/boot/dts/imx23-evk.dts b/arch/arm/boot/dts/imx23-evk.dts new file mode 100644 index 0000000..8cad51e --- /dev/null +++ b/arch/arm/boot/dts/imx23-evk.dts @@ -0,0 +1,32 @@ +/* + * 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/ "imx23.dtsi" + +/ { + model = "Freescale i.MX23 Evaluation Kit"; + compatible = "fsl,imx23-evk", "fsl,imx23"; + + memory { + reg = <0x40000000 0x08000000>; + }; + + apb at 80000000 { + apbx at 80040000 { + duart: serial at 80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi new file mode 100644 index 0000000..fb09ccd --- /dev/null +++ b/arch/arm/boot/dts/imx23.dtsi @@ -0,0 +1,243 @@ +/* + * 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" + +/ { + interrupt-parent = <&icoll>; + + cpus { + cpu at 0 { + compatible = "arm,arm926ejs"; + }; + }; + + apb at 80000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80000000 0x80000>; + ranges; + + apbh at 80000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80000000 0x40000>; + ranges; + + icoll: interrupt-controller at 80000000 { + compatible = "fsl,imx23-icoll", "fsl,mxs-icoll"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x80000000 0x2000>; + }; + + dma-apbh at 80004000 { + reg = <0x80004000 2000>; + status = "disabled"; + }; + + ecc at 80008000 { + reg = <0x80008000 2000>; + status = "disabled"; + }; + + bch at 8000a000 { + reg = <0x8000a000 2000>; + status = "disabled"; + }; + + gpmi at 8000c000 { + reg = <0x8000c000 2000>; + status = "disabled"; + }; + + ssp0: ssp at 80010000 { + reg = <0x80010000 2000>; + status = "disabled"; + }; + + etm at 80014000 { + reg = <0x80014000 2000>; + status = "disabled"; + }; + + pinctrl at 80018000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx23-pinctrl"; + reg = <0x80018000 2000>; + + duart_pins_a: duart at 0 { + reg = <0>; + fsl,pinmux-ids = <0x11a2 0x11b2>; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + + digctl at 8001c000 { + reg = <0x8001c000 2000>; + status = "disabled"; + }; + + emi at 80020000 { + reg = <0x80020000 2000>; + status = "disabled"; + }; + + dma-apbx at 80024000 { + reg = <0x80024000 2000>; + status = "disabled"; + }; + + dcp at 80028000 { + reg = <0x80028000 2000>; + status = "disabled"; + }; + + pxp at 8002a000 { + reg = <0x8002a000 2000>; + status = "disabled"; + }; + + ocotp at 8002c000 { + reg = <0x8002c000 2000>; + status = "disabled"; + }; + + axi-ahb at 8002e000 { + reg = <0x8002e000 2000>; + status = "disabled"; + }; + + lcdif at 80030000 { + reg = <0x80030000 2000>; + status = "disabled"; + }; + + ssp1: ssp at 80034000 { + reg = <0x80034000 2000>; + status = "disabled"; + }; + + tvenc at 80038000 { + reg = <0x80038000 2000>; + status = "disabled"; + }; + }; + + apbx at 80040000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80040000 0x40000>; + ranges; + + clkctl at 80040000 { + reg = <0x80040000 2000>; + status = "disabled"; + }; + + saif0: saif at 80042000 { + reg = <0x80042000 2000>; + status = "disabled"; + }; + + power at 80044000 { + reg = <0x80044000 2000>; + status = "disabled"; + }; + + saif1: saif at 80046000 { + reg = <0x80046000 2000>; + status = "disabled"; + }; + + audio-out at 80048000 { + reg = <0x80048000 2000>; + status = "disabled"; + }; + + audio-in at 8004c000 { + reg = <0x8004c000 2000>; + status = "disabled"; + }; + + lradc at 80050000 { + reg = <0x80050000 2000>; + status = "disabled"; + }; + + spdif at 80054000 { + reg = <0x80054000 2000>; + status = "disabled"; + }; + + i2c at 80058000 { + reg = <0x80058000 2000>; + status = "disabled"; + }; + + rtc at 8005c000 { + reg = <0x8005c000 2000>; + status = "disabled"; + }; + + pwm at 80064000 { + reg = <0x80064000 2000>; + status = "disabled"; + }; + + timrot at 80068000 { + reg = <0x80068000 2000>; + status = "disabled"; + }; + + auart0: serial at 8006c000 { + reg = <0x8006c000 0x2000>; + status = "disabled"; + }; + + auart1: serial at 8006e000 { + reg = <0x8006e000 0x2000>; + status = "disabled"; + }; + + duart: serial at 80070000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x80070000 0x2000>; + interrupts = <0>; + status = "disabled"; + }; + + usbphy at 8007c000 { + reg = <0x8007c000 0x2000>; + status = "disabled"; + }; + }; + }; + + ahb at 80080000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x80080000 0x80000>; + ranges; + + usbctrl at 80080000 { + reg = <0x80080000 0x10000>; + status = "disabled"; + }; + }; +}; diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 15bb4e2..8138a13 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -23,6 +23,7 @@ comment "MXS platforms:" config MACH_MXS_DT bool "Support MXS platforms from device tree" + select SOC_IMX23 select SOC_IMX28 select USE_OF help diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 5d81a23..182ea75 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -41,6 +41,15 @@ static void __init mxs_dt_init_irq(void) of_irq_init(mxs_irq_match); } +static void __init imx23_timer_init(void) +{ + mx23_clocks_init(); +} + +static struct sys_timer imx23_timer = { + .init = imx23_timer_init, +}; + static void __init imx28_timer_init(void) { mx28_clocks_init(); @@ -69,12 +78,27 @@ static void __init mxs_machine_init(void) NULL, NULL); } +static const char *imx23_dt_compat[] __initdata = { + "fsl,imx23-evk", + "fsl,imx23", + NULL, +}; + static const char *imx28_dt_compat[] __initdata = { "fsl,imx28-evk", "fsl,imx28", NULL, }; +DT_MACHINE_START(IMX23, "Freescale i.MX23 (Device Tree)") + .map_io = mx23_map_io, + .init_irq = mxs_dt_init_irq, + .timer = &imx23_timer, + .init_machine = mxs_machine_init, + .dt_compat = imx23_dt_compat, + .restart = mxs_restart, +MACHINE_END + DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)") .map_io = mx28_map_io, .init_irq = mxs_dt_init_irq, diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c index dcae112..07fe1f1 100644 --- a/drivers/clk/mxs/clk-imx23.c +++ b/drivers/clk/mxs/clk-imx23.c @@ -87,6 +87,7 @@ static struct clk_lookup hbus_lookups[] __initdata = { static struct clk_lookup xbus_lookups[] __initdata = { { .dev_id = "duart", .con_id = "apb_pclk"}, + { .dev_id = "80070000.serial", .con_id = "apb_pclk"}, { .dev_id = "mxs-dma-apbx", }, { .dev_id = "80024000.dma-apbx", }, }; -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] ARM: mxs: add initial device tree support for imx23-evk board 2012-05-07 14:11 ` [PATCH 2/3] ARM: mxs: add initial device tree support for imx23-evk board Shawn Guo @ 2012-05-07 16:11 ` Marek Vasut 0 siblings, 0 replies; 7+ messages in thread From: Marek Vasut @ 2012-05-07 16:11 UTC (permalink / raw) To: linux-arm-kernel Dear Shawn Guo, > It adds initial device tree support for imx23-evk board, and only > serial console is enabled. > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marek Vasut <marex@denx.de> > --- > Documentation/devicetree/bindings/arm/fsl.txt | 4 + > arch/arm/boot/dts/imx23-evk.dts | 32 ++++ > arch/arm/boot/dts/imx23.dtsi | 243 > +++++++++++++++++++++++++ arch/arm/mach-mxs/Kconfig | > 1 + > arch/arm/mach-mxs/mach-mxs.c | 24 +++ > drivers/clk/mxs/clk-imx23.c | 1 + > 6 files changed, 305 insertions(+), 0 deletions(-) > create mode 100644 arch/arm/boot/dts/imx23-evk.dts > create mode 100644 arch/arm/boot/dts/imx23.dtsi > > diff --git a/Documentation/devicetree/bindings/arm/fsl.txt > b/Documentation/devicetree/bindings/arm/fsl.txt index fecb580..1708df5 > 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.MX23 Evaluation Kit > +Required root node properties: > + - compatible = "fsl,imx23-evk", "fsl,imx23"; > + > i.MX28 Evaluation Kit > Required root node properties: > - compatible = "fsl,imx28-evk", "fsl,imx28"; > diff --git a/arch/arm/boot/dts/imx23-evk.dts > b/arch/arm/boot/dts/imx23-evk.dts new file mode 100644 > index 0000000..8cad51e > --- /dev/null > +++ b/arch/arm/boot/dts/imx23-evk.dts > @@ -0,0 +1,32 @@ > +/* > + * 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/ "imx23.dtsi" > + > +/ { > + model = "Freescale i.MX23 Evaluation Kit"; > + compatible = "fsl,imx23-evk", "fsl,imx23"; > + > + memory { > + reg = <0x40000000 0x08000000>; > + }; > + > + apb at 80000000 { > + apbx at 80040000 { > + duart: serial at 80070000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&duart_pins_a>; > + status = "okay"; > + }; > + }; > + }; > +}; > diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi > new file mode 100644 > index 0000000..fb09ccd > --- /dev/null > +++ b/arch/arm/boot/dts/imx23.dtsi > @@ -0,0 +1,243 @@ > +/* > + * 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" > + > +/ { > + interrupt-parent = <&icoll>; > + > + cpus { > + cpu at 0 { > + compatible = "arm,arm926ejs"; > + }; > + }; > + > + apb at 80000000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80000000 0x80000>; > + ranges; > + > + apbh at 80000000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80000000 0x40000>; > + ranges; > + > + icoll: interrupt-controller at 80000000 { > + compatible = "fsl,imx23-icoll", "fsl,mxs-icoll"; > + interrupt-controller; > + #interrupt-cells = <1>; > + reg = <0x80000000 0x2000>; > + }; > + > + dma-apbh at 80004000 { > + reg = <0x80004000 2000>; > + status = "disabled"; > + }; > + > + ecc at 80008000 { > + reg = <0x80008000 2000>; > + status = "disabled"; > + }; > + > + bch at 8000a000 { > + reg = <0x8000a000 2000>; > + status = "disabled"; > + }; > + > + gpmi at 8000c000 { > + reg = <0x8000c000 2000>; > + status = "disabled"; > + }; > + > + ssp0: ssp at 80010000 { > + reg = <0x80010000 2000>; > + status = "disabled"; > + }; > + > + etm at 80014000 { > + reg = <0x80014000 2000>; > + status = "disabled"; > + }; > + > + pinctrl at 80018000 { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "fsl,imx23-pinctrl"; > + reg = <0x80018000 2000>; > + > + duart_pins_a: duart at 0 { > + reg = <0>; > + fsl,pinmux-ids = <0x11a2 0x11b2>; > + fsl,drive-strength = <0>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > + }; > + > + digctl at 8001c000 { > + reg = <0x8001c000 2000>; > + status = "disabled"; > + }; > + > + emi at 80020000 { > + reg = <0x80020000 2000>; > + status = "disabled"; > + }; > + > + dma-apbx at 80024000 { > + reg = <0x80024000 2000>; > + status = "disabled"; > + }; > + > + dcp at 80028000 { > + reg = <0x80028000 2000>; > + status = "disabled"; > + }; > + > + pxp at 8002a000 { > + reg = <0x8002a000 2000>; > + status = "disabled"; > + }; > + > + ocotp at 8002c000 { > + reg = <0x8002c000 2000>; > + status = "disabled"; > + }; > + > + axi-ahb at 8002e000 { > + reg = <0x8002e000 2000>; > + status = "disabled"; > + }; > + > + lcdif at 80030000 { > + reg = <0x80030000 2000>; > + status = "disabled"; > + }; > + > + ssp1: ssp at 80034000 { > + reg = <0x80034000 2000>; > + status = "disabled"; > + }; > + > + tvenc at 80038000 { > + reg = <0x80038000 2000>; > + status = "disabled"; > + }; > + }; > + > + apbx at 80040000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80040000 0x40000>; > + ranges; > + > + clkctl at 80040000 { > + reg = <0x80040000 2000>; > + status = "disabled"; > + }; > + > + saif0: saif at 80042000 { > + reg = <0x80042000 2000>; > + status = "disabled"; > + }; > + > + power at 80044000 { > + reg = <0x80044000 2000>; > + status = "disabled"; > + }; > + > + saif1: saif at 80046000 { > + reg = <0x80046000 2000>; > + status = "disabled"; > + }; > + > + audio-out at 80048000 { > + reg = <0x80048000 2000>; > + status = "disabled"; > + }; > + > + audio-in at 8004c000 { > + reg = <0x8004c000 2000>; > + status = "disabled"; > + }; > + > + lradc at 80050000 { > + reg = <0x80050000 2000>; > + status = "disabled"; > + }; > + > + spdif at 80054000 { > + reg = <0x80054000 2000>; > + status = "disabled"; > + }; > + > + i2c at 80058000 { > + reg = <0x80058000 2000>; > + status = "disabled"; > + }; > + > + rtc at 8005c000 { > + reg = <0x8005c000 2000>; > + status = "disabled"; > + }; > + > + pwm at 80064000 { > + reg = <0x80064000 2000>; > + status = "disabled"; > + }; > + > + timrot at 80068000 { > + reg = <0x80068000 2000>; > + status = "disabled"; > + }; > + > + auart0: serial at 8006c000 { > + reg = <0x8006c000 0x2000>; > + status = "disabled"; > + }; > + > + auart1: serial at 8006e000 { > + reg = <0x8006e000 0x2000>; > + status = "disabled"; > + }; > + > + duart: serial at 80070000 { > + compatible = "arm,pl011", "arm,primecell"; > + reg = <0x80070000 0x2000>; > + interrupts = <0>; > + status = "disabled"; > + }; > + > + usbphy at 8007c000 { > + reg = <0x8007c000 0x2000>; > + status = "disabled"; > + }; > + }; > + }; > + > + ahb at 80080000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0x80080000 0x80000>; > + ranges; > + > + usbctrl at 80080000 { > + reg = <0x80080000 0x10000>; > + status = "disabled"; > + }; > + }; > +}; > diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig > index 15bb4e2..8138a13 100644 > --- a/arch/arm/mach-mxs/Kconfig > +++ b/arch/arm/mach-mxs/Kconfig > @@ -23,6 +23,7 @@ comment "MXS platforms:" > > config MACH_MXS_DT > bool "Support MXS platforms from device tree" > + select SOC_IMX23 > select SOC_IMX28 > select USE_OF > help > diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c > index 5d81a23..182ea75 100644 > --- a/arch/arm/mach-mxs/mach-mxs.c > +++ b/arch/arm/mach-mxs/mach-mxs.c > @@ -41,6 +41,15 @@ static void __init mxs_dt_init_irq(void) > of_irq_init(mxs_irq_match); > } > > +static void __init imx23_timer_init(void) > +{ > + mx23_clocks_init(); > +} > + > +static struct sys_timer imx23_timer = { > + .init = imx23_timer_init, > +}; > + > static void __init imx28_timer_init(void) > { > mx28_clocks_init(); > @@ -69,12 +78,27 @@ static void __init mxs_machine_init(void) > NULL, NULL); > } > > +static const char *imx23_dt_compat[] __initdata = { > + "fsl,imx23-evk", > + "fsl,imx23", > + NULL, > +}; > + > static const char *imx28_dt_compat[] __initdata = { > "fsl,imx28-evk", > "fsl,imx28", > NULL, > }; > > +DT_MACHINE_START(IMX23, "Freescale i.MX23 (Device Tree)") > + .map_io = mx23_map_io, > + .init_irq = mxs_dt_init_irq, > + .timer = &imx23_timer, > + .init_machine = mxs_machine_init, > + .dt_compat = imx23_dt_compat, > + .restart = mxs_restart, > +MACHINE_END > + > DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)") > .map_io = mx28_map_io, > .init_irq = mxs_dt_init_irq, > diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c > index dcae112..07fe1f1 100644 > --- a/drivers/clk/mxs/clk-imx23.c > +++ b/drivers/clk/mxs/clk-imx23.c > @@ -87,6 +87,7 @@ static struct clk_lookup hbus_lookups[] __initdata = { > > static struct clk_lookup xbus_lookups[] __initdata = { > { .dev_id = "duart", .con_id = "apb_pclk"}, > + { .dev_id = "80070000.serial", .con_id = "apb_pclk"}, > { .dev_id = "mxs-dma-apbx", }, > { .dev_id = "80024000.dma-apbx", }, > }; ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] ARM: mxs: always build in device tree support 2012-05-07 14:11 [PATCH 0/3] Initial device tree support for mxs Shawn Guo 2012-05-07 14:11 ` [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board Shawn Guo 2012-05-07 14:11 ` [PATCH 2/3] ARM: mxs: add initial device tree support for imx23-evk board Shawn Guo @ 2012-05-07 14:11 ` Shawn Guo 2012-05-07 16:11 ` Marek Vasut 2 siblings, 1 reply; 7+ messages in thread From: Shawn Guo @ 2012-05-07 14:11 UTC (permalink / raw) To: linux-arm-kernel As the ultimate for mxs platform is to convert over to device tree, let's start always building in device tree support for the platform. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- arch/arm/Kconfig | 1 + arch/arm/configs/mxs_defconfig | 1 + arch/arm/mach-mxs/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c516baf..ca434ed 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -471,6 +471,7 @@ config ARCH_MXS select COMMON_CLK select HAVE_CLK_PREPARE select PINCTRL + select USE_OF help Support for Freescale MXS-based family of processors diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index 1ebbf45..5406c23 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig @@ -22,6 +22,7 @@ CONFIG_BLK_DEV_INTEGRITY=y # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set CONFIG_ARCH_MXS=y +CONFIG_MACH_MXS_DT=y CONFIG_MACH_MX23EVK=y CONFIG_MACH_MX28EVK=y CONFIG_MACH_STMP378X_DEVB=y diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 8138a13..91cf062 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -25,7 +25,6 @@ config MACH_MXS_DT bool "Support MXS platforms from device tree" select SOC_IMX23 select SOC_IMX28 - select USE_OF help Include support for Freescale MXS platforms(i.MX23 and i.MX28) using the device tree for discovery -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] ARM: mxs: always build in device tree support 2012-05-07 14:11 ` [PATCH 3/3] ARM: mxs: always build in device tree support Shawn Guo @ 2012-05-07 16:11 ` Marek Vasut 0 siblings, 0 replies; 7+ messages in thread From: Marek Vasut @ 2012-05-07 16:11 UTC (permalink / raw) To: linux-arm-kernel Dear Shawn Guo, > As the ultimate for mxs platform is to convert over to device tree, > let's start always building in device tree support for the platform. > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marek Vasut <marex@denx.de> > --- > arch/arm/Kconfig | 1 + > arch/arm/configs/mxs_defconfig | 1 + > arch/arm/mach-mxs/Kconfig | 1 - > 3 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index c516baf..ca434ed 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -471,6 +471,7 @@ config ARCH_MXS > select COMMON_CLK > select HAVE_CLK_PREPARE > select PINCTRL > + select USE_OF > help > Support for Freescale MXS-based family of processors > > diff --git a/arch/arm/configs/mxs_defconfig > b/arch/arm/configs/mxs_defconfig index 1ebbf45..5406c23 100644 > --- a/arch/arm/configs/mxs_defconfig > +++ b/arch/arm/configs/mxs_defconfig > @@ -22,6 +22,7 @@ CONFIG_BLK_DEV_INTEGRITY=y > # CONFIG_IOSCHED_DEADLINE is not set > # CONFIG_IOSCHED_CFQ is not set > CONFIG_ARCH_MXS=y > +CONFIG_MACH_MXS_DT=y > CONFIG_MACH_MX23EVK=y > CONFIG_MACH_MX28EVK=y > CONFIG_MACH_STMP378X_DEVB=y > diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig > index 8138a13..91cf062 100644 > --- a/arch/arm/mach-mxs/Kconfig > +++ b/arch/arm/mach-mxs/Kconfig > @@ -25,7 +25,6 @@ config MACH_MXS_DT > bool "Support MXS platforms from device tree" > select SOC_IMX23 > select SOC_IMX28 > - select USE_OF > help > Include support for Freescale MXS platforms(i.MX23 and i.MX28) > using the device tree for discovery Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-05-07 16:11 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-07 14:11 [PATCH 0/3] Initial device tree support for mxs Shawn Guo 2012-05-07 14:11 ` [PATCH 1/3] ARM: mxs: add initial device tree support for imx28-evk board Shawn Guo 2012-05-07 16:09 ` Marek Vasut 2012-05-07 14:11 ` [PATCH 2/3] ARM: mxs: add initial device tree support for imx23-evk board Shawn Guo 2012-05-07 16:11 ` Marek Vasut 2012-05-07 14:11 ` [PATCH 3/3] ARM: mxs: always build in device tree support Shawn Guo 2012-05-07 16:11 ` Marek Vasut
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).