1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtrv1.dts linux-4.9.87/arch/arm/boot/dts/mtrv1.dts
--- linux-4.9.87.orig/arch/arm/boot/dts/mtrv1.dts 1969-12-31 18:00:00.000000000 -0600
+++ linux-4.9.87/arch/arm/boot/dts/mtrv1.dts 2019-05-07 19:03:19.378605555 -0500
@@ -0,0 +1,278 @@
+/*
+ * DTS file for Multi-Tech Systems MTRv1 Hardware
+ *
+ * Copyright (C) 2016 by Multi-Tech Systems,
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/dts-v1/;
+#include "at91sam9g25.dtsi"
+#include "at91sam9x5ek.dtsi"
+
+/ {
+ model = "Multi-Tech Systems MTR";
+ compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+ aliases {
+ serial1 = &uart0;
+ };
+
+ chosen {
+ bootargs = "mem=128M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2";
+ };
+
+ memory {
+ reg = <0x20000000 0x8000000>;
+ };
+
+ clocks {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ main_clock: clock@0 {
+ compatible = "atmel,osc", "fixed-clock";
+ clock-frequency = <12000000>;
+ };
+ };
+
+ ahb {
+ apb {
+ /delete-node/ spi@f0004000;
+ macb0: ethernet@f802c000 {
+ phy-mode = "rmii";
+ status = "okay";
+ };
+
+
+ pinctrl@fffff400 {
+ nand {
+ pinctrl_nand: nand-0 {
+ atmel,pins =
+ <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A Read Enable */
+ AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD1 periph A Write Enable */
+ AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A Address Latch Enable */
+ AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD3 periph A Command Latch Enable */
+ AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD4 gpio Chip Enable pin pull_up */
+ AT91_PIOC 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC31 gpio RDY/BUSY pin pull_up */
+ AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD6 periph A Data bit 0 */
+ AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD7 periph A Data bit 1 */
+ AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD8 periph A Data bit 2 */
+ AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD9 periph A Data bit 3 */
+ AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD10 periph A Data bit 4 */
+ AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD11 periph A Data bit 5 */
+ AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD12 periph A Data bit 6 */
+ AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD13 periph A Data bit 7 */
+ };
+ /delete-node/ nand_16bits-0;
+ };
+
+ /delete-node/ spi1;
+ /delete-node/ mmc0;
+ mts-io {
+ pinctrl_mts_io_out: mts_io-0 {
+ atmel,pins =
+ <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD14 WiFi BT reset */
+ AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD16 Secure reset */
+ AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD17 MTQ reset */
+ AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD18 USB Hub reset */
+ AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD19 GNSS Int */
+ output-high;
+ };
+ pinctrl_mts_io_in: mts_io-1 {
+ atmel,pins =
+ <AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD20 WiFi_BT_LPMode Input */
+ };
+ pinctrl_mts_io_gnss: mts_io-2 {
+ atmel,pins =
+ <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD20 WiFi_BT_LPMode Input */
+ output-low;
+ };
+ };
+ /*
+ * Pin A23 will be left floating when the power goes off on the radio.
+ * We need to pull it down to ensure it is low during radio power-off.
+ * pinctrl is loaded during the call to platform_device_register() in mts-io.
+ * If we need to customize this for various hardware revisions, these can
+ * be loaded as overlays prior to loading the mts-io module, overwriting the
+ * atmel,pins section.
+ */
+ mts_io {
+ pinctrl_mts_io: mts_io-0 {
+ atmel,pins =
+ <AT91_PIOA 21 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA21 GPIO pull-up radio-power */
+ AT91_PIOA 22 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA22 GPIO pull-up radio-reset */
+ AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>; /* PA23 GPIO pull-down radio-monitor */
+ };
+ };
+
+ 1wire_cm {
+ pinctrl_1wire_cm: 1wire_cm-0 {
+ atmel,pins = <AT91_PIOB 18 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PB18 multidrive, conflicts with led */
+ };
+ };
+ };
+
+ rtc@fffffeb0 {
+ status = "okay";
+ };
+
+ dbgu: serial@fffff200 {
+ status = "okay";
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ };
+
+ spi@f0000000 {
+ /delete-node/ m25p80@0;
+ };
+
+ /delete-node/ serial@f801c000;
+ /delete-node/ mmc@f0008000;
+
+ uart0: serial@f8040000 {
+ status = "okay";
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(11)>,
+ <&dma0 1 (AT91_DMA_CFG_PER_ID(12) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
+ };
+
+ usb2: gadget@f803c000 {
+ /delete-property/ atmel,vbus-gpio; /* mtrv1 has no vbus-gpio */
+ status = "okay";
+ };
+ watchdog@fffffe40 {
+ status = "okay";
+ };
+ };
+
+ nand0: nand@40000000 {
+ nand-bus-width = <8>;
+ nand-ecc-mode = "hw";
+ atmel,has-pmecc; /* Enable PMECC */
+ atmel,pmecc-sector-size = <512>;
+ status = "okay";
+ reg = < 0x40000000 0x10000000
+ 0xffffe000 0x600 /* PMECC Registers */
+ 0xffffe600 0x200 /* PMECC Error Location Registers */
+ 0x00100000 0x100000 /* PMECC looup table in ROM code */
+ >;
+ atmel,pmecc-lookup-table-offset = <0x8000 0x10000>;
+ gpios = < &pioC 31 GPIO_ACTIVE_HIGH
+ &pioD 4 GPIO_ACTIVE_HIGH
+ 0
+ >;
+ atmel,pmecc-cap = <4>;
+ atmel,nand-has-dma;
+
+ nand@0 {
+ label = "NANDFlash";
+ reg = <0x0 0x10000000>;
+ };
+ at91bootstrap@0 {
+ label = "at91bootstrap";
+ reg = <0x0 0x40000>;
+ };
+ uboot@40000 {
+ label = "u-Boot";
+ reg = <0x40000 0x80000>;
+ };
+ ubootconfig0@c0000 {
+ label = "u-Boot Config";
+ reg = <0xc0000 0xa0000>;
+ };
+ ubootconfig1@160000 {
+ label = "u-Boot Redundant Config";
+ reg = <0x160000 0xa0000>;
+ };
+ uImage@200000 {
+ label = "uImage";
+ reg = <0x200000 0x600000>;
+ };
+ config0@800000 {
+ label = "Config";
+ reg = <0x800000 0x800000>;
+ };
+ config1@1000000 {
+ label = "OEM Config";
+ reg = <0x1000000 0x800000>;
+ };
+ rootfs@1800000 {
+ label = "Rootfs";
+ reg = <0x1800000 0x8000000>;
+ };
+ user@9800000 {
+ label = "User data";
+ reg = <0x9800000 0x6800000>;
+ };
+ };
+
+ usb0: ohci@00600000 {
+ status = "okay";
+ num-ports = <3>;
+ };
+
+ usb1: ehci@00700000 {
+ status = "okay";
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ pc21 {
+ label = "led-status";
+ gpios = <&pioC 21 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+ pc15 {
+ label = "led-b";
+ gpios = <&pioC 15 GPIO_ACTIVE_LOW>;
+ };
+ pc20 {
+ label = "led-c";
+ gpios = <&pioC 20 GPIO_ACTIVE_LOW>;
+ };
+ pc19 {
+ label = "led-d";
+ gpios = <&pioC 19 GPIO_ACTIVE_LOW>;
+ };
+ pc18 {
+ label = "led-e";
+ gpios = <&pioC 18 GPIO_ACTIVE_LOW>;
+ };
+ pc17 {
+ label = "led-f";
+ gpios = <&pioC 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ i2c-gpio-0 {
+ status = "okay";
+
+ id_eeprom@56 {
+ compatible = "atmel,24c04";
+ reg = <0x56>;
+ pagesize = <16>;
+ status = "okay";
+ };
+ };
+
+ pps-0 {
+ compatible = "pps-gpio";
+ gpios = <&pioB 18 0>; /* MTRV1-0.0 */
+ capture-clear;
+ status = "okay";
+ };
+
+ mts-io-0 {
+ status = "okay";
+ compatible = "mts,mts-io";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mts_io_out>;
+ pinctrl-1 = <&pinctrl_mts_io_in>;
+ pinctrl-2 = <&pinctrl_mts_io_gnss>;
+ };
+};
diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5cm.dtsi linux-4.9.87/arch/arm/boot/dts/at91sam9x5cm.dtsi
--- linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5cm.dtsi 2019-01-03 15:21:25.339570341 -0600
+++ linux-4.9.87/arch/arm/boot/dts/at91sam9x5cm.dtsi 2019-01-03 15:17:51.911576659 -0600
@@ -43,48 +43,8 @@
atmel,has-pmecc; /* Enable PMECC */
atmel,pmecc-cap = <2>;
atmel,pmecc-sector-size = <512>;
- nand-on-flash-bbt;
+ /* nand-on-flash-bbt; */
status = "okay";
-
- at91bootstrap@0 {
- label = "at91bootstrap";
- reg = <0x0 0x40000>;
- };
-
- uboot@40000 {
- label = "u-boot";
- reg = <0x40000 0x80000>;
- };
-
- ubootenv@c0000 {
- label = "U-Boot Env";
- reg = <0xc0000 0x140000>;
- };
-
- kernel@200000 {
- label = "kernel";
- reg = <0x200000 0x600000>;
- };
-
- rootfs@800000 {
- label = "rootfs";
- reg = <0x800000 0x1f800000>;
- };
- };
- };
-
- leds {
- compatible = "gpio-leds";
-
- pb18 {
- label = "pb18";
- gpios = <&pioB 18 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "heartbeat";
- };
-
- pd21 {
- label = "pd21";
- gpios = <&pioD 21 GPIO_ACTIVE_HIGH>;
};
};
@@ -96,5 +56,4 @@
pinctrl-0 = <&pinctrl_1wire_cm>;
status = "okay";
};
-
};
diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi linux-4.9.87/arch/arm/boot/dts/at91sam9x5ek.dtsi
--- linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi 2018-03-27 11:05:05.000000000 -0500
+++ linux-4.9.87/arch/arm/boot/dts/at91sam9x5ek.dtsi 2019-01-23 19:14:23.443999491 -0600
@@ -25,23 +25,11 @@
&pinctrl_mmc0_slot0_clk_cmd_dat0
&pinctrl_mmc0_slot0_dat1_3>;
status = "okay";
+ /* external micro SD slot */
slot@0 {
reg = <0>;
bus-width = <4>;
- cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
- };
- };
-
- mmc1: mmc@f000c000 {
- pinctrl-0 = <
- &pinctrl_board_mmc1
- &pinctrl_mmc1_slot0_clk_cmd_dat0
- &pinctrl_mmc1_slot0_dat1_3>;
- status = "okay";
- slot@0 {
- reg = <0>;
- bus-width = <4>;
- cd-gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
+ cd-gpios = <&pioA 1 GPIO_ACTIVE_HIGH>;
};
};
@@ -58,25 +46,12 @@
usb2: gadget@f803c000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_board_usb2>;
- atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
- status = "okay";
- };
-
- i2c0: i2c@f8010000 {
- status = "okay";
-
- wm8731: wm8731@1a {
- compatible = "wm8731";
- reg = <0x1a>;
- };
- };
-
- adc0: adc@f804c000 {
- atmel,adc-ts-wires = <4>;
- atmel,adc-ts-pressure-threshold = <10000>;
+ /* atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; mtcdt: no vbus-gpio */
status = "okay";
};
+ /* A/D convertor is unusable on Conduit */
+
pinctrl@fffff400 {
camera_sensor {
pinctrl_pck0_as_isi_mck: pck0_as_isi_mck-0 {
@@ -118,7 +93,7 @@
};
spi0: spi@f0000000 {
- status = "disabled"; /* conflict with mmc1 */
+ status = "okay";
cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
m25p80@0 {
compatible = "atmel,at25df321a";
@@ -131,37 +106,20 @@
status = "okay";
};
- ssc0: ssc@f0010000 {
- status = "okay";
- };
};
usb0: ohci@00600000 {
status = "okay";
num-ports = <3>;
- atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */
- &pioD 19 GPIO_ACTIVE_LOW
- &pioD 20 GPIO_ACTIVE_LOW
- >;
+ //mtcdt: no vbus-gpio
+ // atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */
+ // &pioD 19 GPIO_ACTIVE_LOW
+ // &pioD 20 GPIO_ACTIVE_LOW
+ // >;
};
usb1: ehci@00700000 {
status = "okay";
};
};
-
- sound {
- compatible = "atmel,sam9x5-wm8731-audio";
-
- atmel,model = "wm8731 @ AT91SAM9X5EK";
-
- atmel,audio-routing =
- "Headphone Jack", "RHPOUT",
- "Headphone Jack", "LHPOUT",
- "LLINEIN", "Line In Jack",
- "RLINEIN", "Line In Jack";
-
- atmel,ssc-controller = <&ssc0>;
- atmel,audio-codec = <&wm8731>;
- };
};
diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/Makefile linux-4.9.87/arch/arm/boot/dts/Makefile
--- linux-4.9.87.orig/arch/arm/boot/dts/Makefile 2019-01-03 15:21:25.339570341 -0600
+++ linux-4.9.87/arch/arm/boot/dts/Makefile 2019-01-03 15:17:51.911576659 -0600
@@ -43,7 +43,8 @@
at91sam9g25ek.dtb \
at91sam9g35ek.dtb \
at91sam9x25ek.dtb \
- at91sam9x35ek.dtb
+ at91sam9x35ek.dtb \
+ mtrv1.dtb
dtb-$(CONFIG_SOC_SAM_V7) += \
at91-kizbox2.dtb \
at91-sama5d2_ptc_ek.dtb \
diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5.dtsi linux-4.9.87/arch/arm/boot/dts/at91sam9x5.dtsi
--- linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5.dtsi 2019-01-03 15:21:25.339570341 -0600
+++ linux-4.9.87/arch/arm/boot/dts/at91sam9x5.dtsi 2019-01-03 15:17:51.911576659 -0600
@@ -32,9 +32,6 @@
gpio3 = &pioD;
tcb0 = &tcb0;
tcb1 = &tcb1;
- i2c0 = &i2c0;
- i2c1 = &i2c1;
- i2c2 = &i2c2;
ssc0 = &ssc0;
pwm0 = &pwm0;
};
@@ -963,50 +960,7 @@
status = "disabled";
};
- i2c0: i2c@f8010000 {
- compatible = "atmel,at91sam9x5-i2c";
- reg = <0xf8010000 0x100>;
- interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
- dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(7)>,
- <&dma0 1 AT91_DMA_CFG_PER_ID(8)>;
- dma-names = "tx", "rx";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_i2c0>;
- clocks = <&twi0_clk>;
- status = "disabled";
- };
-
- i2c1: i2c@f8014000 {
- compatible = "atmel,at91sam9x5-i2c";
- reg = <0xf8014000 0x100>;
- interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>;
- dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(5)>,
- <&dma1 1 AT91_DMA_CFG_PER_ID(6)>;
- dma-names = "tx", "rx";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_i2c1>;
- clocks = <&twi1_clk>;
- status = "disabled";
- };
-
- i2c2: i2c@f8018000 {
- compatible = "atmel,at91sam9x5-i2c";
- reg = <0xf8018000 0x100>;
- interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
- dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(9)>,
- <&dma0 1 AT91_DMA_CFG_PER_ID(10)>;
- dma-names = "tx", "rx";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_i2c2>;
- clocks = <&twi2_clk>;
- status = "disabled";
- };
+ /* /delete_node/ command does not work. */
uart0: serial@f8040000 {
compatible = "atmel,at91sam9260-usart";
|