blob: b965f5b39dc67437b103cc1695b06580548edc1f [file] [log] [blame]
Wenyou Yang40e14222017-03-24 09:18:44 +08001/*
2 * at91-sama5d4ek.dts - Device Tree file for SAMA5D4 Evaluation Kit
3 *
4 * Copyright (C) 2014 Atmel,
5 * 2014 Nicolas Ferre <nicolas.ferre@atmel.com>
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
44 */
45/dts-v1/;
46#include "sama5d4.dtsi"
47
48/ {
49 model = "Atmel SAMA5D4-EK";
50 compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5";
51
52 aliases {
53 spi0 = &spi0;
54 };
55
56 chosen {
57 u-boot,dm-pre-reloc;
58 stdout-path = &usart3;
59 };
60
61
62 memory {
63 reg = <0x20000000 0x20000000>;
64 };
65
66 clocks {
67 slow_xtal {
68 clock-frequency = <32768>;
69 };
70
71 main_xtal {
72 clock-frequency = <12000000>;
73 };
74 };
75
76 ahb {
77 apb {
78 adc0: adc@fc034000 {
79 pinctrl-names = "default";
80 pinctrl-0 = <
81 /* external trigger conflicts with USBA_VBUS */
82 &pinctrl_adc0_ad0
83 &pinctrl_adc0_ad1
84 &pinctrl_adc0_ad2
85 &pinctrl_adc0_ad3
86 &pinctrl_adc0_ad4
87 >;
88 /* The vref depends on JP22 of EK. If connect 1-2 then use 3.3V. connect 2-3 use 3.0V */
89 atmel,adc-vref = <3300>;
90 /*atmel,adc-ts-wires = <4>;*/ /* Set up ADC touch screen */
91 status = "okay"; /* Enable ADC IIO support */
92 };
93
94 mmc0: mmc@f8000000 {
95 pinctrl-names = "default";
96 pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
97 slot@0 {
98 reg = <0>;
99 bus-width = <4>;
100 cd-gpios = <&pioE 5 0>;
101 };
102 };
103
104 ssc0: ssc@f8008000 {
105 status = "okay";
106 };
107
108 spi0: spi@f8010000 {
109 u-boot,dm-pre-reloc;
110 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
111 status = "okay";
112 spi_flash@0 {
113 u-boot,dm-pre-reloc;
114 compatible = "spi-flash";
115 spi-max-frequency = <50000000>;
116 reg = <0>;
117 };
118 };
119
120 i2c0: i2c@f8014000 {
121 status = "okay";
122
123 wm8904: codec@1a {
124 compatible = "wlf,wm8904";
125 reg = <0x1a>;
126 clocks = <&pck2>;
127 clock-names = "mclk";
128 };
129
130 qt1070:keyboard@1b {
131 compatible = "qt1070";
132 reg = <0x1b>;
133 interrupt-parent = <&pioE>;
134 interrupts = <25 0x0>;
135 pinctrl-names = "default";
136 pinctrl-0 = <&pinctrl_qt1070_irq>;
137 wakeup-source;
138 };
139
140 atmel_mxt_ts@4c {
141 compatible = "atmel,atmel_mxt_ts";
142 reg = <0x4c>;
143 interrupt-parent = <&pioE>;
144 interrupts = <24 0x0>;
145 pinctrl-names = "default";
146 pinctrl-0 = <&pinctrl_mxt_ts>;
147 };
148 };
149
150 macb0: ethernet@f8020000 {
151 pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>;
152 phy-mode = "rmii";
153 status = "okay";
154
155 ethernet-phy@1 {
156 reg = <0x1>;
157 interrupt-parent = <&pioE>;
158 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
159 };
160 };
161
162 mmc1: mmc@fc000000 {
163 u-boot,dm-pre-reloc;
164 pinctrl-names = "default";
165 pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
166 status = "okay";
167 slot@0 {
168 reg = <0>;
169 bus-width = <4>;
170 cd-gpios = <&pioE 6 0>;
171 };
172 };
173
174 usart2: serial@fc008000 {
175 status = "okay";
176 };
177
178 usart3: serial@fc00c000 {
179 u-boot,dm-pre-reloc;
180 status = "okay";
181 };
182
183 usart4: serial@fc010000 {
184 status = "okay";
185 };
186
187 watchdog@fc068640 {
188 status = "okay";
189 };
190
191 pinctrl@fc06a000 {
192 board {
193 u-boot,dm-pre-reloc;
194 pinctrl_macb0_phy_irq: macb0_phy_irq {
195 atmel,pins =
196 <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
197 };
198 pinctrl_mmc0_cd: mmc0_cd {
199 atmel,pins =
200 <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
201 };
202 pinctrl_mmc1_cd: mmc1_cd {
203 u-boot,dm-pre-reloc;
204 atmel,pins =
205 <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
206 };
207 pinctrl_pck2_as_audio_mck: pck2_as_audio_mck {
208 atmel,pins =
209 <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
210 };
211 pinctrl_usba_vbus: usba_vbus {
212 atmel,pins =
213 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
214 };
215 pinctrl_key_gpio: key_gpio_0 {
216 atmel,pins =
217 <AT91_PIOE 13 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE13 gpio */
218 };
219 pinctrl_qt1070_irq: qt1070_irq {
220 atmel,pins =
221 <AT91_PIOE 25 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
222 };
223 pinctrl_mxt_ts: mxt_irq {
224 atmel,pins =
225 <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
226 };
227 };
228 };
229 };
230
231 usb0: gadget@00400000 {
232 atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
233 pinctrl-names = "default";
234 pinctrl-0 = <&pinctrl_usba_vbus>;
235 status = "okay";
236 };
237
238 usb1: ohci@00500000 {
239 num-ports = <3>;
240 atmel,vbus-gpio = <0 /* &pioE 10 GPIO_ACTIVE_LOW */
241 &pioE 11 GPIO_ACTIVE_LOW
242 &pioE 12 GPIO_ACTIVE_LOW
243 >;
244 status = "okay";
245 };
246
247 usb2: ehci@00600000 {
248 status = "okay";
249 };
250
251 nand0: nand@80000000 {
252 nand-bus-width = <8>;
253 nand-ecc-mode = "hw";
254 nand-on-flash-bbt;
255 atmel,has-pmecc;
256 status = "okay";
257
258 at91bootstrap@0 {
259 label = "at91bootstrap";
260 reg = <0x0 0x40000>;
261 };
262
263 bootloader@40000 {
264 label = "bootloader";
265 reg = <0x40000 0x80000>;
266 };
267
268 bootloaderenv@c0000 {
269 label = "bootloader env";
270 reg = <0xc0000 0xc0000>;
271 };
272
273 dtb@180000 {
274 label = "device tree";
275 reg = <0x180000 0x80000>;
276 };
277
278 kernel@200000 {
279 label = "kernel";
280 reg = <0x200000 0x600000>;
281 };
282
283 rootfs@800000 {
284 label = "rootfs";
285 reg = <0x800000 0x0f800000>;
286 };
287 };
288 };
289
290 gpio_keys {
291 compatible = "gpio-keys";
292
293 pinctrl-names = "default";
294 pinctrl-0 = <&pinctrl_key_gpio>;
295
296 pb_user1 {
297 label = "pb_user1";
298 gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
299 linux,code = <0x100>;
300 wakeup-source;
301 };
302 };
303
304 leds {
305 compatible = "gpio-leds";
306 status = "okay";
307
308 d8 {
309 label = "d8";
310 /* PE28, conflicts with usart4 rts pin */
311 gpios = <&pioE 28 GPIO_ACTIVE_LOW>;
312 };
313
314 d9 {
315 label = "d9";
316 gpios = <&pioE 9 GPIO_ACTIVE_HIGH>;
317 };
318
319 d10 {
320 label = "d10";
321 gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
322 linux,default-trigger = "heartbeat";
323 };
324 };
325
326 sound {
327 compatible = "atmel,asoc-wm8904";
328 pinctrl-names = "default";
329 pinctrl-0 = <&pinctrl_pck2_as_audio_mck>;
330
331 atmel,model = "wm8904 @ SAMA5D4EK";
332 atmel,audio-routing =
333 "Headphone Jack", "HPOUTL",
334 "Headphone Jack", "HPOUTR",
335 "IN1L", "Line In Jack",
336 "IN1R", "Line In Jack";
337
338 atmel,ssc-controller = <&ssc0>;
339 atmel,audio-codec = <&wm8904>;
340 };
341};