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