aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-05-04 09:33:42 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-05-12 01:32:17 -0400
commit2954ff395bcf69cb31dbe500bec20ce0944ea19e (patch)
treeca9c1e7e3b0f12151825c496a38a6c8268b2e499 /arch
parentbc3a59c1b7b1c367fec615b872bdb89ac232f62e (diff)
ARM: mxs: add initial device tree support for imx23-evk board
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/imx23-evk.dts32
-rw-r--r--arch/arm/boot/dts/imx23.dtsi243
-rw-r--r--arch/arm/mach-mxs/Kconfig1
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c24
4 files changed, 300 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/imx23-evk.dts b/arch/arm/boot/dts/imx23-evk.dts
new file mode 100644
index 000000000000..8cad51ee6f89
--- /dev/null
+++ b/arch/arm/boot/dts/imx23-evk.dts
@@ -0,0 +1,32 @@
1/*
2 * Copyright 2012 Freescale Semiconductor, Inc.
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13/include/ "imx23.dtsi"
14
15/ {
16 model = "Freescale i.MX23 Evaluation Kit";
17 compatible = "fsl,imx23-evk", "fsl,imx23";
18
19 memory {
20 reg = <0x40000000 0x08000000>;
21 };
22
23 apb@80000000 {
24 apbx@80040000 {
25 duart: serial@80070000 {
26 pinctrl-names = "default";
27 pinctrl-0 = <&duart_pins_a>;
28 status = "okay";
29 };
30 };
31 };
32};
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
new file mode 100644
index 000000000000..fb09ccd02189
--- /dev/null
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -0,0 +1,243 @@
1/*
2 * Copyright 2012 Freescale Semiconductor, Inc.
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/include/ "skeleton.dtsi"
13
14/ {
15 interrupt-parent = <&icoll>;
16
17 cpus {
18 cpu@0 {
19 compatible = "arm,arm926ejs";
20 };
21 };
22
23 apb@80000000 {
24 compatible = "simple-bus";
25 #address-cells = <1>;
26 #size-cells = <1>;
27 reg = <0x80000000 0x80000>;
28 ranges;
29
30 apbh@80000000 {
31 compatible = "simple-bus";
32 #address-cells = <1>;
33 #size-cells = <1>;
34 reg = <0x80000000 0x40000>;
35 ranges;
36
37 icoll: interrupt-controller@80000000 {
38 compatible = "fsl,imx23-icoll", "fsl,mxs-icoll";
39 interrupt-controller;
40 #interrupt-cells = <1>;
41 reg = <0x80000000 0x2000>;
42 };
43
44 dma-apbh@80004000 {
45 reg = <0x80004000 2000>;
46 status = "disabled";
47 };
48
49 ecc@80008000 {
50 reg = <0x80008000 2000>;
51 status = "disabled";
52 };
53
54 bch@8000a000 {
55 reg = <0x8000a000 2000>;
56 status = "disabled";
57 };
58
59 gpmi@8000c000 {
60 reg = <0x8000c000 2000>;
61 status = "disabled";
62 };
63
64 ssp0: ssp@80010000 {
65 reg = <0x80010000 2000>;
66 status = "disabled";
67 };
68
69 etm@80014000 {
70 reg = <0x80014000 2000>;
71 status = "disabled";
72 };
73
74 pinctrl@80018000 {
75 #address-cells = <1>;
76 #size-cells = <0>;
77 compatible = "fsl,imx23-pinctrl";
78 reg = <0x80018000 2000>;
79
80 duart_pins_a: duart@0 {
81 reg = <0>;
82 fsl,pinmux-ids = <0x11a2 0x11b2>;
83 fsl,drive-strength = <0>;
84 fsl,voltage = <1>;
85 fsl,pull-up = <0>;
86 };
87 };
88
89 digctl@8001c000 {
90 reg = <0x8001c000 2000>;
91 status = "disabled";
92 };
93
94 emi@80020000 {
95 reg = <0x80020000 2000>;
96 status = "disabled";
97 };
98
99 dma-apbx@80024000 {
100 reg = <0x80024000 2000>;
101 status = "disabled";
102 };
103
104 dcp@80028000 {
105 reg = <0x80028000 2000>;
106 status = "disabled";
107 };
108
109 pxp@8002a000 {
110 reg = <0x8002a000 2000>;
111 status = "disabled";
112 };
113
114 ocotp@8002c000 {
115 reg = <0x8002c000 2000>;
116 status = "disabled";
117 };
118
119 axi-ahb@8002e000 {
120 reg = <0x8002e000 2000>;
121 status = "disabled";
122 };
123
124 lcdif@80030000 {
125 reg = <0x80030000 2000>;
126 status = "disabled";
127 };
128
129 ssp1: ssp@80034000 {
130 reg = <0x80034000 2000>;
131 status = "disabled";
132 };
133
134 tvenc@80038000 {
135 reg = <0x80038000 2000>;
136 status = "disabled";
137 };
138 };
139
140 apbx@80040000 {
141 compatible = "simple-bus";
142 #address-cells = <1>;
143 #size-cells = <1>;
144 reg = <0x80040000 0x40000>;
145 ranges;
146
147 clkctl@80040000 {
148 reg = <0x80040000 2000>;
149 status = "disabled";
150 };
151
152 saif0: saif@80042000 {
153 reg = <0x80042000 2000>;
154 status = "disabled";
155 };
156
157 power@80044000 {
158 reg = <0x80044000 2000>;
159 status = "disabled";
160 };
161
162 saif1: saif@80046000 {
163 reg = <0x80046000 2000>;
164 status = "disabled";
165 };
166
167 audio-out@80048000 {
168 reg = <0x80048000 2000>;
169 status = "disabled";
170 };
171
172 audio-in@8004c000 {
173 reg = <0x8004c000 2000>;
174 status = "disabled";
175 };
176
177 lradc@80050000 {
178 reg = <0x80050000 2000>;
179 status = "disabled";
180 };
181
182 spdif@80054000 {
183 reg = <0x80054000 2000>;
184 status = "disabled";
185 };
186
187 i2c@80058000 {
188 reg = <0x80058000 2000>;
189 status = "disabled";
190 };
191
192 rtc@8005c000 {
193 reg = <0x8005c000 2000>;
194 status = "disabled";
195 };
196
197 pwm@80064000 {
198 reg = <0x80064000 2000>;
199 status = "disabled";
200 };
201
202 timrot@80068000 {
203 reg = <0x80068000 2000>;
204 status = "disabled";
205 };
206
207 auart0: serial@8006c000 {
208 reg = <0x8006c000 0x2000>;
209 status = "disabled";
210 };
211
212 auart1: serial@8006e000 {
213 reg = <0x8006e000 0x2000>;
214 status = "disabled";
215 };
216
217 duart: serial@80070000 {
218 compatible = "arm,pl011", "arm,primecell";
219 reg = <0x80070000 0x2000>;
220 interrupts = <0>;
221 status = "disabled";
222 };
223
224 usbphy@8007c000 {
225 reg = <0x8007c000 0x2000>;
226 status = "disabled";
227 };
228 };
229 };
230
231 ahb@80080000 {
232 compatible = "simple-bus";
233 #address-cells = <1>;
234 #size-cells = <1>;
235 reg = <0x80080000 0x80000>;
236 ranges;
237
238 usbctrl@80080000 {
239 reg = <0x80080000 0x10000>;
240 status = "disabled";
241 };
242 };
243};
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 15bb4e211a27..8138a13e23cf 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -23,6 +23,7 @@ comment "MXS platforms:"
23 23
24config MACH_MXS_DT 24config MACH_MXS_DT
25 bool "Support MXS platforms from device tree" 25 bool "Support MXS platforms from device tree"
26 select SOC_IMX23
26 select SOC_IMX28 27 select SOC_IMX28
27 select USE_OF 28 select USE_OF
28 help 29 help
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 5d81a23943c6..182ea7529d28 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)
41 of_irq_init(mxs_irq_match); 41 of_irq_init(mxs_irq_match);
42} 42}
43 43
44static void __init imx23_timer_init(void)
45{
46 mx23_clocks_init();
47}
48
49static struct sys_timer imx23_timer = {
50 .init = imx23_timer_init,
51};
52
44static void __init imx28_timer_init(void) 53static void __init imx28_timer_init(void)
45{ 54{
46 mx28_clocks_init(); 55 mx28_clocks_init();
@@ -69,12 +78,27 @@ static void __init mxs_machine_init(void)
69 NULL, NULL); 78 NULL, NULL);
70} 79}
71 80
81static const char *imx23_dt_compat[] __initdata = {
82 "fsl,imx23-evk",
83 "fsl,imx23",
84 NULL,
85};
86
72static const char *imx28_dt_compat[] __initdata = { 87static const char *imx28_dt_compat[] __initdata = {
73 "fsl,imx28-evk", 88 "fsl,imx28-evk",
74 "fsl,imx28", 89 "fsl,imx28",
75 NULL, 90 NULL,
76}; 91};
77 92
93DT_MACHINE_START(IMX23, "Freescale i.MX23 (Device Tree)")
94 .map_io = mx23_map_io,
95 .init_irq = mxs_dt_init_irq,
96 .timer = &imx23_timer,
97 .init_machine = mxs_machine_init,
98 .dt_compat = imx23_dt_compat,
99 .restart = mxs_restart,
100MACHINE_END
101
78DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)") 102DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)")
79 .map_io = mx28_map_io, 103 .map_io = mx28_map_io,
80 .init_irq = mxs_dt_init_irq, 104 .init_irq = mxs_dt_init_irq,