Merge tag 'for-5.15/io_uring-2021-09-04' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / arch / arm / boot / dts / at91-sama7g5ek.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  *  at91-sama7g5ek.dts - Device Tree file for SAMA7G5-EK board
4  *
5  *  Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries
6  *
7  *  Author: Eugen Hristev <eugen.hristev@microchip.com>
8  *  Author: Claudiu Beznea <claudiu.beznea@microchip.com>
9  *
10  */
11 /dts-v1/;
12 #include "sama7g5-pinfunc.h"
13 #include "sama7g5.dtsi"
14 #include <dt-bindings/mfd/atmel-flexcom.h>
15 #include <dt-bindings/input/input.h>
16
17 / {
18         model = "Microchip SAMA7G5-EK";
19         compatible = "microchip,sama7g5ek", "microchip,sama7g5", "microchip,sama7";
20
21         chosen {
22                 bootargs = "rw root=/dev/mmcblk1p2 rootfstype=ext4 rootwait";
23                 stdout-path = "serial0:115200n8";
24         };
25
26         aliases {
27                 serial0 = &uart3;
28                 serial1 = &uart4;
29                 serial2 = &uart7;
30                 serial3 = &uart0;
31                 i2c0 = &i2c1;
32                 i2c1 = &i2c8;
33                 i2c2 = &i2c9;
34         };
35
36         clocks {
37                 slow_xtal {
38                         clock-frequency = <32768>;
39                 };
40
41                 main_xtal {
42                         clock-frequency = <24000000>;
43                 };
44         };
45
46         gpio_keys {
47                 compatible = "gpio-keys";
48
49                 pinctrl-names = "default";
50                 pinctrl-0 = <&pinctrl_key_gpio_default>;
51
52                 bp1 {
53                         label = "PB_USER";
54                         gpios = <&pioA PIN_PA12 GPIO_ACTIVE_LOW>;
55                         linux,code = <KEY_PROG1>;
56                         wakeup-source;
57                 };
58         };
59
60         leds {
61                 compatible = "gpio-leds";
62                 pinctrl-names = "default";
63                 pinctrl-0 = <&pinctrl_led_gpio_default>;
64                 status = "okay"; /* Conflict with pwm. */
65
66                 red_led {
67                         label = "red";
68                         gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
69                 };
70
71                 green_led {
72                         label = "green";
73                         gpios = <&pioA PIN_PA13 GPIO_ACTIVE_HIGH>;
74                 };
75
76                 blue_led {
77                         label = "blue";
78                         gpios = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
79                         linux,default-trigger = "heartbeat";
80                 };
81         };
82
83         /* 512 M */
84         memory@60000000 {
85                 device_type = "memory";
86                 reg = <0x60000000 0x20000000>;
87         };
88
89         sound: sound {
90                 compatible = "simple-audio-card";
91                 simple-audio-card,name = "sama7g5ek audio";
92                 #address-cells = <1>;
93                 #size-cells = <0>;
94                 simple-audio-card,dai-link@0 {
95                         reg = <0>;
96                         cpu {
97                                 sound-dai = <&spdiftx>;
98                         };
99                         codec {
100                                 sound-dai = <&spdif_out>;
101                         };
102                 };
103                 simple-audio-card,dai-link@1 {
104                         reg = <1>;
105                         cpu {
106                                 sound-dai = <&spdifrx>;
107                         };
108                         codec {
109                                 sound-dai = <&spdif_in>;
110                         };
111                 };
112         };
113
114         spdif_in: spdif-in {
115                 #sound-dai-cells = <0>;
116                 compatible = "linux,spdif-dir";
117         };
118
119         spdif_out: spdif-out {
120                 #sound-dai-cells = <0>;
121                 compatible = "linux,spdif-dit";
122         };
123 };
124
125 &cpu0 {
126         cpu-supply = <&vddcpu>;
127 };
128
129 &dma0 {
130         status = "okay";
131 };
132
133 &dma1 {
134         status = "okay";
135 };
136
137 &dma2 {
138         status = "okay";
139 };
140
141 &flx0 {
142         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
143         status = "disabled";
144
145         uart0: serial@200 {
146                 pinctrl-names = "default";
147                 pinctrl-0 = <&pinctrl_flx0_default>;
148                 status = "disabled";
149         };
150 };
151
152 &flx1 {
153         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
154         status = "okay";
155
156         i2c1: i2c@600 {
157                 pinctrl-names = "default";
158                 pinctrl-0 = <&pinctrl_i2c1_default>;
159                 i2c-analog-filter;
160                 i2c-digital-filter;
161                 i2c-digital-filter-width-ns = <35>;
162                 status = "okay";
163
164                 mcp16502@5b {
165                         compatible = "microchip,mcp16502";
166                         reg = <0x5b>;
167                         status = "okay";
168
169                         regulators {
170                                 vdd_3v3: VDD_IO {
171                                         regulator-name = "VDD_IO";
172                                         regulator-min-microvolt = <1200000>;
173                                         regulator-max-microvolt = <3700000>;
174                                         regulator-initial-mode = <2>;
175                                         regulator-allowed-modes = <2>, <4>;
176                                         regulator-always-on;
177
178                                         regulator-state-standby {
179                                                 regulator-on-in-suspend;
180                                                 regulator-mode = <4>;
181                                         };
182
183                                         regulator-state-mem {
184                                                 regulator-off-in-suspend;
185                                                 regulator-mode = <4>;
186                                         };
187                                 };
188
189                                 vddioddr: VDD_DDR {
190                                         regulator-name = "VDD_DDR";
191                                         regulator-min-microvolt = <1300000>;
192                                         regulator-max-microvolt = <1450000>;
193                                         regulator-initial-mode = <2>;
194                                         regulator-allowed-modes = <2>, <4>;
195                                         regulator-always-on;
196
197                                         regulator-state-standby {
198                                                 regulator-on-in-suspend;
199                                                 regulator-mode = <4>;
200                                         };
201
202                                         regulator-state-mem {
203                                                 regulator-on-in-suspend;
204                                                 regulator-mode = <4>;
205                                         };
206                                 };
207
208                                 vddcore: VDD_CORE {
209                                         regulator-name = "VDD_CORE";
210                                         regulator-min-microvolt = <1100000>;
211                                         regulator-max-microvolt = <1850000>;
212                                         regulator-initial-mode = <2>;
213                                         regulator-allowed-modes = <2>, <4>;
214                                         regulator-always-on;
215
216                                         regulator-state-standby {
217                                                 regulator-on-in-suspend;
218                                                 regulator-mode = <4>;
219                                         };
220
221                                         regulator-state-mem {
222                                                 regulator-off-in-suspend;
223                                                 regulator-mode = <4>;
224                                         };
225                                 };
226
227                                 vddcpu: VDD_OTHER {
228                                         regulator-name = "VDD_OTHER";
229                                         regulator-min-microvolt = <1125000>;
230                                         regulator-max-microvolt = <1850000>;
231                                         regulator-initial-mode = <2>;
232                                         regulator-allowed-modes = <2>, <4>;
233                                         regulator-ramp-delay = <3125>;
234                                         regulator-always-on;
235
236                                         regulator-state-standby {
237                                                 regulator-on-in-suspend;
238                                                 regulator-mode = <4>;
239                                         };
240
241                                         regulator-state-mem {
242                                                 regulator-off-in-suspend;
243                                                 regulator-mode = <4>;
244                                         };
245                                 };
246
247                                 vldo1: LDO1 {
248                                         regulator-name = "LDO1";
249                                         regulator-min-microvolt = <1200000>;
250                                         regulator-max-microvolt = <3700000>;
251                                         regulator-always-on;
252
253                                         regulator-state-standby {
254                                                 regulator-on-in-suspend;
255                                         };
256
257                                         regulator-state-mem {
258                                                 regulator-off-in-suspend;
259                                         };
260                                 };
261
262                                 vldo2: LDO2 {
263                                         regulator-name = "LDO2";
264                                         regulator-min-microvolt = <1200000>;
265                                         regulator-max-microvolt = <3700000>;
266
267                                         regulator-state-standby {
268                                                 regulator-on-in-suspend;
269                                         };
270
271                                         regulator-state-mem {
272                                                 regulator-off-in-suspend;
273                                         };
274                                 };
275                         };
276                 };
277         };
278 };
279
280 &flx3 {
281         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
282         status = "okay";
283
284         uart3: serial@200 {
285                 pinctrl-names = "default";
286                 pinctrl-0 = <&pinctrl_flx3_default>;
287                 status = "okay";
288         };
289 };
290
291 &flx4 {
292         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
293         status = "okay";
294
295         uart4: serial@200 {
296                 pinctrl-names = "default";
297                 pinctrl-0 = <&pinctrl_flx4_default>;
298                 status = "okay";
299         };
300 };
301
302 &flx7 {
303         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
304         status = "okay";
305
306         uart7: serial@200 {
307                 pinctrl-names = "default";
308                 pinctrl-0 = <&pinctrl_flx7_default>;
309                 status = "okay";
310         };
311 };
312
313 &flx8 {
314         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
315         status = "okay";
316
317         i2c8: i2c@600 {
318                 pinctrl-names = "default";
319                 pinctrl-0 = <&pinctrl_i2c8_default>;
320                 i2c-analog-filter;
321                 i2c-digital-filter;
322                 i2c-digital-filter-width-ns = <35>;
323                 status = "okay";
324         };
325 };
326
327 &flx9 {
328         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
329         status = "okay";
330
331         i2c9: i2c@600 {
332                 pinctrl-names = "default";
333                 pinctrl-0 = <&pinctrl_i2c9_default>;
334                 i2c-analog-filter;
335                 i2c-digital-filter;
336                 i2c-digital-filter-width-ns = <35>;
337                 status = "okay";
338         };
339 };
340
341 &flx11 {
342         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
343         status = "okay";
344
345         spi11: spi@400 {
346                 pinctrl-names = "default";
347                 pinctrl-0 = <&pinctrl_mikrobus1_spi &pinctrl_mikrobus1_spi_cs>;
348                 status = "okay";
349         };
350 };
351
352 &gmac0 {
353         #address-cells = <1>;
354         #size-cells = <0>;
355         pinctrl-names = "default";
356         pinctrl-0 = <&pinctrl_gmac0_default &pinctrl_gmac0_txck_default &pinctrl_gmac0_phy_irq>;
357         phy-mode = "rgmii-id";
358         status = "okay";
359
360         ethernet-phy@7 {
361                 reg = <0x7>;
362                 interrupt-parent = <&pioA>;
363                 interrupts = <PIN_PA31 IRQ_TYPE_LEVEL_LOW>;
364         };
365 };
366
367 &gmac1 {
368         #address-cells = <1>;
369         #size-cells = <0>;
370         pinctrl-names = "default";
371         pinctrl-0 = <&pinctrl_gmac1_default &pinctrl_gmac1_phy_irq>;
372         phy-mode = "rmii";
373         status = "okay";
374
375         ethernet-phy@0 {
376                 reg = <0x0>;
377                 interrupt-parent = <&pioA>;
378                 interrupts = <PIN_PA21 IRQ_TYPE_LEVEL_LOW>;
379         };
380 };
381
382 &i2s0 {
383         pinctrl-names = "default";
384         pinctrl-0 = <&pinctrl_i2s0_default>;
385 };
386
387 &pioA {
388         pinctrl_flx0_default: flx0_default {
389                 pinmux = <PIN_PE3__FLEXCOM0_IO0>,
390                          <PIN_PE4__FLEXCOM0_IO1>,
391                          <PIN_PE6__FLEXCOM0_IO3>,
392                          <PIN_PE7__FLEXCOM0_IO4>;
393                 bias-disable;
394         };
395
396         pinctrl_flx3_default: flx3_default {
397                 pinmux = <PIN_PD16__FLEXCOM3_IO0>,
398                          <PIN_PD17__FLEXCOM3_IO1>;
399                 bias-disable;
400         };
401
402         pinctrl_flx4_default: flx4_default {
403                 pinmux = <PIN_PD18__FLEXCOM4_IO0>,
404                          <PIN_PD19__FLEXCOM4_IO1>;
405                 bias-disable;
406         };
407
408         pinctrl_flx7_default: flx7_default {
409                 pinmux = <PIN_PC23__FLEXCOM7_IO0>,
410                          <PIN_PC24__FLEXCOM7_IO1>;
411                 bias-disable;
412         };
413
414         pinctrl_gmac0_default: gmac0_default {
415                 pinmux = <PIN_PA16__G0_TX0>,
416                          <PIN_PA17__G0_TX1>,
417                          <PIN_PA26__G0_TX2>,
418                          <PIN_PA27__G0_TX3>,
419                          <PIN_PA19__G0_RX0>,
420                          <PIN_PA20__G0_RX1>,
421                          <PIN_PA28__G0_RX2>,
422                          <PIN_PA29__G0_RX3>,
423                          <PIN_PA15__G0_TXEN>,
424                          <PIN_PA30__G0_RXCK>,
425                          <PIN_PA18__G0_RXDV>,
426                          <PIN_PA22__G0_MDC>,
427                          <PIN_PA23__G0_MDIO>,
428                          <PIN_PA25__G0_125CK>;
429                 bias-disable;
430         };
431
432         pinctrl_gmac0_txck_default: gmac0_txck_default {
433                 pinmux = <PIN_PA24__G0_TXCK>;
434                 bias-pull-up;
435         };
436
437         pinctrl_gmac0_phy_irq: gmac0_phy_irq {
438                 pinmux = <PIN_PA31__GPIO>;
439                 bias-disable;
440         };
441
442         pinctrl_gmac1_default: gmac1_default {
443                 pinmux = <PIN_PD30__G1_TXCK>,
444                          <PIN_PD22__G1_TX0>,
445                          <PIN_PD23__G1_TX1>,
446                          <PIN_PD21__G1_TXEN>,
447                          <PIN_PD25__G1_RX0>,
448                          <PIN_PD26__G1_RX1>,
449                          <PIN_PD27__G1_RXER>,
450                          <PIN_PD24__G1_RXDV>,
451                          <PIN_PD28__G1_MDC>,
452                          <PIN_PD29__G1_MDIO>;
453                 bias-disable;
454         };
455
456         pinctrl_gmac1_phy_irq: gmac1_phy_irq {
457                 pinmux = <PIN_PA21__GPIO>;
458                 bias-disable;
459         };
460
461         pinctrl_i2c1_default: i2c1_default {
462                 pinmux = <PIN_PC9__FLEXCOM1_IO0>,
463                          <PIN_PC10__FLEXCOM1_IO1>;
464                 bias-disable;
465         };
466
467         pinctrl_i2c8_default: i2c8_default {
468                 pinmux = <PIN_PC14__FLEXCOM8_IO0>,
469                          <PIN_PC13__FLEXCOM8_IO1>;
470                 bias-disable;
471         };
472
473         pinctrl_i2c9_default: i2c9_default {
474                 pinmux = <PIN_PC18__FLEXCOM9_IO0>,
475                          <PIN_PC19__FLEXCOM9_IO1>;
476                 bias-disable;
477         };
478
479         pinctrl_i2s0_default: i2s0_default {
480                 pinmux = <PIN_PB23__I2SMCC0_CK>,
481                          <PIN_PB24__I2SMCC0_WS>,
482                          <PIN_PB25__I2SMCC0_DOUT1>,
483                          <PIN_PB26__I2SMCC0_DOUT0>,
484                          <PIN_PB27__I2SMCC0_MCK>;
485                 bias-disable;
486         };
487
488         pinctrl_key_gpio_default: key_gpio_default {
489                 pinmux = <PIN_PA12__GPIO>;
490                 bias-pull-up;
491         };
492
493         pinctrl_led_gpio_default: led_gpio_default {
494                 pinmux = <PIN_PA13__GPIO>,
495                          <PIN_PB8__GPIO>,
496                          <PIN_PD20__GPIO>;
497                 bias-pull-up;
498         };
499
500         pinctrl_mikrobus1_an_default: mikrobus1_an_default {
501                 pinmux = <PIN_PD0__GPIO>;
502                 bias-disable;
503         };
504
505         pinctrl_mikrobus2_an_default: mikrobus2_an_default {
506                 pinmux = <PIN_PD1__GPIO>;
507                 bias-disable;
508         };
509
510         pinctrl_mikrobus1_pwm2_default: mikrobus1_pwm2_default {
511                 pinmux = <PIN_PA13__PWMH2>;
512                 bias-disable;
513         };
514
515         pinctrl_mikrobus2_pwm3_default: mikrobus2_pwm3_default {
516                 pinmux = <PIN_PD20__PWMH3>;
517                 bias-disable;
518         };
519
520         pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
521                 pinmux = <PIN_PB6__FLEXCOM11_IO3>;
522                 bias-disable;
523         };
524
525         pinctrl_mikrobus1_spi: mikrobus1_spi {
526                 pinmux = <PIN_PB3__FLEXCOM11_IO0>,
527                          <PIN_PB4__FLEXCOM11_IO1>,
528                          <PIN_PB5__FLEXCOM11_IO2>;
529                 bias-disable;
530         };
531
532         pinctrl_sdmmc0_default: sdmmc0_default {
533                 cmd_data {
534                         pinmux = <PIN_PA1__SDMMC0_CMD>,
535                                  <PIN_PA3__SDMMC0_DAT0>,
536                                  <PIN_PA4__SDMMC0_DAT1>,
537                                  <PIN_PA5__SDMMC0_DAT2>,
538                                  <PIN_PA6__SDMMC0_DAT3>,
539                                  <PIN_PA7__SDMMC0_DAT4>,
540                                  <PIN_PA8__SDMMC0_DAT5>,
541                                  <PIN_PA9__SDMMC0_DAT6>,
542                                  <PIN_PA10__SDMMC0_DAT7>;
543                         bias-pull-up;
544                 };
545
546                 ck_cd_rstn_vddsel {
547                         pinmux = <PIN_PA0__SDMMC0_CK>,
548                                  <PIN_PA2__SDMMC0_RSTN>,
549                                  <PIN_PA11__SDMMC0_DS>;
550                         bias-pull-up;
551                 };
552         };
553
554         pinctrl_sdmmc1_default: sdmmc1_default {
555                 cmd_data {
556                         pinmux = <PIN_PB29__SDMMC1_CMD>,
557                                  <PIN_PB31__SDMMC1_DAT0>,
558                                  <PIN_PC0__SDMMC1_DAT1>,
559                                  <PIN_PC1__SDMMC1_DAT2>,
560                                  <PIN_PC2__SDMMC1_DAT3>;
561                         bias-pull-up;
562                 };
563
564                 ck_cd_rstn_vddsel {
565                         pinmux = <PIN_PB30__SDMMC1_CK>,
566                                  <PIN_PB28__SDMMC1_RSTN>,
567                                  <PIN_PC5__SDMMC1_1V8SEL>,
568                                  <PIN_PC4__SDMMC1_CD>;
569                         bias-pull-up;
570                 };
571         };
572
573         pinctrl_sdmmc2_default: sdmmc2_default {
574                 cmd_data {
575                         pinmux = <PIN_PD3__SDMMC2_CMD>,
576                                  <PIN_PD5__SDMMC2_DAT0>,
577                                  <PIN_PD6__SDMMC2_DAT1>,
578                                  <PIN_PD7__SDMMC2_DAT2>,
579                                  <PIN_PD8__SDMMC2_DAT3>;
580                         bias-pull-up;
581                 };
582
583                 ck {
584                         pinmux = <PIN_PD4__SDMMC2_CK>;
585                         bias-pull-up;
586                 };
587         };
588
589         pinctrl_spdifrx_default: spdifrx_default {
590                 pinmux = <PIN_PB0__SPDIF_RX>;
591                 bias-disable;
592         };
593
594         pinctrl_spdiftx_default: spdiftx_default {
595                 pinmux = <PIN_PB1__SPDIF_TX>;
596                 bias-disable;
597         };
598 };
599
600 &pwm {
601         pinctrl-names = "default";
602         pinctrl-0 = <&pinctrl_mikrobus1_pwm2_default &pinctrl_mikrobus2_pwm3_default>;
603         status = "disabled"; /* Conflict with leds. */
604 };
605
606 &rtt {
607         atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
608 };
609
610 &sdmmc0 {
611         bus-width = <8>;
612         non-removable;
613         no-1-8-v;
614         sdhci-caps-mask = <0x0 0x00200000>;
615         pinctrl-names = "default";
616         pinctrl-0 = <&pinctrl_sdmmc0_default>;
617         status = "okay";
618 };
619
620 &sdmmc1 {
621         bus-width = <4>;
622         no-1-8-v;
623         sdhci-caps-mask = <0x0 0x00200000>;
624         pinctrl-names = "default";
625         pinctrl-0 = <&pinctrl_sdmmc1_default>;
626         status = "okay";
627 };
628
629 &sdmmc2 {
630         bus-width = <4>;
631         no-1-8-v;
632         sdhci-caps-mask = <0x0 0x00200000>;
633         pinctrl-names = "default";
634         pinctrl-0 = <&pinctrl_sdmmc2_default>;
635 };
636
637 &spdifrx {
638         pinctrl-names = "default";
639         pinctrl-0 = <&pinctrl_spdifrx_default>;
640         status = "okay";
641 };
642
643 &spdiftx {
644         pinctrl-names = "default";
645         pinctrl-0 = <&pinctrl_spdiftx_default>;
646         status = "okay";
647 };
648
649 &trng {
650         status = "okay";
651 };
652
653 &vddout25 {
654         vin-supply = <&vdd_3v3>;
655         status = "okay";
656 };