1# Copyright (c) 2022 Gerson Fernando Budke
2# SPDX-License-Identifier: Apache-2.0
3#
4# Sources:
5# - SAM3X-SAM3A Datasheet (Revision C - 03/15)
6#
7# Pin codes:
8#
9# - 100 pins: c
10# - 144 pins: e
11# - 217 pins: h
12
13model: atmel,sam
14
15family: sam3x
16
17map: SAM_PINMUX
18
19series: [3XX, 3AX]
20
21variants:
22  - pincode: c
23    series: [3XX, 3AX]
24  - pincode: e
25    series: [3XX]
26  - pincode: h
27    series: [3XX]
28
29pins:
30  pa0:
31    pincodes: [c, e, h]
32    periph:
33      - [a, can0, tx]
34      - [b, pwm, pwml3]
35  pa1:
36    pincodes: [c, e, h]
37    periph:
38      - [a, can0, rx]
39      - [b, pmc, pck0]
40    extra:
41      - [x, supc, wkup0]
42  pa2:
43    pincodes: [c, e, h]
44    periph:
45      - [a, tc0, tioa1]
46      - [b, ebi, nandrdy, [c]]
47    extra:
48      - [x, adc, ad0]
49  pa3:
50    pincodes: [c, e, h]
51    periph:
52      - [a, tc0, tiob1]
53      - [b, pwm, pwmfi1]
54    extra:
55      - [x, adc, ad1]
56      - [x, supc, wkup1]
57  pa4:
58    pincodes: [c, e, h]
59    periph:
60      - [a, tc0, tclk1]
61      - [b, ebi, nwait, [c]]
62    extra:
63      - [x, adc, ad2]
64  pa5:
65    pincodes: [c, e, h]
66    periph:
67      - [a, tc0, tioa2]
68      - [b, pwm, pwmfi0]
69    extra:
70      - [x, supc, wkup2]
71  pa6:
72    pincodes: [c, e, h]
73    periph:
74      - [a, tc0, tiob2]
75      - [b, ebi, ncs0, [c]]
76    extra:
77      - [x, adc, ad3]
78  pa7:
79    pincodes: [c, e, h]
80    periph:
81      - [a, tc0, tclk2]
82      - [b, ebi, ncs1, [c]]
83    extra:
84      - [x, supc, wkup3]
85  pa8:
86    pincodes: [c, e, h]
87    periph:
88      - [a, uart, rxd]
89      - [b, pwm, pwmh0]
90    extra:
91      - [x, supc, wkup4]
92  pa9:
93    pincodes: [c, e, h]
94    periph:
95      - [a, uart, txd]
96      - [b, pwm, pwmh3]
97  pa10:
98    pincodes: [c, e, h]
99    periph:
100      - [a, usart0, rxd]
101      - [b, dacc, datrg]
102    extra:
103      - [x, supc, wkup5]
104  pa11:
105    pincodes: [c, e, h]
106    periph:
107      - [a, usart0, txd]
108      - [b, adc, adtrg]
109    extra:
110      - [x, supc, wkup6]
111  pa12:
112    pincodes: [c, e, h]
113    periph:
114      - [a, usart1, rxd]
115      - [b, pwm, pwml1]
116    extra:
117      - [x, supc, wkup7]
118  pa13:
119    pincodes: [c, e, h]
120    periph:
121      - [a, usart1, txd]
122      - [b, pwm, pwmh2]
123  pa14:
124    pincodes: [c, e, h]
125    periph:
126      - [a, usart1, rts]
127      - [b, ssc, tk]
128  pa15:
129    pincodes: [c, e, h]
130    periph:
131      - [a, usart1, cts]
132      - [b, ssc, tf]
133    extra:
134      - [x, supc, wkup8]
135  pa16:
136    pincodes: [c, e, h]
137    periph:
138      - [a, spi1, spck1]
139      - [b, ssc, td]
140    extra:
141      - [x, adc, ad7]
142  pa17:
143    pincodes: [c, e, h]
144    periph:
145      - [a, twi0, twd]
146      - [b, spi0, spck0]
147  pa18:
148    pincodes: [c, e, h]
149    periph:
150      - [a, twi0, twck]
151      - [b, ebi, a20, [c]]
152    extra:
153      - [x, supc, wkup9]
154  pa19:
155    pincodes: [c, e, h]
156    periph:
157      - [a, hsmci, mcck]
158      - [b, pwm, pwmh1]
159  pa20:
160    pincodes: [c, e, h]
161    periph:
162      - [a, hsmci, mccda]
163      - [b, pwm, pwml2]
164  pa21:
165    pincodes: [c, e, h]
166    periph:
167      - [a, hsmci, mcda0]
168      - [b, pwm, pwml0]
169  pa22:
170    pincodes: [c, e, h]
171    periph:
172      - [a, hsmci, mcda1]
173      - [b, tc1, tclk3]
174    extra:
175      - [x, adc, ad4]
176  pa23:
177    pincodes: [c, e, h]
178    periph:
179      - [a, hsmci, mcda2]
180      - [b, tc1, tclk4]
181    extra:
182      - [x, adc, ad5]
183  pa24:
184    pincodes: [c, e, h]
185    periph:
186      - [a, hsmci, mcda3]
187      - [b, pmc, pck1]
188    extra:
189      - [x, adc, ad6]
190  pa25:
191    pincodes: [c, e, h]
192    periph:
193      - [a, spi0, miso]
194      - [b, ebi, a18, [c]]
195  pa26:
196    pincodes: [c, e, h]
197    periph:
198      - [a, spi0, mosi]
199      - [b, ebi, a19, [c]]
200  pa27:
201    pincodes: [c, e, h]
202    periph:
203      - [a, spi0, spck]
204      - [b, ebi, a20, [c]]
205    extra:
206      - [x, supc, wkup10]
207  pa28:
208    pincodes: [c, e, h]
209    periph:
210      - [a, spi0, npcs0]
211      - [b, pmc, pck2]
212    extra:
213      - [x, supc, wkup11]
214  pa29:
215    pincodes: [c, e, h]
216    periph:
217      - [a, spi0, npcs1]
218      - [b, ebi, nrd, [c]]
219  pa30:
220    pincodes: [h]
221    periph:
222      - [a, spi0, npcs2]
223      - [b, pmc, pck1]
224  pa31:
225    pincodes: [h]
226    periph:
227      - [a, spi, npcs3]
228      - [b, pmc, pck2]
229  pb0:
230    pincodes: [c, e, h]
231    periph:
232      - [a, emac, etxck_erefck, [3AX]]
233      - [b, tc1, tioa3]
234  pb1:
235    pincodes: [c, e, h]
236    periph:
237      - [a, emac, etxen, [3AX]]
238      - [b, tc1, tiob3]
239  pb2:
240    pincodes: [c, e, h]
241    periph:
242      - [a, emac, etx0, [3AX]]
243      - [b, tc1, tioa4]
244  pb3:
245    pincodes: [c, e, h]
246    periph:
247      - [a, emac, etx1, [3AX]]
248      - [b, tc1, tiob4]
249  pb4:
250    pincodes: [c, e, h]
251    periph:
252      - [a, emac, ecrsdv_erxdv, [3AX]]
253      - [b, tc1, tioa5]
254  pb5:
255    pincodes: [c, e, h]
256    periph:
257      - [a, emac, erx0, [3AX]]
258      - [b, tc1, tiob5]
259  pb6:
260    pincodes: [c, e, h]
261    periph:
262      - [a, emac, erx1, [3AX]]
263      - [b, pwm, pwml4]
264  pb7:
265    pincodes: [c, e, h]
266    periph:
267      - [a, emac, erxer, [3AX]]
268      - [b, pwm, pwml5]
269  pb8:
270    pincodes: [c, e, h]
271    periph:
272      - [a, emac, emdc, [3AX]]
273      - [b, pwm, pwml6]
274  pb9:
275    pincodes: [c, e, h]
276    periph:
277      - [a, emac, emdio, [3AX]]
278      - [b, pwm, pwml7]
279  pb10:
280    pincodes: [c, e, h]
281    periph:
282      - [a, uotg, vbof]
283      - [b, ebi, a18, [c]]
284  pb11:
285    pincodes: [c, e, h]
286    periph:
287      - [a, uotg, id]
288      - [b, ebi, a19, [c]]
289  pb12:
290    pincodes: [c, e, h]
291    periph:
292      - [a, twi1, twd]
293      - [b, pwm, pwmh0]
294    extra:
295      - [x, adc, ad8]
296  pb13:
297    pincodes: [c, e, h]
298    periph:
299      - [a, twi1, twck]
300      - [b, pwm, pwmh1]
301    extra:
302      - [x, adc, ad9]
303  pb14:
304    pincodes: [c, e, h]
305    periph:
306      - [a, can1, tx]
307      - [b, pwm, pwmh2]
308  pb15:
309    pincodes: [c, e, h]
310    periph:
311      - [a, can1, rx]
312      - [b, pwm, pwmh3]
313    extra:
314      - [x, dacc, dac0]
315      - [x, supc, wkup10]
316  pb16:
317    pincodes: [c, e, h]
318    periph:
319      - [a, tc1, tclk5]
320      - [b, pwm, pwml0]
321    extra:
322      - [x, dacc, dac1]
323  pb17:
324    pincodes: [c, e, h]
325    periph:
326      - [a, ssc, rf]
327      - [b, pwm, pwml1]
328    extra:
329      - [x, adc, ad10]
330  pb18:
331    pincodes: [c, e, h]
332    periph:
333      - [a, ssc, rd]
334      - [b, pwm, pwml2]
335    extra:
336      - [x, adc, ad11]
337  pb19:
338    pincodes: [c, e, h]
339    periph:
340      - [a, ssc, rk]
341      - [b, pwm, pwml3]
342    extra:
343      - [x, adc, ad12]
344  pb20:
345    pincodes: [c, e, h]
346    periph:
347      - [a, usart2, txd]
348      - [b, spi0, npcs1]
349    extra:
350      - [x, adc, ad13]
351  pb21:
352    pincodes: [c, e, h]
353    periph:
354      - [a, usart2, rxd]
355      - [b, spi0, npcs2]
356    extra:
357      - [x, adc, ad14]
358      - [x, supc, wkup13]
359  pb22:
360    pincodes: [c, e, h]
361    periph:
362      - [a, usart2, rts]
363      - [b, pmc, pck0]
364  pb23:
365    pincodes: [c, e, h]
366    periph:
367      - [a, usart2, cts]
368      - [b, spi0, npcs3]
369    extra:
370      - [x, supc, wkup14]
371  pb24:
372    pincodes: [c, e, h]
373    periph:
374      - [a, usart2, sck]
375      - [b, ebi, ncs2, [c]]
376  pb25:
377    pincodes: [c, e, h]
378    periph:
379      - [a, usart0, rts]
380      - [b, tc0, tioa0]
381  pb26:
382    pincodes: [c, e, h]
383    periph:
384      - [a, usart0, cts]
385      - [b, tc0, tclk0]
386    extra:
387      - [x, supc, wkup15]
388  pb27:
389    pincodes: [c, e, h]
390    periph:
391      - [a, ebi, ncs3, [c]]
392      - [b, tc0, tiob0]
393  pb28:
394    pincodes: [c, e, h]
395  pb29:
396    pincodes: [c, e, h]
397  pb30:
398    pincodes: [c, e, h]
399  pb31:
400    pincodes: [c, e, h]
401  pc0:
402    pincodes: [e, h]
403    extra:
404      - [x, flash, erase]
405  pc1:
406    pincodes: [e, h]
407  pc2:
408    pincodes: [e, h]
409    periph:
410      - [a, ebi, d0]
411      - [b, pwm, pwml0]
412  pc3:
413    pincodes: [e, h]
414    periph:
415      - [a, ebi, d1]
416      - [b, pwm, pwmh0]
417  pc4:
418    pincodes: [e, h]
419    periph:
420      - [a, ebi, d2]
421      - [b, pwm, pwml1]
422  pc5:
423    pincodes: [e, h]
424    periph:
425      - [a, ebi, d3]
426      - [b, pwm, pwmh1]
427  pc6:
428    pincodes: [e, h]
429    periph:
430      - [a, ebi, d4]
431      - [b, pwm, pwml2]
432  pc7:
433    pincodes: [e, h]
434    periph:
435      - [a, ebi, d5]
436      - [b, pwm, pwmh2]
437  pc8:
438    pincodes: [e, h]
439    periph:
440      - [a, ebi, d6]
441      - [b, pwm, pwml3]
442  pc9:
443    pincodes: [e, h]
444    periph:
445      - [a, ebi, d7]
446      - [b, pwm, pwmh3]
447  pc10:
448    pincodes: [e, h]
449    periph:
450      - [a, ebi, d8]
451      - [b, emac, ecrs]
452  pc11:
453    pincodes: [e, h]
454    periph:
455      - [a, ebi, d9]
456      - [b, emac, erx2]
457  pc12:
458    pincodes: [e, h]
459    periph:
460      - [a, ebi, d10]
461      - [b, emac, erx3]
462  pc13:
463    pincodes: [e, h]
464    periph:
465      - [a, ebi, d11]
466      - [b, emac, ecol]
467  pc14:
468    pincodes: [e, h]
469    periph:
470      - [a, ebi, d12]
471      - [b, emac, erxck]
472  pc15:
473    pincodes: [e, h]
474    periph:
475      - [a, ebi, d13]
476      - [b, emac, etx2]
477  pc16:
478    pincodes: [e, h]
479    periph:
480      - [a, ebi, d14]
481      - [b, emac, etx3]
482  pc17:
483    pincodes: [e, h]
484    periph:
485      - [a, ebi, d15]
486      - [b, emac, etxer]
487  pc18:
488    pincodes: [e, h]
489    periph:
490      - [a, ebi, nwr0_nwe]
491      - [b, pwm, pwmh6]
492  pc19:
493    pincodes: [e, h]
494    periph:
495      - [a, ebi, nandoe]
496      - [b, pwm, pwmh5]
497  pc20:
498    pincodes: [e, h]
499    periph:
500      - [a, ebi, nandwe]
501      - [b, pwm, pwmh4]
502  pc21:
503    pincodes: [e, h]
504    periph:
505      - [a, ebi, a0_nbs0]
506      - [b, pwm, pwml4]
507  pc22:
508    pincodes: [e, h]
509    periph:
510      - [a, ebi, a1]
511      - [b, pwm, pwml5]
512  pc23:
513    pincodes: [e, h]
514    periph:
515      - [a, ebi, a2]
516      - [b, pwm, pwml6]
517  pc24:
518    pincodes: [e, h]
519    periph:
520      - [a, ebi, a3]
521      - [b, pwm, pwml7]
522  pc25:
523    pincodes: [e, h]
524    periph:
525      - [a, ebi, a4]
526      - [b, tc2, tioa6]
527  pc26:
528    pincodes: [e, h]
529    periph:
530      - [a, ebi, a5]
531      - [b, tc2, tiob6]
532  pc27:
533    pincodes: [e, h]
534    periph:
535      - [a, ebi, a6]
536      - [b, tc2, tclk6]
537  pc28:
538    pincodes: [e, h]
539    periph:
540      - [a, ebi, a7]
541      - [b, tc2, tioa7]
542  pc29:
543    pincodes: [e, h]
544    periph:
545      - [a, ebi, a8]
546      - [b, tc2, tiob7]
547  pc30:
548    pincodes: [e, h]
549    periph:
550      - [a, ebi, a9]
551      - [b, tc2, tclk7]
552  pd0:
553    pincodes: [e, h]
554    periph:
555      - [a, ebi, a10]
556      - [b, hsmci, mcda4]
557  pd1:
558    pincodes: [e, h]
559    periph:
560      - [a, ebi, a11]
561      - [b, hsmci, mcda5]
562  pd2:
563    pincodes: [e, h]
564    periph:
565      - [a, ebi, a12]
566      - [b, hsmci, mcda6]
567  pd3:
568    pincodes: [e, h]
569    periph:
570      - [a, ebi, a13]
571      - [b, hsmci, mcda7]
572  pd4:
573    pincodes: [e, h]
574    periph:
575      - [a, ebi, a14]
576      - [b, usart3, txd]
577  pd5:
578    pincodes: [e, h]
579    periph:
580      - [a, ebi, a15]
581      - [b, usart3, rxd]
582  pd6:
583    pincodes: [e, h]
584    periph:
585      - [a, ebi, a16_ba0]
586      - [b, pwm, pwmfi2]
587  pd7:
588    pincodes: [e, h]
589    periph:
590      - [a, ebi, a17_ba1]
591      - [b, tc2, tioa8]
592  pd8:
593    pincodes: [e, h]
594    periph:
595      - [a, ebi, a21_nandale]
596      - [b, tc2, tiob8]
597  pd9:
598    pincodes: [e, h]
599    periph:
600      - [a, ebi, a22_nandcle]
601      - [b, tc2, tclk9]
602  pd10:
603    pincodes: [e, h]
604    periph:
605      - [a, ebi, nwr1_nbs1]
606  pd11:
607    pincodes: [h]
608    periph:
609      - [a, ebi, sda10]
610  pd12:
611    pincodes: [h]
612    periph:
613      - [a, ebi, sdcs]
614  pd13:
615    pincodes: [h]
616    periph:
617      - [a, ebi, sdcke]
618  pd14:
619    pincodes: [h]
620    periph:
621      - [a, ebi, sdwe]
622  pd15:
623    pincodes: [h]
624    periph:
625      - [a, ebi, ras]
626  pd16:
627    pincodes: [h]
628    periph:
629      - [a, ebi, cas]
630  pd17:
631    pincodes: [h]
632    periph:
633      - [a, ebi, a5]
634  pd18:
635    pincodes: [h]
636    periph:
637      - [a, ebi, a6]
638  pd19:
639    pincodes: [h]
640    periph:
641      - [a, ebi, a7]
642  pd20:
643    pincodes: [h]
644    periph:
645      - [a, ebi, a8]
646  pd21:
647    pincodes: [h]
648    periph:
649      - [a, ebi, a9]
650  pd22:
651    pincodes: [h]
652    periph:
653      - [a, ebi, a10]
654  pd23:
655    pincodes: [h]
656    periph:
657      - [a, ebi, a11]
658  pd24:
659    pincodes: [h]
660    periph:
661      - [a, ebi, a12]
662  pd25:
663    pincodes: [h]
664    periph:
665      - [a, ebi, a13]
666  pd26:
667    pincodes: [h]
668    periph:
669      - [a, ebi, a14]
670  pd27:
671    pincodes: [h]
672    periph:
673      - [a, ebi, a15]
674  pd28:
675    pincodes: [h]
676    periph:
677      - [a, ebi, a16_ba0]
678  pd29:
679    pincodes: [h]
680    periph:
681      - [a, ebi, a17_ba1]
682  pd30:
683    pincodes: [h]
684    periph:
685      - [a, ebi, a18]
686  pe0:
687    pincodes: [h]
688    periph:
689      - [a, ebi, a19]
690  pe1:
691    pincodes: [h]
692    periph:
693      - [a, ebi, a20]
694  pe2:
695    pincodes: [h]
696    periph:
697      - [a, ebi, a21_nandale]
698  pe3:
699    pincodes: [h]
700    periph:
701      - [a, ebi, a22_nandcle]
702  pe4:
703    pincodes: [h]
704    periph:
705      - [a, ebi, a23]
706  pe5:
707    pincodes: [h]
708    periph:
709      - [a, ebi, ncs4]
710  pe6:
711    pincodes: [h]
712    periph:
713      - [a, ebi, ncs5]
714  pe7:
715    pincodes: [h]
716  pe8:
717    pincodes: [h]
718  pe9:
719    pincodes: [e, h]
720    periph:
721      - [a, tc1, tioa3]
722  pe10:
723    pincodes: [e, h]
724    periph:
725      - [a, tc1, tiob3]
726  pe11:
727    pincodes: [e, h]
728    periph:
729      - [a, tc1, tioa4]
730  pe12:
731    pincodes: [e, h]
732    periph:
733      - [a, tc1, tiob4]
734  pe13:
735    pincodes: [e, h]
736    periph:
737      - [a, tc1, tioa5]
738  pe14:
739    pincodes: [e, h]
740    periph:
741      - [a, tc1, tiob5]
742  pe15:
743    pincodes: [e, h]
744    periph:
745      - [a, pwm, pwmh0]
746  pe16:
747    pincodes: [e, h]
748    periph:
749      - [a, pwm, pwmh1]
750      - [b, usart3, sck]
751  pe17:
752    pincodes: [e, h]
753    periph:
754      - [a, pwm, pwml2]
755  pe18:
756    pincodes: [e, h]
757    periph:
758      - [a, pwm, pwml0]
759      - [b, ebi, ncs6]
760  pe19:
761    pincodes: [e, h]
762    periph:
763      - [a, pwm, pwml4]
764  pe20:
765    pincodes: [e, h]
766    periph:
767      - [a, pwm, pwmh4]
768      - [b, hsmci, mccdb]
769  pe21:
770    pincodes: [e, h]
771    periph:
772      - [a, pwm, pwml5]
773  pe22:
774    pincodes: [e, h]
775    periph:
776      - [a, pwm, pwmh5]
777      - [b, hsmci, mcdb0]
778  pe23:
779    pincodes: [e, h]
780    periph:
781      - [a, pwm, pwml6]
782  pe24:
783    pincodes: [e, h]
784    periph:
785      - [a, pwm, pwmh6]
786      - [b, hsmci, mcdb1]
787  pe25:
788    pincodes: [e, h]
789    periph:
790      - [a, pwm, pwml7]
791  pe26:
792    pincodes: [e, h]
793    periph:
794      - [a, pwm, pwmh7]
795      - [b, hsmci, mcdb2]
796  pe27:
797    pincodes: [h]
798    periph:
799      - [a, ebi, ncs7]
800      - [b, hsmci, mcdb3]
801  pe28:
802    pincodes: [h]
803    periph:
804      - [a, spi1, miso]
805  pe29:
806    pincodes: [h]
807    periph:
808      - [a, spi1, mosi]
809  pe30:
810    pincodes: [h]
811    periph:
812      - [a, spi1, spck]
813  pe31:
814    pincodes: [h]
815    periph:
816      - [a, spi1, npcs0]
817  pf0:
818    pincodes: [h]
819    periph:
820      - [a, spi1, npcs1]
821  pf1:
822    pincodes: [h]
823    periph:
824      - [a, spi1, npcs2]
825  pf2:
826    pincodes: [h]
827    periph:
828      - [a, spi1, npcs3]
829  pf3:
830    pincodes: [h]
831    periph:
832      - [a, pwm, pwmh3]
833  pf4:
834    pincodes: [h]
835    periph:
836      - [a, usart3, cts]
837  pf5:
838    pincodes: [h]
839    periph:
840      - [a, usart3, rts]
841