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