Skip to content

Commit 8e2f36c

Browse files
nandojvedkalowsk
authored andcommitted
dts: atmel: sam0: Normalize dtsi nodes
Keep a consistent order on the nodes definitions to make it easy to read between all the SoC series. Signed-off-by: Gerson Fernando Budke <[email protected]> (cherry picked from commit 6f1f598)
1 parent d70bbe0 commit 8e2f36c

File tree

10 files changed

+164
-76
lines changed

10 files changed

+164
-76
lines changed

dts/arm/atmel/samc21.dtsi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@
1515
soc {
1616
adc1: adc@42004800 {
1717
compatible = "atmel,sam0-adc";
18-
status = "disabled";
1918
reg = <0x42004800 0x30>;
2019
interrupts = <26 0>;
2120
interrupt-names = "resrdy";
2221
clocks = <&gclk 34>, <&mclk 0x1c 18>;
2322
clock-names = "GCLK", "MCLK";
23+
status = "disabled";
24+
25+
#io-channel-cells = <1>;
26+
2427
gclk = <0>;
2528
prescaler = <4>;
26-
#io-channel-cells = <1>;
2729
};
2830

2931
sercom4: sercom@42001400 {
@@ -51,9 +53,10 @@
5153
interrupt-names = "int0";
5254
clocks = <&gclk 26>, <&mclk 0x10 8>;
5355
clock-names = "GCLK", "MCLK";
56+
status = "disabled";
57+
5458
bosch,mram-cfg = <0x0 28 8 3 3 0 1 1>;
5559
divider = <12>;
56-
status = "disabled";
5760
};
5861

5962
can1: can@42002000 {
@@ -63,9 +66,10 @@
6366
interrupt-names = "int0";
6467
clocks = <&gclk 27>, <&mclk 0x10 9>;
6568
clock-names = "GCLK", "MCLK";
69+
status = "disabled";
70+
6671
bosch,mram-cfg = <0x0 28 8 3 3 0 1 1>;
6772
divider = <12>;
68-
status = "disabled";
6973
};
7074
};
7175
};

dts/arm/atmel/samc2x.dtsi

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
#size-cells = <0>;
2626

2727
cpu0: cpu@0 {
28-
device_type = "cpu";
2928
compatible = "arm,cortex-m0+";
3029
reg = <0>;
30+
31+
device_type = "cpu";
3132
};
3233
};
3334

@@ -63,26 +64,30 @@
6364
compatible = "atmel,sam0-nvmctrl";
6465
reg = <0x41004000 0x22>;
6566
interrupts = <6 0>;
66-
lock-regions = <16>;
6767

6868
#address-cells = <1>;
6969
#size-cells = <1>;
7070

71+
lock-regions = <16>;
72+
7173
flash0: flash@0 {
7274
compatible = "soc-nv-flash";
75+
7376
write-block-size = <4>;
7477
};
7578
};
7679

7780
mclk: mclk@40000800 {
7881
compatible = "atmel,samc2x-mclk";
7982
reg = <0x40000800 0x400>;
83+
8084
#clock-cells = <2>;
8185
};
8286

8387
gclk: gclk@40001c00 {
8488
compatible = "atmel,samc2x-gclk";
8589
reg = <0x40001c00 0x400>;
90+
8691
#clock-cells = <1>;
8792
};
8893

@@ -107,20 +112,23 @@
107112
compatible = "atmel,sam0-dmac";
108113
reg = <0x41006000 0x50>;
109114
interrupts = <7 0>;
115+
110116
#dma-cells = <2>;
111117
};
112118

113119
adc0: adc@42004400 {
114120
compatible = "atmel,sam0-adc";
115-
status = "disabled";
116121
reg = <0x42004400 0x30>;
117122
interrupts = <25 0>;
118123
interrupt-names = "resrdy";
119124
clocks = <&gclk 33>, <&mclk 0x1c 17>;
120125
clock-names = "GCLK", "MCLK";
126+
status = "disabled";
127+
128+
#io-channel-cells = <1>;
129+
121130
gclk = <0>;
122131
prescaler = <4>;
123-
#io-channel-cells = <1>;
124132
};
125133

126134
sercom0: sercom@42000400 {
@@ -194,41 +202,49 @@
194202

195203
pinctrl: pinctrl@41000000 {
196204
compatible = "atmel,sam0-pinctrl";
205+
ranges = <0x41000000 0x41000000 0x180>;
206+
197207
#address-cells = <1>;
198208
#size-cells = <1>;
199-
ranges = <0x41000000 0x41000000 0x180>;
200209

201210
porta: gpio@41000000 {
202211
compatible = "atmel,sam0-gpio";
203212
reg = <0x41000000 0x80>;
204-
gpio-controller;
205-
#gpio-cells = <2>;
213+
206214
#atmel,pin-cells = <2>;
215+
#gpio-cells = <2>;
216+
217+
gpio-controller;
207218
};
208219

209220
portb: gpio@41000080 {
210221
compatible = "atmel,sam0-gpio";
211222
reg = <0x41000080 0x80>;
212-
gpio-controller;
213-
#gpio-cells = <2>;
223+
214224
#atmel,pin-cells = <2>;
225+
#gpio-cells = <2>;
226+
227+
gpio-controller;
215228
};
216229

217230
portc: gpio@41000100 {
218231
compatible = "atmel,sam0-gpio";
219232
reg = <0x41000100 0x80>;
220-
gpio-controller;
221-
#gpio-cells = <2>;
233+
222234
#atmel,pin-cells = <2>;
235+
#gpio-cells = <2>;
236+
237+
gpio-controller;
223238
};
224239
};
225240

226241
rtc: rtc@40002400 {
227242
compatible = "atmel,sam0-rtc";
228243
reg = <0x40002400 0x1C>;
229244
interrupts = <3 0>;
230-
clock-generator = <0>;
231245
status = "disabled";
246+
247+
clock-generator = <0>;
232248
};
233249
};
234250
};

dts/arm/atmel/samd21.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@
1414
soc {
1515
usb0: usb@41005000 {
1616
compatible = "atmel,sam0-usb";
17-
status = "disabled";
1817
reg = <0x41005000 0x1000>;
1918
interrupts = <7 0>;
19+
status = "disabled";
20+
2021
num-bidir-endpoints = <8>;
2122
};
2223

2324
dmac: dmac@41004800 {
2425
compatible = "atmel,sam0-dmac";
2526
reg = <0x41004800 0x50>;
2627
interrupts = <6 0>;
28+
2729
#dma-cells = <2>;
2830
};
2931

dts/arm/atmel/samd2x.dtsi

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
#size-cells = <0>;
2626

2727
cpu0: cpu@0 {
28-
device_type = "cpu";
2928
compatible = "arm,cortex-m0+";
3029
reg = <0>;
30+
31+
device_type = "cpu";
3132
};
3233
};
3334

@@ -63,13 +64,15 @@
6364
compatible = "atmel,sam0-nvmctrl";
6465
reg = <0x41004000 0x22>;
6566
interrupts = <5 0>;
66-
lock-regions = <16>;
6767

6868
#address-cells = <1>;
6969
#size-cells = <1>;
7070

71+
lock-regions = <16>;
72+
7173
flash0: flash@0 {
7274
compatible = "soc-nv-flash";
75+
7376
write-block-size = <4>;
7477
};
7578
};
@@ -78,12 +81,14 @@
7881
compatible = "atmel,samd2x-pm";
7982
reg = <0x40000400 0x400>;
8083
interrupts = <0 0>;
84+
8185
#clock-cells = <2>;
8286
};
8387

8488
gclk: gclk@40000c00 {
8589
compatible = "atmel,samd2x-gclk";
8690
reg = <0x40000c00 0x400>;
91+
8792
#clock-cells = <1>;
8893
};
8994

@@ -148,57 +153,65 @@
148153
tc4: tc@42003000 {
149154
compatible = "atmel,sam0-tc32";
150155
reg = <0x42003000 0x20>;
156+
status = "disabled";
151157
};
152158

153159
pinctrl: pinctrl@41004400 {
154160
compatible = "atmel,sam0-pinctrl";
161+
ranges = <0x41004400 0x41004400 0x100>;
162+
155163
#address-cells = <1>;
156164
#size-cells = <1>;
157-
ranges = <0x41004400 0x41004400 0x100>;
158165

159166
porta: gpio@41004400 {
160167
compatible = "atmel,sam0-gpio";
161168
reg = <0x41004400 0x80>;
162-
gpio-controller;
163-
#gpio-cells = <2>;
169+
164170
#atmel,pin-cells = <2>;
171+
#gpio-cells = <2>;
165172

173+
gpio-controller;
166174
};
167175

168176
portb: gpio@41004480 {
169177
compatible = "atmel,sam0-gpio";
170178
reg = <0x41004480 0x80>;
171-
gpio-controller;
172-
#gpio-cells = <2>;
179+
173180
#atmel,pin-cells = <2>;
181+
#gpio-cells = <2>;
182+
183+
gpio-controller;
174184
};
175185
};
176186

177187
rtc: rtc@40001400 {
178188
compatible = "atmel,sam0-rtc";
179189
reg = <0x40001400 0x1C>;
180190
interrupts = <3 0>;
181-
clock-generator = <0>;
182191
status = "disabled";
192+
193+
clock-generator = <0>;
183194
};
184195

185196
adc: adc@42004000 {
186197
compatible = "atmel,sam0-adc";
187198
reg = <0x42004000 0x2B>;
188199

200+
#io-channel-cells = <1>;
201+
189202
/*
190203
* 2.1 MHz max, so clock it with the
191204
* 8 MHz GCLK / 4 = 2 MHz
192205
*/
193206
gclk = <3>;
194207
prescaler = <4>;
195-
#io-channel-cells = <1>;
196208
};
197209

198210
dac0: dac@42004800 {
199211
compatible = "atmel,sam0-dac";
200-
status = "disabled";
201212
reg = <0x42004800 0x10>;
213+
status = "disabled";
214+
202215
#io-channel-cells = <0>;
203216
};
204217
};

0 commit comments

Comments
 (0)