blob: 009d2c83242102c8e46a6f2019026b5d60a583ac [file] [log] [blame]
Tom Rini6bb92fc2024-05-20 09:54:58 -06001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * at91-sama7g54_curiosity.dts - Device Tree file for SAMA7G54 Curiosity Board
4 *
5 * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
6 *
7 * Author: Mihai Sain <mihai.sain@microchip.com>
8 *
9 */
10/dts-v1/;
11#include "sama7g5-pinfunc.h"
12#include "sama7g5.dtsi"
13#include <dt-bindings/input/input.h>
14#include <dt-bindings/leds/common.h>
15#include <dt-bindings/mfd/atmel-flexcom.h>
16#include <dt-bindings/pinctrl/at91.h>
17
18/ {
19 model = "Microchip SAMA7G54 Curiosity";
20 compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7";
21
22 aliases {
23 serial0 = &uart3;
24 i2c0 = &i2c10;
25 };
26
27 chosen {
28 stdout-path = "serial0:115200n8";
29 };
30
31 gpio-keys {
32 compatible = "gpio-keys";
33 pinctrl-names = "default";
34 pinctrl-0 = <&pinctrl_key_gpio_default>;
35
36 button-user {
37 label = "user-button";
38 gpios = <&pioA PIN_PD19 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_PROG1>;
40 wakeup-source;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46 pinctrl-names = "default";
47 pinctrl-0 = <&pinctrl_led_gpio_default>;
48
49 led-red {
50 color = <LED_COLOR_ID_RED>;
51 function = LED_FUNCTION_POWER;
52 gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>;
53 default-state = "off";
54 };
55
56 led-green {
57 color = <LED_COLOR_ID_GREEN>;
58 function = LED_FUNCTION_BOOT;
59 gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>;
60 default-state = "off";
61 };
62
63 led-blue {
64 color = <LED_COLOR_ID_BLUE>;
65 function = LED_FUNCTION_CPU;
66 gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>;
67 linux,default-trigger = "heartbeat";
68 };
69 };
70
71 memory@60000000 {
72 device_type = "memory";
73 reg = <0x60000000 0x10000000>; /* 256 MiB DDR3L-1066 16-bit */
74 };
75};
76
77&adc {
78 vddana-supply = <&vddout25>;
79 vref-supply = <&vddout25>;
80 pinctrl-names = "default";
81 pinctrl-0 = <&pinctrl_mikrobus1_an_default &pinctrl_mikrobus2_an_default>;
82 status = "okay";
83};
84
85&cpu0 {
86 cpu-supply = <&vddcpu>;
87};
88
89&dma0 {
90 status = "okay";
91};
92
93&dma1 {
94 status = "okay";
95};
96
97&dma2 {
98 status = "okay";
99};
100
101&ebi {
102 pinctrl-names = "default";
103 pinctrl-0 = <&pinctrl_nand_default>;
104 status = "okay";
105
106 nand_controller: nand-controller {
107 status = "okay";
108
109 nand@3 {
110 reg = <0x3 0x0 0x800000>;
111 atmel,rb = <0>;
112 nand-bus-width = <8>;
113 nand-ecc-mode = "hw";
114 nand-ecc-strength = <8>;
115 nand-ecc-step-size = <512>;
116 nand-on-flash-bbt;
117 label = "nand";
118
119 partitions {
120 compatible = "fixed-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 at91bootstrap@0 {
125 label = "nand: at91bootstrap";
126 reg = <0x0 0x40000>;
127 };
128
129 bootloader@40000 {
130 label = "nand: u-boot";
131 reg = <0x40000 0x100000>;
132 };
133
134 bootloaderenv@140000 {
135 label = "nand: u-boot env";
136 reg = <0x140000 0x40000>;
137 };
138
139 dtb@180000 {
140 label = "nand: device tree";
141 reg = <0x180000 0x80000>;
142 };
143
144 kernel@200000 {
145 label = "nand: kernel";
146 reg = <0x200000 0x600000>;
147 };
148
149 rootfs@800000 {
150 label = "nand: rootfs";
151 reg = <0x800000 0x1f800000>;
152 };
153 };
154 };
155 };
156};
157
158&flx3 {
159 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
160 status = "okay";
161
162 uart3: serial@200 {
163 pinctrl-names = "default";
164 pinctrl-0 = <&pinctrl_flx3_default>;
165 status = "okay";
166 };
167};
168
169&flx10 {
170 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
171 status = "okay";
172
173 i2c10: i2c@600 {
174 pinctrl-names = "default";
175 pinctrl-0 = <&pinctrl_flx10_default>;
176 i2c-analog-filter;
177 i2c-digital-filter;
178 i2c-digital-filter-width-ns = <35>;
179 status = "okay";
180
181 eeprom@51 {
182 compatible = "atmel,24c02";
183 reg = <0x51>;
184 pagesize = <16>;
185 size = <256>;
186 vcc-supply = <&vdd_3v3>;
187 };
188
189 pmic@5b {
190 compatible = "microchip,mcp16502";
191 reg = <0x5b>;
192
193 regulators {
194 vdd_3v3: VDD_IO {
195 regulator-name = "VDD_IO";
196 regulator-min-microvolt = <3300000>;
197 regulator-max-microvolt = <3300000>;
198 regulator-initial-mode = <2>;
199 regulator-allowed-modes = <2>, <4>;
200 regulator-always-on;
201
202 regulator-state-standby {
203 regulator-on-in-suspend;
204 regulator-suspend-microvolt = <3300000>;
205 regulator-mode = <4>;
206 };
207
208 regulator-state-mem {
209 regulator-off-in-suspend;
210 regulator-mode = <4>;
211 };
212 };
213
214 vddioddr: VDD_DDR {
215 regulator-name = "VDD_DDR";
216 regulator-min-microvolt = <1350000>;
217 regulator-max-microvolt = <1350000>;
218 regulator-initial-mode = <2>;
219 regulator-allowed-modes = <2>, <4>;
220 regulator-always-on;
221
222 regulator-state-standby {
223 regulator-on-in-suspend;
224 regulator-suspend-microvolt = <1350000>;
225 regulator-mode = <4>;
226 };
227
228 regulator-state-mem {
229 regulator-on-in-suspend;
230 regulator-suspend-microvolt = <1350000>;
231 regulator-mode = <4>;
232 };
233 };
234
235 vddcore: VDD_CORE {
236 regulator-name = "VDD_CORE";
237 regulator-min-microvolt = <1150000>;
238 regulator-max-microvolt = <1150000>;
239 regulator-initial-mode = <2>;
240 regulator-allowed-modes = <2>, <4>;
241 regulator-always-on;
242
243 regulator-state-standby {
244 regulator-on-in-suspend;
245 regulator-suspend-microvolt = <1150000>;
246 regulator-mode = <4>;
247 };
248
249 regulator-state-mem {
250 regulator-off-in-suspend;
251 regulator-mode = <4>;
252 };
253 };
254
255 vddcpu: VDD_OTHER {
256 regulator-name = "VDD_OTHER";
257 regulator-min-microvolt = <1050000>;
258 regulator-max-microvolt = <1250000>;
259 regulator-initial-mode = <2>;
260 regulator-allowed-modes = <2>, <4>;
261 regulator-ramp-delay = <3125>;
262 regulator-always-on;
263
264 regulator-state-standby {
265 regulator-on-in-suspend;
266 regulator-suspend-microvolt = <1050000>;
267 regulator-mode = <4>;
268 };
269
270 regulator-state-mem {
271 regulator-off-in-suspend;
272 regulator-mode = <4>;
273 };
274 };
275
276 vldo1: LDO1 {
277 regulator-name = "LDO1";
278 regulator-min-microvolt = <1800000>;
279 regulator-max-microvolt = <1800000>;
280 regulator-always-on;
281
282 regulator-state-standby {
283 regulator-suspend-microvolt = <1800000>;
284 regulator-on-in-suspend;
285 };
286
287 regulator-state-mem {
288 regulator-off-in-suspend;
289 };
290 };
291
292 vldo2: LDO2 {
293 regulator-name = "LDO2";
294 regulator-min-microvolt = <3300000>;
295 regulator-max-microvolt = <3300000>;
296 regulator-always-on;
297
298 regulator-state-standby {
299 regulator-suspend-microvolt = <3300000>;
300 regulator-on-in-suspend;
301 };
302
303 regulator-state-mem {
304 regulator-off-in-suspend;
305 };
306 };
307 };
308 };
309 };
310};
311
312&main_xtal {
313 clock-frequency = <24000000>;
314};
315
316&qspi1 {
317 pinctrl-names = "default";
318 pinctrl-0 = <&pinctrl_qspi1_default>;
319 status = "okay";
320
321 flash@0 {
322 compatible = "jedec,spi-nor";
323 reg = <0x0>;
324 spi-max-frequency = <100000000>;
325 spi-tx-bus-width = <4>;
326 spi-rx-bus-width = <4>;
327 m25p,fast-read;
328 };
329};
330
331&pioA {
332 pinctrl_flx3_default: flx3-default {
333 pinmux = <PIN_PD16__FLEXCOM3_IO0>,
334 <PIN_PD17__FLEXCOM3_IO1>;
335 bias-pull-up;
336 };
337
338 pinctrl_flx10_default: flx10-default {
339 pinmux = <PIN_PC30__FLEXCOM10_IO0>,
340 <PIN_PC31__FLEXCOM10_IO1>;
341 bias-pull-up;
342 };
343
344 pinctrl_key_gpio_default: key-gpio-default {
345 pinmux = <PIN_PD19__GPIO>;
346 bias-pull-up;
347 };
348
349 pinctrl_led_gpio_default: led-gpio-default {
350 pinmux = <PIN_PD13__GPIO>,
351 <PIN_PD14__GPIO>,
352 <PIN_PB15__GPIO>;
353 bias-pull-up;
354 };
355
356 pinctrl_mikrobus1_an_default: mikrobus1-an-default {
357 pinmux = <PIN_PC15__GPIO>;
358 bias-disable;
359 };
360
361 pinctrl_mikrobus2_an_default: mikrobus2-an-default {
362 pinmux = <PIN_PC13__GPIO>;
363 bias-disable;
364 };
365
366 pinctrl_nand_default: nand-default {
367 pinmux = <PIN_PD9__D0>,
368 <PIN_PD10__D1>,
369 <PIN_PD11__D2>,
370 <PIN_PC21__D3>,
371 <PIN_PC22__D4>,
372 <PIN_PC23__D5>,
373 <PIN_PC24__D6>,
374 <PIN_PD2__D7>,
375 <PIN_PD3__NANDRDY>,
376 <PIN_PD4__NCS3_NANDCS>,
377 <PIN_PD5__NWE_NWR0_NANDWE>,
378 <PIN_PD6__NRD_NANDOE>,
379 <PIN_PD7__A21_NANDALE>,
380 <PIN_PD8__A22_NANDCLE>;
381 bias-disable;
382 slew-rate = <0>;
383 };
384
385 pinctrl_qspi1_default: qspi1-default {
386 pinmux = <PIN_PB22__QSPI1_IO3>,
387 <PIN_PB23__QSPI1_IO2>,
388 <PIN_PB24__QSPI1_IO1>,
389 <PIN_PB25__QSPI1_IO0>,
390 <PIN_PB26__QSPI1_CS>,
391 <PIN_PB27__QSPI1_SCK>;
392 bias-pull-up;
393 slew-rate = <0>;
394 };
395
396 pinctrl_sdmmc0_default: sdmmc0-default {
397 pinmux = <PIN_PA0__SDMMC0_CK>,
398 <PIN_PA1__SDMMC0_CMD>,
399 <PIN_PA2__SDMMC0_RSTN>,
400 <PIN_PA3__SDMMC0_DAT0>,
401 <PIN_PA4__SDMMC0_DAT1>,
402 <PIN_PA5__SDMMC0_DAT2>,
403 <PIN_PA6__SDMMC0_DAT3>;
404 bias-pull-up;
405 slew-rate = <0>;
406 };
407
408 pinctrl_sdmmc1_default: sdmmc1-default {
409 pinmux = <PIN_PB29__SDMMC1_CMD>,
410 <PIN_PB30__SDMMC1_CK>,
411 <PIN_PB31__SDMMC1_DAT0>,
412 <PIN_PC0__SDMMC1_DAT1>,
413 <PIN_PC1__SDMMC1_DAT2>,
414 <PIN_PC2__SDMMC1_DAT3>,
415 <PIN_PC4__SDMMC1_CD>;
416 bias-pull-up;
417 slew-rate = <0>;
418 };
419};
420
421&rtt {
422 atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
423};
424
425/* M.2 slot for wireless card */
426&sdmmc0 {
427 bus-width = <4>;
428 cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
429 disable-wp;
430 sdhci-caps-mask = <0x0 0x00200000>;
431 vmmc-supply = <&vdd_3v3>;
432 vqmmc-supply = <&vdd_3v3>;
433 pinctrl-names = "default";
434 pinctrl-0 = <&pinctrl_sdmmc0_default>;
435 status = "okay";
436};
437
438/* micro SD socket */
439&sdmmc1 {
440 bus-width = <4>;
441 disable-wp;
442 sdhci-caps-mask = <0x0 0x00200000>;
443 vmmc-supply = <&vdd_3v3>;
444 vqmmc-supply = <&vdd_3v3>;
445 pinctrl-names = "default";
446 pinctrl-0 = <&pinctrl_sdmmc1_default>;
447 status = "okay";
448};
449
450&slow_xtal {
451 clock-frequency = <32768>;
452};
453
454&shdwc {
455 debounce-delay-us = <976>;
456 status = "okay";
457
458 input@0 {
459 reg = <0>;
460 };
461};
462
463&tcb0 {
464 timer0: timer@0 {
465 compatible = "atmel,tcb-timer";
466 reg = <0>;
467 };
468
469 timer1: timer@1 {
470 compatible = "atmel,tcb-timer";
471 reg = <1>;
472 };
473};
474
475&trng {
476 status = "okay";
477};
478
479&vddout25 {
480 vin-supply = <&vdd_3v3>;
481 status = "okay";
482};