Skip to content

Commit 503d458

Browse files
nandojvedkalowsk
authored andcommitted
dts: atmel: sam0: Explicity disable nodes
When running tests on sam0 platform was detected that pinctrl for ADC were not defined for some boards. To force an error at build time nodes should be explicity disabled. This explicity disable nodes on devicetree that require some user configuration. In addition, the adc feature were excluded in some boards and samr21-xpro was correct updated. Signed-off-by: Gerson Fernando Budke <[email protected]> (cherry picked from commit 162f728)
1 parent 8e2f36c commit 503d458

File tree

13 files changed

+54
-4
lines changed

13 files changed

+54
-4
lines changed

boards/atmel/sam0/samd20_xpro/samd20_xpro.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024 Gerson Fernando Budke <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
identifier: samd20_xpro
25
name: SAM D20 Xplained Pro
36
type: mcu
@@ -9,7 +12,6 @@ toolchain:
912
flash: 256
1013
ram: 32
1114
supported:
12-
- adc
1315
- flash
1416
- gpio
1517
- i2c

boards/atmel/sam0/samd21_xpro/samd21_xpro.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) 2018 Bryan O'Donoghue
22
# Copyright (c) 2024 Gerson Fernando Budke <[email protected]>
33
# SPDX-License-Identifier: Apache-2.0
4+
45
identifier: samd21_xpro
56
name: SAM D21 Xplained Pro
67
type: mcu
@@ -12,7 +13,6 @@ toolchain:
1213
flash: 256
1314
ram: 32
1415
supported:
15-
- adc
1616
- counter
1717
- dma
1818
- gpio

boards/atmel/sam0/samr21_xpro/samr21_xpro-pinctrl.dtsi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
/*
2-
* Copyright (c) 2022, Gerson Fernando Budke <[email protected]>
2+
* Copyright (c) 2022-2024, Gerson Fernando Budke <[email protected]>
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

66
#include <dt-bindings/pinctrl/samr21g-pinctrl.h>
77

88
&pinctrl {
9+
adc_default: adc_default {
10+
group1 {
11+
pinmux = <PA6B_ADC_AIN6>;
12+
};
13+
};
14+
915
pwm_default: pwm_default {
1016
group1 {
1117
pinmux = <PA19F_TCC0_WO3>;

boards/atmel/sam0/samr21_xpro/samr21_xpro.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
clock-frequency = <48000000>;
107107
};
108108

109+
&adc {
110+
status = "okay";
111+
pinctrl-0 = <&adc_default>;
112+
pinctrl-names = "default";
113+
};
114+
109115
&tcc0 {
110116
status = "okay";
111117
compatible = "atmel,sam0-tcc-pwm";

boards/atmel/sam0/samr21_xpro/samr21_xpro.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) 2019 Benjamin Valentin
2-
# Copyright (c) 2019-2024 Gerson Fernando Budke
2+
# Copyright (c) 2019-2024 Gerson Fernando Budke <[email protected]>
33
# SPDX-License-Identifier: Apache-2.0
4+
45
identifier: samr21_xpro
56
name: SAM R21 Xplained Pro
67
type: mcu

dts/arm/atmel/samc2x.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
compatible = "atmel,sam0-dmac";
113113
reg = <0x41006000 0x50>;
114114
interrupts = <7 0>;
115+
status = "disabled";
115116

116117
#dma-cells = <2>;
117118
};
@@ -173,6 +174,7 @@
173174
interrupts = <17 0>;
174175
clocks = <&gclk 28>, <&mclk 0x1c 9>;
175176
clock-names = "GCLK", "MCLK";
177+
status = "disabled";
176178

177179
channels = <4>;
178180
counter-size = <24>;
@@ -184,6 +186,7 @@
184186
interrupts = <18 0>;
185187
clocks = <&gclk 28>, <&mclk 0x1c 10>;
186188
clock-names = "GCLK", "MCLK";
189+
status = "disabled";
187190

188191
channels = <4>;
189192
counter-size = <24>;
@@ -195,6 +198,7 @@
195198
interrupts = <19 0>;
196199
clocks = <&gclk 29>, <&mclk 0x1c 11>;
197200
clock-names = "GCLK", "MCLK";
201+
status = "disabled";
198202

199203
channels = <2>;
200204
counter-size = <16>;

dts/arm/atmel/samd20.dtsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
interrupts = <13 0>;
2121
clocks = <&gclk 0x13>, <&pm 0x20 8>;
2222
clock-names = "GCLK", "PM";
23+
status = "disabled";
2324
};
2425

2526
tc2: tc@42002800 {
@@ -28,6 +29,7 @@
2829
interrupts = <15 0>;
2930
clocks = <&gclk 0x14>, <&pm 0x20 10>;
3031
clock-names = "GCLK", "PM";
32+
status = "disabled";
3133
};
3234

3335
tc6: tc@42003800 {
@@ -36,6 +38,7 @@
3638
interrupts = <19 0>;
3739
clocks = <&gclk 0x16>, <&pm 0x20 14>;
3840
clock-names = "GCLK", "PM";
41+
status = "disabled";
3942
};
4043
};
4144
};

dts/arm/atmel/samd21.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
compatible = "atmel,sam0-dmac";
2626
reg = <0x41004800 0x50>;
2727
interrupts = <6 0>;
28+
status = "disabled";
2829

2930
#dma-cells = <2>;
3031
};
@@ -35,6 +36,7 @@
3536
interrupts = <21 0>;
3637
clocks = <&gclk 0x1d>, <&pm 0x20 14>;
3738
clock-names = "GCLK", "PM";
39+
status = "disabled";
3840
};
3941

4042
tcc0: tcc@42002000 {
@@ -43,6 +45,7 @@
4345
interrupts = <15 0>;
4446
clocks = <&gclk 26>, <&pm 0x20 8>;
4547
clock-names = "GCLK", "PM";
48+
status = "disabled";
4649

4750
channels = <4>;
4851
counter-size = <24>;
@@ -54,6 +57,7 @@
5457
interrupts = <16 0>;
5558
clocks = <&gclk 26>, <&pm 0x20 9>;
5659
clock-names = "GCLK", "PM";
60+
status = "disabled";
5761

5862
channels = <2>;
5963
counter-size = <24>;
@@ -65,6 +69,7 @@
6569
interrupts = <17 0>;
6670
clocks = <&gclk 27>, <&pm 0x20 10>;
6771
clock-names = "GCLK", "PM";
72+
status = "disabled";
6873

6974
channels = <2>;
7075
counter-size = <16>;

dts/arm/atmel/samd2x.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@
196196
adc: adc@42004000 {
197197
compatible = "atmel,sam0-adc";
198198
reg = <0x42004000 0x2B>;
199+
status = "disabled";
199200

200201
#io-channel-cells = <1>;
201202

dts/arm/atmel/samd5x.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
compatible = "atmel,sam0-dmac";
126126
reg = <0x4100A000 0x50>;
127127
interrupts = <31 0>, <32 0>, <33 0>, <34 0>, <35 0>;
128+
status = "disabled";
128129

129130
#dma-cells = <2>;
130131
};
@@ -315,6 +316,7 @@
315316
interrupt-names = "overrun", "resrdy";
316317
clocks = <&gclk 40>, <&mclk 0x20 7>;
317318
clock-names = "GCLK", "MCLK";
319+
status = "disabled";
318320

319321
#io-channel-cells = <1>;
320322

@@ -336,6 +338,7 @@
336338
interrupt-names = "overrun", "resrdy";
337339
clocks = <&gclk 41>, <&mclk 0x20 8>;
338340
clock-names = "GCLK", "MCLK";
341+
status = "disabled";
339342

340343
#io-channel-cells = <1>;
341344

@@ -356,6 +359,7 @@
356359
interrupts = <107 0>;
357360
clocks = <&gclk 9>, <&mclk 0x14 14>;
358361
clock-names = "GCLK", "MCLK";
362+
status = "disabled";
359363
};
360364

361365
tc2: tc@4101a000 {
@@ -364,6 +368,7 @@
364368
interrupts = <109 0>;
365369
clocks = <&gclk 26>, <&mclk 0x18 13>;
366370
clock-names = "GCLK", "MCLK";
371+
status = "disabled";
367372
};
368373

369374
tc4: tc@42001400 {
@@ -372,6 +377,7 @@
372377
interrupts = <111 0>;
373378
clocks = <&gclk 30>, <&mclk 0x1c 5>;
374379
clock-names = "GCLK", "MCLK";
380+
status = "disabled";
375381
};
376382

377383
tc6: tc@43001400 {
@@ -380,6 +386,7 @@
380386
interrupts = <113 0>;
381387
clocks = <&gclk 39>, <&mclk 0x20 5>;
382388
clock-names = "GCLK", "MCLK";
389+
status = "disabled";
383390
};
384391

385392
tcc0: tcc@41016000 {
@@ -389,6 +396,7 @@
389396
<90 0>, <91 0>;
390397
clocks = <&gclk 25>, <&mclk 0x18 11>;
391398
clock-names = "GCLK", "MCLK";
399+
status = "disabled";
392400

393401
channels = <6>;
394402
counter-size = <24>;
@@ -400,6 +408,7 @@
400408
interrupts = <92 0>, <93 0>, <94 0>, <95 0>, <96 0>;
401409
clocks = <&gclk 25>, <&mclk 0x18 12>;
402410
clock-names = "GCLK", "MCLK";
411+
status = "disabled";
403412

404413
channels = <4>;
405414
counter-size = <24>;
@@ -411,6 +420,7 @@
411420
interrupts = <97 0>, <98 0>, <99 0>, <100 0>;
412421
clocks = <&gclk 29>, <&mclk 0x1c 3>;
413422
clock-names = "GCLK", "MCLK";
423+
status = "disabled";
414424

415425
channels = <3>;
416426
counter-size = <16>;
@@ -422,6 +432,7 @@
422432
interrupts = <101 0>, <102 0>, <103 0>;
423433
clocks = <&gclk 29>, <&mclk 0x1c 4>;
424434
clock-names = "GCLK", "MCLK";
435+
status = "disabled";
425436

426437
channels = <2>;
427438
counter-size = <16>;
@@ -433,6 +444,7 @@
433444
interrupts = <104 0>, <105 0>, <106 0>;
434445
clocks = <&gclk 38>, <&mclk 0x20 4>;
435446
clock-names = "GCLK", "MCLK";
447+
status = "disabled";
436448

437449
channels = <2>;
438450
counter-size = <16>;

0 commit comments

Comments
 (0)