blob: 93c230be0a3188692a7775a2f3e7c430a4d0d8cb [file] [log] [blame]
Mihai Sain2cd2ff02024-02-27 15:44:01 +02001// 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/mfd/atmel-flexcom.h>
15#include <dt-bindings/pinctrl/at91.h>
16
17/ {
18 model = "Microchip SAMA7G54 Curiosity";
19 compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7";
20
21 aliases {
22 serial0 = &uart3;
23 i2c0 = &i2c10;
24 };
25
26 chosen {
27 bootargs = "console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootwait";
28 stdout-path = "serial0:115200n8";
29 };
30
31 clocks {
32 slow_xtal {
33 clock-frequency = <32768>;
34 };
35
36 main_xtal {
37 clock-frequency = <24000000>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43 pinctrl-names = "default";
44 pinctrl-0 = <&pinctrl_led_gpio_default>;
45
46 led-red {
47 label = "red";
48 gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>;
49 default-state = "off";
50 };
51
52 led-green {
53 label = "green";
54 gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>;
55 default-state = "off";
56 };
57
58 led-blue {
59 label = "blue";
60 gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>;
61 default-state = "on";
62 };
63 };
64
65 memory {
66 device_type = "memory";
67 reg = <0x60000000 0x10000000>; // 256 MiB DDR3L-1066 16-bit
68 };
69};
70
71&ebi {
72 pinctrl-names = "default";
73 pinctrl-0 = <&pinctrl_nand_default>;
74 status = "okay";
75
76 nand_controller: nand-controller {
77 status = "okay";
78
79 nand@3 {
80 reg = <0x3 0x0 0x800000>;
81 atmel,rb = <0>;
82 nand-bus-width = <8>;
83 nand-ecc-mode = "hw";
84 nand-ecc-strength = <8>;
85 nand-ecc-step-size = <512>;
86 nand-on-flash-bbt;
87 };
88 };
89};
90
91&flx3 {
92 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
93 status = "okay";
94
95 uart3: serial@200 {
96 pinctrl-names = "default";
97 pinctrl-0 = <&pinctrl_flx3_default>;
98 status = "okay";
99 };
100};
101
102&flx10 {
103 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
104 status = "okay";
105
106 i2c10: i2c@600 {
107 pinctrl-names = "default";
108 pinctrl-0 = <&pinctrl_flx10_default>;
109 i2c-analog-filter;
110 i2c-digital-filter;
111 i2c-digital-filter-width-ns = <35>;
112 status = "okay";
113
114 adc@1f {
115 compatible = "microchip,pac1934";
116 reg = <0x1f>;
117 };
118
119 eeprom@51 {
120 compatible = "atmel,24c02";
121 reg = <0x51>;
122 pagesize = <16>;
123 size = <256>;
124 };
125
126 pmic@5b {
127 compatible = "microchip,mcp16502";
128 reg = <0x5b>;
129 };
130 };
131};
132
133&pioA {
134 pinctrl_flx3_default: flx3-default {
135 pinmux = <PIN_PD16__FLEXCOM3_IO0>,
136 <PIN_PD17__FLEXCOM3_IO1>;
137 bias-pull-up;
138 };
139
140 pinctrl_flx10_default: flx10-default {
141 pinmux = <PIN_PC30__FLEXCOM10_IO0>,
142 <PIN_PC31__FLEXCOM10_IO1>;
143 bias-pull-up;
144 };
145
146 pinctrl_led_gpio_default: led-gpio-default {
147 pinmux = <PIN_PD13__GPIO>,
148 <PIN_PD14__GPIO>,
149 <PIN_PB15__GPIO>;
150 bias-pull-up;
151 };
152
153 pinctrl_nand_default: nand-default {
154 pinmux = <PIN_PD9__D0>,
155 <PIN_PD10__D1>,
156 <PIN_PD11__D2>,
157 <PIN_PC21__D3>,
158 <PIN_PC22__D4>,
159 <PIN_PC23__D5>,
160 <PIN_PC24__D6>,
161 <PIN_PD2__D7>,
162 <PIN_PD3__NANDRDY>,
163 <PIN_PD4__NCS3_NANDCS>,
164 <PIN_PD5__NWE_NWR0_NANDWE>,
165 <PIN_PD6__NRD_NANDOE>,
166 <PIN_PD7__A21_NANDALE>,
167 <PIN_PD8__A22_NANDCLE>;
168 bias-disable;
169 slew-rate = <0>;
170 };
171
172 pinctrl_qspi1_default: qspi1-default {
173 pinmux = <PIN_PB22__QSPI1_IO3>,
174 <PIN_PB23__QSPI1_IO2>,
175 <PIN_PB24__QSPI1_IO1>,
176 <PIN_PB25__QSPI1_IO0>,
177 <PIN_PB26__QSPI1_CS>,
178 <PIN_PB27__QSPI1_SCK>;
179 bias-pull-up;
180 slew-rate = <0>;
181 };
182
183 pinctrl_sdmmc0_default: sdmmc0-default {
184 pinmux = <PIN_PA0__SDMMC0_CK>,
185 <PIN_PA1__SDMMC0_CMD>,
186 <PIN_PA2__SDMMC0_RSTN>,
187 <PIN_PA3__SDMMC0_DAT0>,
188 <PIN_PA4__SDMMC0_DAT1>,
189 <PIN_PA5__SDMMC0_DAT2>,
190 <PIN_PA6__SDMMC0_DAT3>;
191 bias-pull-up;
192 slew-rate = <0>;
193 };
194
195 pinctrl_sdmmc1_default: sdmmc1-default {
196 pinmux = <PIN_PB29__SDMMC1_CMD>,
197 <PIN_PB30__SDMMC1_CK>,
198 <PIN_PB31__SDMMC1_DAT0>,
199 <PIN_PC0__SDMMC1_DAT1>,
200 <PIN_PC1__SDMMC1_DAT2>,
201 <PIN_PC2__SDMMC1_DAT3>,
202 <PIN_PC4__SDMMC1_CD>;
203 bias-pull-up;
204 slew-rate = <0>;
205 };
206};
207
208&qspi1 {
209 pinctrl-names = "default";
210 pinctrl-0 = <&pinctrl_qspi1_default>;
211 status = "okay";
212
213 flash@0 {
214 compatible = "jedec,spi-nor";
215 reg = <0x0>;
216 spi-max-frequency = <100000000>;
217 spi-tx-bus-width = <4>;
218 spi-rx-bus-width = <4>;
219 m25p,fast-read;
220 };
221};
222
223// M.2 slot for wireless card
224&sdmmc0 {
225 bus-width = <4>;
226 cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
227 disable-wp;
228 max-frequency = <50000000>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&pinctrl_sdmmc0_default>;
231 status = "okay";
232};
233
234// micro SD socket
235&sdmmc1 {
236 bus-width = <4>;
237 disable-wp;
238 max-frequency = <50000000>;
239 pinctrl-names = "default";
240 pinctrl-0 = <&pinctrl_sdmmc1_default>;
241 status = "okay";
242};