1# Copyright (c) 2022 Gerson Fernando Budke
2# SPDX-License-Identifier: Apache-2.0
3#
4# Sources:
5# - SAM4E Datasheet (Revision H - 03/16)
6#
7# Pin codes:
8#
9# - 100 pins: c
10# - 144 pins: e
11
12model: atmel,sam
13
14family: sam4e
15
16map: SAM_PINMUX
17
18series: [4eX]
19
20variants:
21  - pincode: c
22    series: [4eX]
23  - pincode: e
24    series: [4eX]
25
26pins:
27  pa0:
28    pincodes: [c, e]
29    periph:
30      - [a, pwm, pwmh0]
31      - [b, tc0, tioa0]
32      - [c, ebi, a17, [c]]
33    wakeup:
34      - [x, supc, wkup0]
35  pa1:
36    pincodes: [c, e]
37    periph:
38      - [a, pwm, pwmh1]
39      - [b, tc0, tiob0]
40      - [c, ebi, a18, [c]]
41    wakeup:
42      - [x, supc, wkup1]
43  pa2:
44    pincodes: [c, e]
45    periph:
46      - [a, pwm, pwmh2]
47      - [c, dacc, datrg]
48    wakeup:
49      - [x, supc, wkup2]
50  pa3:
51    pincodes: [c, e]
52    periph:
53      - [a, twi0, twd]
54      - [b, spi, npcs3]
55  pa4:
56    pincodes: [c, e]
57    periph:
58      - [a, twi0, twck]
59      - [b, tc0, tclk0]
60    wakeup:
61      - [x, supc, wkup3]
62  pa5:
63    pincodes: [c, e]
64    periph:
65      - [b, spi, npcs3]
66      - [c, uart1, rxd]
67    wakeup:
68      - [x, supc, wkup4]
69  pa6:
70    pincodes: [c, e]
71    periph:
72      - [b, pmc, pck0]
73      - [c, uart1, txd]
74  pa7:
75    pincodes: [c, e]
76    periph:
77      - [b, pwm, pwmh3]
78    system:
79      - [s, supc, xin32]
80  pa8:
81    pincodes: [c, e]
82    periph:
83      - [b, afec0, adtrg]
84    wakeup:
85      - [x, supc, wkup5]
86    system:
87      - [s, supc, xout32]
88  pa9:
89    pincodes: [c, e]
90    periph:
91      - [a, uart0, rxd]
92      - [b, spi, npcs1]
93      - [c, pwm, pwmfi0]
94    wakeup:
95      - [x, supc, wkup6]
96  pa10:
97    pincodes: [c, e]
98    periph:
99      - [a, uart0, txd]
100      - [b, spi, npcs2]
101  pa11:
102    pincodes: [c, e]
103    periph:
104      - [a, spi, npcs0]
105      - [b, pwm, pwmh0]
106    wakeup:
107      - [x, supc, wkup7]
108  pa12:
109    pincodes: [c, e]
110    periph:
111      - [a, spi, miso]
112      - [b, pwm, pwmh1]
113  pa13:
114    pincodes: [c, e]
115    periph:
116      - [a, spi, mosi]
117      - [b, pwm, pwmh2]
118  pa14:
119    pincodes: [c, e]
120    periph:
121      - [a, spi, spck]
122      - [b, pwm, pwmh3]
123    wakeup:
124      - [x, supc, wkup8]
125  pa15:
126    pincodes: [c, e]
127    periph:
128      - [b, tc0, tioa1]
129      - [c, pwm, pwml3]
130    extra:
131      - [x, pio, piodcen1]
132    wakeup:
133      - [x, supc, wkup14]
134  pa16:
135    pincodes: [c, e]
136    periph:
137      - [b, tc0, tiob1]
138      - [c, pwm, pwml2]
139    extra:
140      - [x, pio, piodcen2]
141    wakeup:
142      - [x, supc, wkup15]
143  pa17:
144    pincodes: [c, e]
145    periph:
146      - [b, pmc, pck1]
147      - [c, pwm, pwmh3]
148    extra:
149      - [x, afec0, ad0]
150  pa18:
151    pincodes: [c, e]
152    periph:
153      - [b, pmc, pck2]
154      - [c, ebi, a14, [c]]
155    extra:
156      - [x, afec0, ad1]
157  pa19:
158    pincodes: [c, e]
159    periph:
160      - [b, pwm, pwml0]
161      - [c, ebi, a15, [c]]
162    extra:
163      - [x, afec0, ad2]
164    wakeup:
165      - [x, supc, wkup9]
166  pa20:
167    pincodes: [c, e]
168    periph:
169      - [b, pwm, pwml1]
170      - [c, ebi, a16, [c]]
171    extra:
172      - [x, afec0, ad3]
173    wakeup:
174      - [x, supc, wkup10]
175  pa21:
176    pincodes: [c, e]
177    periph:
178      - [a, usart1, rxd]
179      - [b, pmc, pck1]
180    extra:
181      - [x, afec1, ad2]
182  pa22:
183    pincodes: [c, e]
184    periph:
185      - [a, usart1, txd]
186      - [b, spi, npcs3]
187      - [c, ebi, ncs2, [c]]
188    extra:
189      - [x, afec1, ad3]
190  pa23:
191    pincodes: [c, e]
192    periph:
193      - [a, usart1, sck]
194      - [b, pwm, pwmh0]
195      - [c, ebi, a19, [c]]
196    extra:
197      - [x, pio, piodcclk]
198  pa24:
199    pincodes: [c, e]
200    periph:
201      - [a, usart1, rts]
202      - [b, pwm, pwmh1]
203      - [c, ebi, a20, [c]]
204    extra:
205      - [x, pio, piodc0]
206  pa25:
207    pincodes: [c, e]
208    periph:
209      - [a, usart1, cts]
210      - [b, pwm, pwmh2]
211      - [c, ebi, a23, [c]]
212    extra:
213      - [x, pio, piodc1]
214  pa26:
215    pincodes: [c, e]
216    periph:
217      - [a, usart1, dcd]
218      - [b, tc0, tioa2]
219      - [c, hsmci, mcda2]
220    extra:
221      - [x, pio, piodc2]
222  pa27:
223    pincodes: [c, e]
224    periph:
225      - [a, usart1, dtr]
226      - [b, tc0, tiob2]
227      - [c, hsmci, mcda3]
228    extra:
229      - [x, pio, piodc3]
230  pa28:
231    pincodes: [c, e]
232    periph:
233      - [a, usart1, dsr]
234      - [b, tc0, tclk1]
235      - [c, hsmci, mccda]
236    extra:
237      - [x, pio, piodc4]
238  pa29:
239    pincodes: [c, e]
240    periph:
241      - [a, usart1, ri]
242      - [b, tc0, tclk2]
243      - [c, hsmci, mcck]
244    extra:
245      - [x, pio, piodc5]
246  pa30:
247    pincodes: [c, e]
248    periph:
249      - [a, pwm, pwml2]
250      - [b, spi, npcs2]
251      - [c, hsmci, mcda0]
252    extra:
253      - [x, pio, piodc6]
254    wakeup:
255      - [x, supc, wkup11]
256  pa31:
257    pincodes: [c, e]
258    periph:
259      - [a, spi, npcs1]
260      - [b, pmc, pck2]
261      - [c, hsmci, mcda1]
262    extra:
263      - [x, pio, piodc7]
264  pb0:
265    pincodes: [c, e]
266    periph:
267      - [a, pwm, pwmh0]
268      - [c, usart0, rxd]
269    extra:
270      - [x, afec0, ad4]
271      - [x, rtc, out0]
272  pb1:
273    pincodes: [c, e]
274    periph:
275      - [a, pwm, pwmh1]
276      - [c, usart0, txd]
277    extra:
278      - [x, afec0, ad5]
279      - [x, rtc, out1]
280  pb2:
281    pincodes: [c, e]
282    periph:
283      - [a, can0, tx]
284      - [b, spi, npcs2]
285      - [c, usart0, cts]
286    extra:
287      - [x, afec1, ad0]
288    wakeup:
289      - [x, supc, wkup12]
290  pb3:
291    pincodes: [c, e]
292    periph:
293      - [a, can0, rx]
294      - [b, pmc, pck2]
295      - [c, usart0, rts]
296    extra:
297      - [x, afec1, ad1]
298  pb4:
299    pincodes: [c, e]
300    periph:
301      - [a, twi1, twd]
302      - [b, pwm, pwmh2]
303    system:
304      - [s, jtag, tdi]
305  pb5:
306    pincodes: [c, e]
307    periph:
308      - [a, twi1, twck]
309      - [b, pwm, pwml0]
310    wakeup:
311      - [x, supc, wkup13]
312    system:
313      - [s, jtag, tdo]
314      - [s, swd, traceswo]
315  pb6:
316    pincodes: [c, e]
317    system:
318      - [s, jtag, tms]
319      - [s, swd, swdio]
320  pb7:
321    pincodes: [c, e]
322    system:
323      - [s, jtag, tck]
324      - [s, swd, swclk]
325  pb8:
326    pincodes: [c, e]
327    system:
328      - [s, supc, xout]
329  pb9:
330    pincodes: [c, e]
331    system:
332      - [s, supc, xin]
333  pb10:
334    pincodes: [c, e]
335    system:
336      - [s, udp, ddm]
337  pb11:
338    pincodes: [c, e]
339    system:
340      - [s, udp, ddp]
341  pb12:
342    pincodes: [c, e]
343    periph:
344      - [a, pwm, pwml1]
345    system:
346      - [s, flash, erase]
347  pb13:
348    pincodes: [c, e]
349    periph:
350      - [a, pwm, pwml2]
351      - [b, pcm, pck0]
352      - [c, usart0, sck]
353    extra:
354      - [x, dacc, dac0]
355  pb14:
356    pincodes: [c, e]
357    periph:
358      - [a, spi, npcs1]
359      - [b, pwm, pwmh3]
360    extra:
361      - [x, dacc, dac1]
362  pc0:
363    pincodes: [c, e]
364    periph:
365      - [a, ebi, d0, [c]]
366      - [b, pwm, pwml0]
367    extra:
368      - [x, afec0, ad14]
369  pc1:
370    pincodes: [c, e]
371    periph:
372      - [a, ebi, d1, [c]]
373      - [b, pwm, pwml1]
374    extra:
375      - [x, afec1, ad4]
376  pc2:
377    pincodes: [c, e]
378    periph:
379      - [a, ebi, d2, [c]]
380      - [b, pwm, pwml2]
381    extra:
382      - [x, afec1, ad5]
383  pc3:
384    pincodes: [c, e]
385    periph:
386      - [a, ebi, d3, [c]]
387      - [b, pwm, pwml3]
388    extra:
389      - [x, afec1, ad6]
390  pc4:
391    pincodes: [c, e]
392    periph:
393      - [a, ebi, d4, [c]]
394      - [b, spi, npcs1]
395    extra:
396      - [x, afec1, ad7]
397  pc5:
398    pincodes: [c, e]
399    periph:
400      - [a, ebi, d5, [c]]
401      - [b, tc2, tioa6]
402  pc6:
403    pincodes: [c, e]
404    periph:
405      - [a, ebi, d6, [c]]
406      - [b, tc2, tiob6]
407  pc7:
408    pincodes: [c, e]
409    periph:
410      - [a, ebi, d7, [c]]
411      - [b, tc2, tclk6]
412  pc8:
413    pincodes: [c, e]
414    periph:
415      - [a, ebi, nwe, [c]]
416      - [b, tc2, tioa7]
417  pc9:
418    pincodes: [c, e]
419    periph:
420      - [a, ebi, nandoe, [c]]
421      - [b, tc2, tiob7]
422  pc10:
423    pincodes: [c, e]
424    periph:
425      - [a, ebi, nandwe, [c]]
426      - [b, tc2, tclk7]
427  pc11:
428    pincodes: [c, e]
429    periph:
430      - [a, ebi, nrd, [c]]
431      - [b, tc2, tioa8]
432  pc12:
433    pincodes: [c, e]
434    periph:
435      - [a, ebi, ncs3, [c]]
436      - [b, tc2, tiob8]
437      - [c, can1, rx]
438    extra:
439      - [x, afec0, ad8]
440  pc13:
441    pincodes: [c, e]
442    periph:
443      - [a, ebi, nwait, [c]]
444      - [b, pwm, pwml0]
445    extra:
446      - [x, afec0, ad6]
447  pc14:
448    pincodes: [c, e]
449    periph:
450      - [a, ebi, ncs0, [c]]
451      - [b, tc2, tclk8]
452  pc15:
453    pincodes: [c, e]
454    periph:
455      - [a, ebi, ncs1, [c]]
456      - [b, pwm, pwml1]
457      - [c, can1, tx]
458    extra:
459      - [x, afec0, ad7]
460  pc16:
461    pincodes: [c, e]
462    periph:
463      - [a, ebi, a21_nandale, [c]]
464  pc17:
465    pincodes: [c, e]
466    periph:
467      - [a, ebi, a22_nandcle, [c]]
468  pc18:
469    pincodes: [c, e]
470    periph:
471      - [a, ebi, a0, [c]]
472      - [b, pwm, pwmh0]
473  pc19:
474    pincodes: [c, e]
475    periph:
476      - [a, ebi, a1, [c]]
477      - [b, pwm, pwmh1]
478  pc20:
479    pincodes: [c, e]
480    periph:
481      - [a, ebi, a2, [c]]
482      - [b, pwm, pwmh2]
483  pc21:
484    pincodes: [c, e]
485    periph:
486      - [a, ebi, a3, [c]]
487      - [b, pwm, pwmh3]
488  pc22:
489    pincodes: [c, e]
490    periph:
491      - [a, ebi, a4, [c]]
492      - [b, pwm, pwml3]
493  pc23:
494    pincodes: [c, e]
495    periph:
496      - [a, ebi, a5, [c]]
497      - [b, tc1, tioa3]
498  pc24:
499    pincodes: [c, e]
500    periph:
501      - [a, ebi, a6, [c]]
502      - [b, tc1, tiob3]
503  pc25:
504    pincodes: [c, e]
505    periph:
506      - [a, ebi, a7, [c]]
507      - [b, tc1, tclk3]
508  pc26:
509    pincodes: [c, e]
510    periph:
511      - [a, ebi, a8, [c]]
512      - [b, tc1, tioa4]
513    extra:
514      - [x, afec0, ad12]
515  pc27:
516    pincodes: [c, e]
517    periph:
518      - [a, ebi, a9, [c]]
519      - [b, tc1, tiob4]
520    extra:
521      - [x, afec0, ad13]
522  pc28:
523    pincodes: [c, e]
524    periph:
525      - [a, ebi, a10, [c]]
526      - [b, tc1, tclk4]
527  pc29:
528    pincodes: [c, e]
529    periph:
530      - [a, ebi, a11, [c]]
531      - [b, tc1, tioa5]
532    extra:
533      - [x, afec0, ad9]
534  pc30:
535    pincodes: [c, e]
536    periph:
537      - [a, ebi, a12, [c]]
538      - [b, tc1, tiob5]
539    extra:
540      - [x, afec0, ad10]
541  pc31:
542    pincodes: [c, e]
543    periph:
544      - [a, ebi, a13, [c]]
545      - [b, tc1, tclk5]
546    extra:
547      - [x, afec0, ad11]
548  pd0:
549    pincodes: [c, e]
550    periph:
551      - [a, gmac, gtxck]
552  pd1:
553    pincodes: [c, e]
554    periph:
555      - [a, gmac, gtxen]
556  pd2:
557    pincodes: [c, e]
558    periph:
559      - [a, gmac, gtx0]
560  pd3:
561    pincodes: [c, e]
562    periph:
563      - [a, gmac, gtx1]
564  pd4:
565    pincodes: [c, e]
566    periph:
567      - [a, gmac, grxdv]
568  pd5:
569    pincodes: [c, e]
570    periph:
571      - [a, gmac, grx0]
572  pd6:
573    pincodes: [c, e]
574    periph:
575      - [a, gmac, grx1]
576  pd7:
577    pincodes: [c, e]
578    periph:
579      - [a, gmac, grxer]
580  pd8:
581    pincodes: [c, e]
582    periph:
583      - [a, gmac, gmdc]
584  pd9:
585    pincodes: [c, e]
586    periph:
587      - [a, gmac, gmdio]
588  pd10:
589    pincodes: [c, e]
590    periph:
591      - [a, gmac, gcrs]
592  pd11:
593    pincodes: [c, e]
594    periph:
595      - [a, gmac, grx2]
596  pd12:
597    pincodes: [c, e]
598    periph:
599      - [a, gmac, grx3]
600  pd13:
601    pincodes: [c, e]
602    periph:
603      - [a, gmac, gcol]
604  pd14:
605    pincodes: [c, e]
606    periph:
607      - [a, gmac, grxck]
608  pd15:
609    pincodes: [c, e]
610    periph:
611      - [a, gmac, gtx2]
612  pd16:
613    pincodes: [c, e]
614    periph:
615      - [a, gmac, gtx3]
616  pd17:
617    pincodes: [c, e]
618    periph:
619      - [a, gmac, gtxer]
620  pd18:
621    pincodes: [c, e]
622    periph:
623      - [a, ebi, ncs1, [c]]
624  pd19:
625    pincodes: [c, e]
626    periph:
627      - [a, ebi, ncs3, [c]]
628  pd20:
629    pincodes: [c, e]
630    periph:
631      - [a, pwm, pwmh0]
632  pd21:
633    pincodes: [c, e]
634    periph:
635      - [a, pwm, pwmh1]
636  pd22:
637    pincodes: [c, e]
638    periph:
639      - [a, pwm, pwmh2]
640  pd23:
641    pincodes: [c, e]
642    periph:
643      - [a, pwm, pwmh3]
644  pd24:
645    pincodes: [c, e]
646    periph:
647      - [a, pwm, pwml0]
648  pd25:
649    pincodes: [c, e]
650    periph:
651      - [a, pwm, pwml1]
652  pd26:
653    pincodes: [c, e]
654    periph:
655      - [a, pwm, pwml2]
656  pd27:
657    pincodes: [c, e]
658    periph:
659      - [a, pwm, pwml3]
660  pd28:
661    pincodes: [c, e]
662  pd29:
663    pincodes: [c, e]
664  pd30:
665    pincodes: [c, e]
666  pd31:
667    pincodes: [c, e]
668  pe0:
669    pincodes: [e]
670  pe1:
671    pincodes: [e]
672  pe2:
673    pincodes: [e]
674  pe3:
675    pincodes: [e]
676  pe4:
677    pincodes: [e]
678  pe5:
679    pincodes: [e]
680