hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/at91-sama5d2_xplained.dts
....@@ -1,56 +1,28 @@
1
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
12 /*
23 * at91-sama5d2_xplained.dts - Device Tree file for SAMA5D2 Xplained board
34 *
45 * Copyright (C) 2015 Atmel,
56 * 2015 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.
447 */
458 /dts-v1/;
469 #include "sama5d2.dtsi"
4710 #include "sama5d2-pinfunc.h"
4811 #include <dt-bindings/mfd/atmel-flexcom.h>
4912 #include <dt-bindings/gpio/gpio.h>
13
+#include <dt-bindings/input/input.h>
14
+#include <dt-bindings/regulator/active-semi,8945a-regulator.h>
5015
5116 / {
5217 model = "Atmel SAMA5D2 Xplained";
5318 compatible = "atmel,sama5d2-xplained", "atmel,sama5d2", "atmel,sama5";
19
+
20
+ aliases {
21
+ serial0 = &uart1; /* DBGU */
22
+ i2c0 = &i2c0;
23
+ i2c1 = &i2c1;
24
+ i2c2 = &i2c2; /* XPRO EXT2 */
25
+ };
5426
5527 chosen {
5628 stdout-path = "serial0:115200n8";
....@@ -108,6 +80,58 @@
10880 };
10981
11082 apb {
83
+ qspi0: spi@f0020000 {
84
+ pinctrl-names = "default";
85
+ pinctrl-0 = <&pinctrl_qspi0_default>;
86
+ status = "disabled"; /* conflict with sdmmc1 */
87
+
88
+ flash@0 {
89
+ #address-cells = <1>;
90
+ #size-cells = <1>;
91
+ compatible = "jedec,spi-nor";
92
+ reg = <0>;
93
+ spi-max-frequency = <80000000>;
94
+ spi-tx-bus-width = <4>;
95
+ spi-rx-bus-width = <4>;
96
+ m25p,fast-read;
97
+
98
+ at91bootstrap@00000000 {
99
+ label = "at91bootstrap";
100
+ reg = <0x00000000 0x00040000>;
101
+ };
102
+
103
+ bootloader@00040000 {
104
+ label = "bootloader";
105
+ reg = <0x00040000 0x000c0000>;
106
+ };
107
+
108
+ bootloaderenvred@00100000 {
109
+ label = "bootloader env redundant";
110
+ reg = <0x00100000 0x00040000>;
111
+ };
112
+
113
+ bootloaderenv@00140000 {
114
+ label = "bootloader env";
115
+ reg = <0x00140000 0x00040000>;
116
+ };
117
+
118
+ dtb@00180000 {
119
+ label = "device tree";
120
+ reg = <0x00180000 0x00080000>;
121
+ };
122
+
123
+ kernel@00200000 {
124
+ label = "kernel";
125
+ reg = <0x00200000 0x00600000>;
126
+ };
127
+
128
+ misc@00800000 {
129
+ label = "misc";
130
+ reg = <0x00800000 0x00000000>;
131
+ };
132
+ };
133
+ };
134
+
111135 spi0: spi@f8000000 {
112136 pinctrl-names = "default";
113137 pinctrl-0 = <&pinctrl_spi0_default>;
....@@ -145,16 +169,6 @@
145169 };
146170 };
147171
148
- pdmic@f8018000 {
149
- pinctrl-names = "default";
150
- pinctrl-0 = <&pinctrl_pdmic_default>;
151
- atmel,model = "PDMIC @ sama5d2_xplained";
152
- atmel,mic-min-freq = <1000000>;
153
- atmel,mic-max-freq = <3246000>;
154
- atmel,mic-offset = <0x0>;
155
- status = "okay";
156
- };
157
-
158172 uart1: serial@f8020000 {
159173 pinctrl-names = "default";
160174 pinctrl-0 = <&pinctrl_uart1_default>;
....@@ -165,8 +179,11 @@
165179
166180 i2c0: i2c@f8028000 {
167181 dmas = <0>, <0>;
168
- pinctrl-names = "default";
182
+ pinctrl-names = "default", "gpio";
169183 pinctrl-0 = <&pinctrl_i2c0_default>;
184
+ pinctrl-1 = <&pinctrl_i2c0_gpio>;
185
+ sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>;
186
+ scl-gpios = <&pioA PIN_PD22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
170187 i2c-sda-hold-time-ns = <350>;
171188 status = "okay";
172189
....@@ -181,49 +198,102 @@
181198 regulator-name = "VDD_1V35";
182199 regulator-min-microvolt = <1350000>;
183200 regulator-max-microvolt = <1350000>;
201
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
202
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
203
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
184204 regulator-always-on;
205
+
206
+ regulator-state-mem {
207
+ regulator-on-in-suspend;
208
+ regulator-suspend-min-microvolt=<1400000>;
209
+ regulator-suspend-max-microvolt=<1400000>;
210
+ regulator-changeable-in-suspend;
211
+ regulator-mode=<ACT8945A_REGULATOR_MODE_LOWPOWER>;
212
+ };
185213 };
186214
187215 vdd_1v2_reg: REG_DCDC2 {
188216 regulator-name = "VDD_1V2";
189217 regulator-min-microvolt = <1100000>;
190218 regulator-max-microvolt = <1300000>;
219
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
220
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
221
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
191222 regulator-always-on;
223
+
224
+ regulator-state-mem {
225
+ regulator-off-in-suspend;
226
+ };
192227 };
193228
194229 vdd_3v3_reg: REG_DCDC3 {
195230 regulator-name = "VDD_3V3";
196231 regulator-min-microvolt = <3300000>;
197232 regulator-max-microvolt = <3300000>;
233
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
234
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
235
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
198236 regulator-always-on;
237
+
238
+ regulator-state-mem {
239
+ regulator-off-in-suspend;
240
+ };
199241 };
200242
201243 vdd_fuse_reg: REG_LDO1 {
202244 regulator-name = "VDD_FUSE";
203245 regulator-min-microvolt = <2500000>;
204246 regulator-max-microvolt = <2500000>;
247
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
248
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
249
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
205250 regulator-always-on;
251
+
252
+ regulator-state-mem {
253
+ regulator-off-in-suspend;
254
+ };
206255 };
207256
208257 vdd_3v3_lp_reg: REG_LDO2 {
209258 regulator-name = "VDD_3V3_LP";
210259 regulator-min-microvolt = <3300000>;
211260 regulator-max-microvolt = <3300000>;
261
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
262
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
263
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
212264 regulator-always-on;
265
+
266
+ regulator-state-mem {
267
+ regulator-off-in-suspend;
268
+ };
213269 };
214270
215271 vdd_led_reg: REG_LDO3 {
216272 regulator-name = "VDD_LED";
217273 regulator-min-microvolt = <3300000>;
218274 regulator-max-microvolt = <3300000>;
275
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
276
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
277
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
219278 regulator-always-on;
279
+
280
+ regulator-state-mem {
281
+ regulator-off-in-suspend;
282
+ };
220283 };
221284
222285 vdd_sdhc_1v8_reg: REG_LDO4 {
223286 regulator-name = "VDD_SDHC_1V8";
224287 regulator-min-microvolt = <1800000>;
225288 regulator-max-microvolt = <1800000>;
289
+ regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
290
+ <ACT8945A_REGULATOR_MODE_LOWPOWER>;
291
+ regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
226292 regulator-always-on;
293
+
294
+ regulator-state-mem {
295
+ regulator-off-in-suspend;
296
+ };
227297 };
228298 };
229299
....@@ -255,20 +325,29 @@
255325 status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
256326
257327 uart5: serial@200 {
258
- compatible = "atmel,at91sam9260-usart";
259
- reg = <0x200 0x200>;
260
- interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
261
- clocks = <&flx0_clk>;
262
- clock-names = "usart";
328
+ dmas = <0>, <0>;
263329 pinctrl-names = "default";
264330 pinctrl-0 = <&pinctrl_flx0_default>;
265
- atmel,fifo-size = <32>;
266331 status = "okay";
332
+ };
333
+
334
+ i2c2: i2c@600 {
335
+ dmas = <0>, <0>;
336
+ pinctrl-names = "default", "gpio";
337
+ pinctrl-0 = <&pinctrl_flx0_default>;
338
+ pinctrl-1 = <&pinctrl_i2c2_gpio>;
339
+ sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>;
340
+ scl-gpios = <&pioA PIN_PB29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
341
+ i2c-sda-hold-time-ns = <350>;
342
+ i2c-analog-filter;
343
+ i2c-digital-filter;
344
+ i2c-digital-filter-width-ns = <35>;
345
+ status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
267346 };
268347 };
269348
270349 shdwc@f8048010 {
271
- atmel,shdwc-debouncer = <976>;
350
+ debounce-delay-us = <976>;
272351 atmel,wakeup-rtc-timer;
273352
274353 input@0 {
....@@ -279,6 +358,12 @@
279358
280359 watchdog@f8048040 {
281360 status = "okay";
361
+ };
362
+
363
+ i2s0: i2s@f8050000 {
364
+ pinctrl-names = "default";
365
+ pinctrl-0 = <&pinctrl_i2s0_default>;
366
+ status = "disabled"; /* conflict with can0 */
282367 };
283368
284369 can0: can@f8054000 {
....@@ -299,26 +384,30 @@
299384 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
300385 status = "okay";
301386
302
- i2c2: i2c@600 {
303
- compatible = "atmel,sama5d2-i2c";
304
- reg = <0x600 0x200>;
305
- interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
387
+ i2c6: i2c@600 {
306388 dmas = <0>, <0>;
307
- dma-names = "tx", "rx";
308
- #address-cells = <1>;
309
- #size-cells = <0>;
310
- clocks = <&flx4_clk>;
311
- pinctrl-names = "default";
389
+ pinctrl-names = "default", "gpio";
312390 pinctrl-0 = <&pinctrl_flx4_default>;
313
- atmel,fifo-size = <16>;
391
+ pinctrl-1 = <&pinctrl_flx4_gpio>;
392
+ sda-gpios = <&pioA PIN_PD12 GPIO_ACTIVE_HIGH>;
393
+ scl-gpios = <&pioA PIN_PD13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
394
+ i2c-analog-filter;
395
+ i2c-digital-filter;
396
+ i2c-digital-filter-width-ns = <35>;
314397 status = "okay";
315398 };
316399 };
317400
318401 i2c1: i2c@fc028000 {
319402 dmas = <0>, <0>;
320
- pinctrl-names = "default";
403
+ pinctrl-names = "default", "gpio";
321404 pinctrl-0 = <&pinctrl_i2c1_default>;
405
+ i2c-analog-filter;
406
+ i2c-digital-filter;
407
+ i2c-digital-filter-width-ns = <35>;
408
+ pinctrl-1 = <&pinctrl_i2c1_gpio>;
409
+ sda-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_HIGH>;
410
+ scl-gpios = <&pioA PIN_PD5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
322411 status = "okay";
323412
324413 at24@54 {
....@@ -392,12 +481,16 @@
392481 bias-pull-up;
393482 };
394483
395
- pinctrl_classd_default: classd_default {
484
+ pinctrl_classd_default_pfets: classd_default_pfets {
396485 pinmux = <PIN_PB1__CLASSD_R0>,
397
- <PIN_PB2__CLASSD_R1>,
398
- <PIN_PB3__CLASSD_R2>,
399
- <PIN_PB4__CLASSD_R3>;
486
+ <PIN_PB3__CLASSD_R2>;
400487 bias-pull-up;
488
+ };
489
+
490
+ pinctrl_classd_default_nfets: classd_default_nfets {
491
+ pinmux = <PIN_PB2__CLASSD_R1>,
492
+ <PIN_PB4__CLASSD_R3>;
493
+ bias-pull-down;
401494 };
402495
403496 pinctrl_flx0_default: flx0_default {
....@@ -412,15 +505,57 @@
412505 bias-disable;
413506 };
414507
508
+ pinctrl_flx4_gpio: flx4_gpio {
509
+ pinmux = <PIN_PD12__GPIO>,
510
+ <PIN_PD13__GPIO>;
511
+ bias-disable;
512
+ };
513
+
415514 pinctrl_i2c0_default: i2c0_default {
416515 pinmux = <PIN_PD21__TWD0>,
417516 <PIN_PD22__TWCK0>;
418517 bias-disable;
419518 };
420519
520
+ pinctrl_i2c0_gpio: i2c0_gpio {
521
+ pinmux = <PIN_PD21__GPIO>,
522
+ <PIN_PD22__GPIO>;
523
+ bias-disable;
524
+ };
525
+
421526 pinctrl_i2c1_default: i2c1_default {
422527 pinmux = <PIN_PD4__TWD1>,
423528 <PIN_PD5__TWCK1>;
529
+ bias-disable;
530
+ };
531
+
532
+ pinctrl_i2c1_gpio: i2c1_gpio {
533
+ pinmux = <PIN_PD4__GPIO>,
534
+ <PIN_PD5__GPIO>;
535
+ bias-disable;
536
+ };
537
+
538
+ pinctrl_i2c2_gpio: i2c2_gpio {
539
+ pinmux = <PIN_PB28__GPIO>,
540
+ <PIN_PB29__GPIO>;
541
+ bias-disable;
542
+ };
543
+
544
+ pinctrl_i2s0_default: i2s0_default {
545
+ pinmux = <PIN_PC1__I2SC0_CK>,
546
+ <PIN_PC2__I2SC0_MCK>,
547
+ <PIN_PC3__I2SC0_WS>,
548
+ <PIN_PC4__I2SC0_DI0>,
549
+ <PIN_PC5__I2SC0_DO0>;
550
+ bias-disable;
551
+ };
552
+
553
+ pinctrl_i2s1_default: i2s1_default {
554
+ pinmux = <PIN_PA15__I2SC1_CK>,
555
+ <PIN_PA14__I2SC1_MCK>,
556
+ <PIN_PA16__I2SC1_WS>,
557
+ <PIN_PA17__I2SC1_DI0>,
558
+ <PIN_PA18__I2SC1_DO0>;
424559 bias-disable;
425560 };
426561
....@@ -455,10 +590,20 @@
455590 bias-disable;
456591 };
457592
458
- pinctrl_pdmic_default: pdmic_default {
459
- pinmux = <PIN_PB26__PDMIC_DAT>,
460
- <PIN_PB27__PDMIC_CLK>;
461
- bias-disable;
593
+ pinctrl_qspi0_default: qspi0_default {
594
+ sck_cs {
595
+ pinmux = <PIN_PA22__QSPI0_SCK>,
596
+ <PIN_PA23__QSPI0_CS>;
597
+ bias-disable;
598
+ };
599
+
600
+ data {
601
+ pinmux = <PIN_PA24__QSPI0_IO0>,
602
+ <PIN_PA25__QSPI0_IO1>,
603
+ <PIN_PA26__QSPI0_IO2>,
604
+ <PIN_PA27__QSPI0_IO3>;
605
+ bias-pull-up;
606
+ };
462607 };
463608
464609 pinctrl_sdmmc0_default: sdmmc0_default {
....@@ -540,10 +685,16 @@
540685
541686 classd: classd@fc048000 {
542687 pinctrl-names = "default";
543
- pinctrl-0 = <&pinctrl_classd_default>;
688
+ pinctrl-0 = <&pinctrl_classd_default_pfets &pinctrl_classd_default_nfets>;
544689 atmel,pwm-type = "diff";
545690 atmel,non-overlap-time = <10>;
546691 status = "okay";
692
+ };
693
+
694
+ i2s1: i2s@fc04c000 {
695
+ pinctrl-names = "default";
696
+ pinctrl-0 = <&pinctrl_i2s1_default>;
697
+ status = "disabled"; /* conflict with spi0, sdmmc1 */
547698 };
548699
549700 can1: can@fc050000 {
....@@ -563,7 +714,7 @@
563714 bp1 {
564715 label = "PB_USER";
565716 gpios = <&pioA PIN_PB9 GPIO_ACTIVE_LOW>;
566
- linux,code = <0x104>;
717
+ linux,code = <KEY_PROG1>;
567718 wakeup-source;
568719 };
569720 };