1# Copyright (c) 2022 Gerson Fernando Budke
2# SPDX-License-Identifier: Apache-2.0
3#
4# Sources:
5# - SAM4L Datasheet (Revision H - 11/16)
6#
7# Pin codes:
8#
9# - 48  pins: a
10# - 64  pins: b
11# - 100 pins: c
12
13model: atmel,sam
14
15family: sam4l
16
17map: SAM_PINMUX
18
19series: [4lsX, 4lcX]
20
21variants:
22  - pincode: a
23    series: [4lsX, 4lcX]
24  - pincode: b
25    series: [4lsX, 4lcX]
26  - pincode: c
27    series: [4lsX, 4lcX]
28
29pins:
30  pa00:
31    pincodes: [a, b, c]
32  pa01:
33    pincodes: [a, b, c]
34  pa02:
35    pincodes: [a, b, c]
36    periph:
37      - [a, scif, gclk0]
38      - [b, spi, npcs0]
39      - [g, catb, dis]
40  pa03:
41    pincodes: [a, b, c]
42    periph:
43      - [b, spi, miso]
44  pa04:
45    pincodes: [a, b, c]
46    periph:
47      - [a, adcife, ad0]
48      - [b, usart0, clk]
49      - [c, eic, extint2]
50      - [d, gloc, in1]
51      - [g, catb, sense0]
52  pa05:
53    pincodes: [a, b, c]
54    periph:
55      - [a, adcife, ad1]
56      - [b, usart0, rxd]
57      - [c, eic, extint3]
58      - [d, gloc, in2]
59      - [e, adcife, trigger]
60      - [g, catb, sense1]
61  pa06:
62    pincodes: [a, b, c]
63    periph:
64      - [a, dacc, vout]
65      - [b, usart0, rts]
66      - [c, eic, extint1]
67      - [d, gloc, in0]
68      - [e, acifc, acan0]
69      - [g, catb, sense2]
70  pa07:
71    pincodes: [a, b, c]
72    periph:
73      - [a, adcife, ad2]
74      - [b, usart0, txd]
75      - [c, eic, extint4]
76      - [d, gloc, in3]
77      - [e, acifc, acap0]
78      - [g, catb, sense3]
79  pa08:
80    pincodes: [a, b, c]
81    periph:
82      - [a, usart0, rts]
83      - [b, tc0, a0]
84      - [c, pevc, evt0]
85      - [d, gloc, out0]
86      - [f, lcdca, seg23, [4lsX]]
87      - [g, catb, sense4]
88  pa09:
89    pincodes: [a, b, c]
90    periph:
91      - [a, usart0, cts]
92      - [b, tc0, b0]
93      - [c, pevc, evt1]
94      - [d, parc, pcdata0]
95      - [f, lcdca, com3, [4lsX]]
96      - [g, catb, sense5]
97  pa10:
98    pincodes: [a, b, c]
99    periph:
100      - [a, usart0, clk]
101      - [b, tc0, a1]
102      - [c, pevc, evt2]
103      - [d, parc, pcdata1]
104      - [f, lcdca, com2, [4lsX]]
105      - [g, catb, sense6]
106  pa11:
107    pincodes: [a, b, c]
108    periph:
109      - [a, usart0, rxd]
110      - [b, tc0, b1]
111      - [c, pevc, evt3]
112      - [d, parc, pcdata2]
113      - [f, lcdca, com1, [4lsX]]
114      - [g, catb, sense7]
115  pa12:
116    pincodes: [a, b, c]
117    periph:
118      - [a, usart0, txd]
119      - [b, tc0, a2]
120      - [d, parc, pcdata3]
121      - [f, lcdca, com0, [4lsX]]
122      - [g, catb, dis]
123  pa13:
124    pincodes: [a, b, c]
125    periph:
126      - [a, usart1, rts]
127      - [b, tc0, b2]
128      - [c, spi, npcs1]
129      - [d, parc, pcdata4]
130      - [f, lcdca, seg5, [4lsX]]
131      - [g, catb, sense8]
132  pa14:
133    pincodes: [a, b, c]
134    periph:
135      - [a, usart1, clk]
136      - [b, tc0, clk0]
137      - [c, spi, npcs2]
138      - [d, parc, pcdata5]
139      - [f, lcdca, seg6, [4lsX]]
140      - [g, catb, sense9]
141  pa15:
142    pincodes: [a, b, c]
143    periph:
144      - [a, usart1, rxd]
145      - [b, tc0, clk1]
146      - [c, spi, npcs3]
147      - [d, parc, pcdata6]
148      - [f, lcdca, seg7, [4lsX]]
149      - [g, catb, sense10]
150  pa16:
151    pincodes: [a, b, c]
152    periph:
153      - [a, usart1, txd]
154      - [b, tc0, clk2]
155      - [c, eic, extint1]
156      - [d, parc, pcdata7]
157      - [f, lcdca, seg8, [4lsX]]
158      - [g, catb, sense11]
159  pa17:
160    pincodes: [a, b, c]
161    periph:
162      - [a, usart2, rts]
163      - [b, abdacb, dac0]
164      - [c, eic, extint2]
165      - [d, parc, pcck]
166      - [f, lcdca, seg9, [4lsX]]
167      - [g, catb, sense12]
168  pa18:
169    pincodes: [a, b, c]
170    periph:
171      - [a, usart2, clk]
172      - [b, abdacb, dacn0]
173      - [c, eic, extint3]
174      - [d, parc, pcen1]
175      - [f, lcdca, seg18, [4lsX]]
176      - [g, catb, sense13]
177  pa19:
178    pincodes: [a, b, c]
179    periph:
180      - [a, usart2, rxd]
181      - [b, abdacb, dac1]
182      - [c, eic, extint4]
183      - [d, parc, pcen2]
184      - [e, scif, gclk0]
185      - [f, lcdca, seg19, [4lsX]]
186      - [g, catb, sense14]
187  pa20:
188    pincodes: [a, b, c]
189    periph:
190      - [a, usart2, txd]
191      - [b, abdacb, dacn1]
192      - [c, eic, extint5]
193      - [d, gcloc, in0]
194      - [e, scif, gclk1]
195      - [f, lcdca, seg20, [4lsX]]
196      - [g, catb, sense15]
197  pa21:
198    pincodes: [a, b, c]
199    periph:
200      - [a, spi, miso]
201      - [b, usart1, cts]
202      - [c, eic, extint6]
203      - [d, gcloc, in1]
204      - [e, twim2, twd]
205      - [f, lcdca, seg34, [4lsX]]
206      - [g, catb, sense16]
207  pa22:
208    pincodes: [a, b, c]
209    periph:
210      - [a, spi, mosi]
211      - [b, usart2, cts]
212      - [c, eic, extint7]
213      - [d, gcloc, in2]
214      - [e, twim2, twck]
215      - [f, lcdca, seg35, [4lsX]]
216      - [g, catb, sense17]
217  pa23:
218    pincodes: [a, b, c]
219    periph:
220      - [a, spi, sck]
221      - [b, twims0, twd]
222      - [c, eic, extint8]
223      - [d, gcloc, in3]
224      - [e, scif, glck_in0]
225      - [f, lcdca, seg38, [4lsX]]
226      - [g, catb, dis]
227  pa24:
228    pincodes: [a, b, c]
229    periph:
230      - [a, spi, npcs0]
231      - [b, twims0, twck]
232      - [d, gcloc, out0]
233      - [e, scif, glck_in1]
234      - [f, lcdca, seg39, [4lsX]]
235      - [g, catb, sense18]
236  pa25:
237    pincodes: [a, b, c]
238    periph:
239      - [a, usbc, dm, [4lsX]]
240      - [b, usart2, rxd]
241      - [g, catb, sense19]
242  pa26:
243    pincodes: [a, b, c]
244    periph:
245      - [a, usbc, dp, [4lsX]]
246      - [b, usart2, txd]
247      - [g, catb, sense20]
248  pa27:
249    pincodes: [a, b, c]
250    periph:
251      - [a, spi, miso, [4lcX]]
252      - [b, iisc, isck, [4lcX]]
253      - [c, abdacb, dac0, [4lcX]]
254      - [d, gloc, in4, [4lcX]]
255      - [e, usart3, rts, [4lcX]]
256      - [g, catb, sense0, [4lcX]]
257  pa28:
258    pincodes: [a, b, c]
259    periph:
260      - [a, spi, mosi, [4lcX]]
261      - [b, iisc, isdi, [4lcX]]
262      - [c, abdacb, dacn0, [4lcX]]
263      - [d, gloc, in5, [4lcX]]
264      - [e, usart3, cts, [4lcX]]
265      - [g, catb, sense1, [4lcX]]
266  pa29:
267    pincodes: [a, b, c]
268    periph:
269      - [a, spi, sck, [4lcX]]
270      - [b, iisc, iws, [4lcX]]
271      - [c, abdacb, dac1, [4lcX]]
272      - [d, gloc, in6, [4lcX]]
273      - [e, usart3, clk, [4lcX]]
274      - [g, catb, sense2, [4lcX]]
275  pa30:
276    pincodes: [a, b, c]
277    periph:
278      - [a, spi, npcs0, [4lcX]]
279      - [b, iisc, isdo, [4lcX]]
280      - [c, abdacb, dacn1, [4lcX]]
281      - [d, gloc, in7, [4lcX]]
282      - [e, usart3, rxd, [4lcX]]
283      - [g, catb, sense3, [4lcX]]
284  pa31:
285    pincodes: [a, b, c]
286    periph:
287      - [a, spi, npcs1, [4lcX]]
288      - [b, iisc, imck, [4lcX]]
289      - [c, abdacb, clk, [4lcX]]
290      - [d, gloc, out1, [4lcX]]
291      - [e, usart3, txd, [4lcX]]
292      - [g, catb, dis, [4lcX]]
293  pb00:
294    pincodes: [b, c]
295    periph:
296      - [a, twims1, twd]
297      - [b, usart0, rxd]
298      - [g, catb, sense21]
299  pb01:
300    pincodes: [b, c]
301    periph:
302      - [a, twims1, twck]
303      - [b, usart0, txd]
304      - [c, eic, extint0]
305      - [g, catb, sense22]
306  pb02:
307    pincodes: [b, c]
308    periph:
309      - [a, adcife, ad3]
310      - [b, usart1, rts]
311      - [c, abdacb, dac0]
312      - [d, iisc, isck]
313      - [e, acifc, acbn0]
314      - [g, catb, sense23]
315  pb03:
316    pincodes: [b, c]
317    periph:
318      - [a, adcife, ad4]
319      - [b, usart1, clk]
320      - [c, abdacb, dacn0]
321      - [d, iisc, isdi]
322      - [e, acifc, acbp0]
323      - [g, catb, dis]
324  pb04:
325    pincodes: [b, c]
326    periph:
327      - [a, adcife, ad5]
328      - [b, usart1, rxd]
329      - [c, abdacb, dac1]
330      - [d, iisc, isdo]
331      - [e, dacc, ext_trig0]
332      - [g, catb, sense24]
333  pb05:
334    pincodes: [b, c]
335    periph:
336      - [a, adcife, ad6]
337      - [b, usart1, txd]
338      - [c, abdacb, dacn1]
339      - [d, iisc, imck]
340      - [g, catb, sense25]
341  pb06:
342    pincodes: [b, c]
343    periph:
344      - [a, usart3, rts]
345      - [c, gloc, in4]
346      - [d, iisc, iws]
347      - [f, lcdca, seg22, [4lsX]]
348      - [g, catb, sense26]
349  pb07:
350    pincodes: [b, c]
351    periph:
352      - [a, usart3, cts]
353      - [c, gloc, in5]
354      - [d, tc0, a0]
355      - [f, lcdca, seg21, [4lsX]]
356      - [g, catb, sense27]
357  pb08:
358    pincodes: [b, c]
359    periph:
360      - [a, usart3, clk]
361      - [c, gloc, in6]
362      - [d, tc0, b0]
363      - [f, lcdca, seg14, [4lsX]]
364      - [g, catb, sense28]
365  pb09:
366    pincodes: [b, c]
367    periph:
368      - [a, usart3, rxd]
369      - [b, pevd, evt2]
370      - [c, gloc, in7]
371      - [d, tc0, a1]
372      - [f, lcdca, seg15, [4lsX]]
373      - [g, catb, sense29]
374  pb10:
375    pincodes: [b, c]
376    periph:
377      - [a, usart3, txd]
378      - [b, pevd, evt3]
379      - [c, gloc, out1]
380      - [d, tc0, b1]
381      - [e, scif, gclk0]
382      - [f, lcdca, seg16, [4lsX]]
383      - [g, catb, sense30]
384  pb11:
385    pincodes: [b, c]
386    periph:
387      - [a, usart0, cts]
388      - [b, spi, npcs2]
389      - [d, tc0, a2]
390      - [e, scif, gclk1]
391      - [f, lcdca, seg17, [4lsX]]
392      - [g, catb, sense31]
393  pb12:
394    pincodes: [b, c]
395    periph:
396      - [a, usart0, rts]
397      - [b, spi, npcs3]
398      - [c, pevc, evt0]
399      - [d, tc0, b2]
400      - [e, scif, gclk2]
401      - [f, lcdca, seg32, [4lsX]]
402      - [g, catb, dis]
403  pb13:
404    pincodes: [b, c]
405    periph:
406      - [a, usart0, clk]
407      - [b, spi, npcs1]
408      - [c, pevc, evt1]
409      - [d, tc0, clk0]
410      - [e, scif, gclk3]
411      - [f, lcdca, seg33, [4lsX]]
412      - [g, catb, sense0]
413  pb14:
414    pincodes: [b, c]
415    periph:
416      - [a, usart0, rxd]
417      - [b, spi, miso]
418      - [c, twim3, twd]
419      - [d, tc0, clk1]
420      - [e, scif, gclk_in0]
421      - [f, lcdca, seg36, [4lsX]]
422      - [g, catb, sense1]
423  pb15:
424    pincodes: [b, c]
425    periph:
426      - [a, usart0, txd]
427      - [b, spi, mosi]
428      - [c, twim3, twck]
429      - [d, tc0, clk2]
430      - [e, scif, gclk_in1]
431      - [f, lcdca, seg37, [4lsX]]
432      - [g, catb, sense2]
433  pc00:
434    pincodes: [c]
435    periph:
436      - [a, spi, npcs2]
437      - [b, usart0, clk]
438      - [d, tc1, a0]
439      - [g, catb, sense3]
440  pc01:
441    pincodes: [c]
442    periph:
443      - [a, spi, npcs3]
444      - [b, usart0, rts]
445      - [d, tc1, b0]
446      - [g, catb, sense4]
447  pc02:
448    pincodes: [c]
449    periph:
450      - [a, spi, npcs1]
451      - [b, usart0, cts]
452      - [c, usart0, rxd]
453      - [d, tc1, a1]
454      - [g, catb, sense5]
455  pc03:
456    pincodes: [c]
457    periph:
458      - [a, spi, npcs0]
459      - [b, eic, extint5]
460      - [c, usart0, txd]
461      - [d, tc1, b1]
462      - [g, catb, sense6]
463  pc04:
464    pincodes: [c]
465    periph:
466      - [a, spi, miso]
467      - [b, eic, extint6]
468      - [d, tc1, a2]
469      - [g, catb, sense7]
470  pc05:
471    pincodes: [c]
472    periph:
473      - [a, spi, mosi]
474      - [b, eic, extint7]
475      - [d, tc1, b2]
476      - [g, catb, dis]
477  pc06:
478    pincodes: [c]
479    periph:
480      - [a, spi, sck]
481      - [b, eic, extint8]
482      - [d, tc1, clk0]
483      - [g, catb, sense8]
484  pc07:
485    pincodes: [c]
486    periph:
487      - [a, adcife, ad7]
488      - [b, usart2, rts]
489      - [c, pevc, evt0]
490      - [d, tc1, clk1]
491      - [g, catb, sense9]
492  pc08:
493    pincodes: [c]
494    periph:
495      - [a, adcife, ad8]
496      - [b, usart2, clk]
497      - [c, pevc, evt1]
498      - [d, tc1, clk2]
499      - [e, usart2, cts]
500      - [g, catb, sense10]
501  pc09:
502    pincodes: [c]
503    periph:
504      - [a, adcife, ad9]
505      - [b, usart3, rxd]
506      - [c, abdacb, dac0]
507      - [d, iisc, isck]
508      - [e, acifc, acan1]
509      - [g, catb, sense11]
510  pc10:
511    pincodes: [c]
512    periph:
513      - [a, adcife, ad10]
514      - [b, usart3, txd]
515      - [c, abdacb, dacn0]
516      - [d, iisc, isdi]
517      - [e, acifc, acap1]
518      - [g, catb, sense12]
519  pc11:
520    pincodes: [c]
521    periph:
522      - [a, adcife, ad11]
523      - [b, usart2, rxd]
524      - [c, pevc, evt2]
525      - [g, catb, sense13]
526  pc12:
527    pincodes: [c]
528    periph:
529      - [a, adcife, ad12]
530      - [b, usart2, txd]
531      - [c, abdacb, clk]
532      - [d, iisc, iws]
533      - [g, catb, sense14]
534  pc13:
535    pincodes: [c]
536    periph:
537      - [a, adcife, ad13]
538      - [b, usart3, rts]
539      - [c, abdacb, dac1]
540      - [d, iisc, isdo]
541      - [e, acifc, acbn1]
542      - [g, catb, sense15]
543  pc14:
544    pincodes: [c]
545    periph:
546      - [a, adcife, ad14]
547      - [b, usart3, clk]
548      - [c, abdacb, dacn1]
549      - [d, iisc, imck]
550      - [e, acifc, acbp1]
551      - [g, catb, dis]
552  pc15:
553    pincodes: [c]
554    periph:
555      - [a, tc1, a0]
556      - [d, gloc, in4]
557      - [f, lcdca, seg0, [4lsX]]
558      - [g, catb, sense16]
559  pc16:
560    pincodes: [c]
561    periph:
562      - [a, tc1, b0]
563      - [d, gloc, in5]
564      - [f, lcdca, seg1, [4lsX]]
565      - [g, catb, sense17]
566  pc17:
567    pincodes: [c]
568    periph:
569      - [a, tc1, a1]
570      - [d, gloc, in6]
571      - [f, lcdca, seg2, [4lsX]]
572      - [g, catb, sense18]
573  pc18:
574    pincodes: [c]
575    periph:
576      - [a, tc1, b1]
577      - [d, gloc, in7]
578      - [f, lcdca, seg3, [4lsX]]
579      - [g, catb, sense19]
580  pc19:
581    pincodes: [c]
582    periph:
583      - [a, tc1, a2]
584      - [d, gloc, out1]
585      - [f, lcdca, seg4, [4lsX]]
586      - [g, catb, sense20]
587  pc20:
588    pincodes: [c]
589    periph:
590      - [a, tc1, b2]
591      - [f, lcdca, seg10, [4lsX]]
592      - [g, catb, sense21]
593  pc21:
594    pincodes: [c]
595    periph:
596      - [a, tc1, clk0]
597      - [d, parc, pcck]
598      - [f, lcdca, seg11, [4lsX]]
599      - [g, catb, sense22]
600  pc22:
601    pincodes: [c]
602    periph:
603      - [a, tc1, clk1]
604      - [d, parc, pcen1]
605      - [f, lcdca, seg12, [4lsX]]
606      - [g, catb, sense23]
607  pc23:
608    pincodes: [c]
609    periph:
610      - [a, tc1, clk2]
611      - [d, parc, pcen2]
612      - [f, lcdca, seg13, [4lsX]]
613      - [g, catb, dis]
614  pc24:
615    pincodes: [c]
616    periph:
617      - [a, usart1, rts]
618      - [b, eic, extint1]
619      - [c, pevc, evt0]
620      - [d, parc, pcdata0]
621      - [f, lcdca, seg24, [4lsX]]
622      - [g, catb, sense24]
623  pc25:
624    pincodes: [c]
625    periph:
626      - [a, usart1, clk]
627      - [b, eic, extint2]
628      - [c, pevc, evt1]
629      - [d, parc, pcdata1]
630      - [f, lcdca, seg25, [4lsX]]
631      - [g, catb, sense25]
632  pc26:
633    pincodes: [c]
634    periph:
635      - [a, usart1, rxd]
636      - [b, eic, extint3]
637      - [c, pevc, evt2]
638      - [d, parc, pcdata2]
639      - [e, scif, glkc0]
640      - [f, lcdca, seg26, [4lsX]]
641      - [g, catb, sense26]
642  pc27:
643    pincodes: [c]
644    periph:
645      - [a, usart1, txd]
646      - [b, eic, extint4]
647      - [c, pevc, evt3]
648      - [d, parc, pcdata3]
649      - [e, scif, gclk1]
650      - [f, lcdca, seg27, [4lsX]]
651      - [g, catb, sense27]
652  pc28:
653    pincodes: [c]
654    periph:
655      - [a, usart3, rxd]
656      - [b, spi, miso]
657      - [c, gloc, in4]
658      - [d, parc, pcdata4]
659      - [e, scif, gclk2]
660      - [f, lcdca, seg28, [4lsX]]
661      - [g, catb, sense28]
662  pc29:
663    pincodes: [c]
664    periph:
665      - [a, usart3, txd]
666      - [b, spi, mosi]
667      - [c, gloc, in5]
668      - [d, parc, pcdata5]
669      - [e, scif, gclk3]
670      - [f, lcdca, seg29, [4lsX]]
671      - [g, catb, sense29]
672  pc30:
673    pincodes: [c]
674    periph:
675      - [a, usart3, rts]
676      - [b, spi, sck]
677      - [c, gloc, in6]
678      - [d, parc, pcdata6]
679      - [e, scif, gclk_in0]
680      - [f, lcdca, seg30, [4lsX]]
681      - [g, catb, sense30]
682  pc31:
683    pincodes: [c]
684    periph:
685      - [a, usart3, clk]
686      - [b, spi, npcs0]
687      - [c, gloc, out1]
688      - [d, parc, pcdata7]
689      - [e, scif, gclk_in1]
690      - [f, lcdca, seg31, [4lsX]]
691      - [g, catb, sense31]
692