1# Copyright (c) 2022 Argentum Systems Ltd.
2# SPDX-License-Identifier: Apache-2.0
3#
4# Sources:
5# - SAM_L21_Family_DataSheet_DS60001477C (Revision C - 03/2020)
6#
7# Pin codes:
8#
9# - 32      pins: e
10# - 48      pins: g
11# - 64      pins: j
12#
13# SoC Revision (variant) supported:
14#
15# - SAML21
16# - A = Engineering Samples Only
17# - B = Released to Production
18
19model: atmel,sam
20
21family: l21
22
23map: SAM_PINMUX
24
25series: [l21]
26
27variants:
28  - pincode: e
29    series: [l21]
30  - pincode: g
31    series: [l21]
32  - pincode: j
33    series: [l21]
34
35pins:
36  pa00:
37    pincodes: [e, g, j]
38    periph:
39      - [a, eic, extint0]
40      - [d, sercom1, pad0]
41      - [e, tcc2, wo0]
42  pa01:
43    pincodes: [e, g, j]
44    periph:
45      - [a, eic, extint1]
46      - [d, sercom1, pad1]
47      - [e, tcc2, wo1]
48  pa02:
49    pincodes: [e, g, j]
50    periph:
51      - [a, eic, extint2]
52      - [b, adc, ain0]
53      - [b, ptc, y0]
54      - [b, dac, vout0]
55  pa03:
56    pincodes: [e, g, j]
57    periph:
58      - [a, eic, extint3]
59      - [b, adc, ain1]
60      - [b, ptc, y1]
61  pb04:
62    pincodes: [j]
63    periph:
64      - [a, eic, extint4]
65      - [b, adc, ain12]
66      - [b, ptc, y10]
67  pb05:
68    pincodes: [j]
69    periph:
70      - [a, eic, extint5]
71      - [b, adc, ain13]
72      - [b, ptc, y11]
73  pb06:
74    pincodes: [j]
75    periph:
76      - [a, eic, extint6]
77      - [b, adc, ain14]
78      - [b, ptc, y12]
79  pb07:
80    pincodes: [j]
81    periph:
82      - [a, eic, extint7]
83      - [b, adc, ain15]
84      - [b, ptc, y13]
85  pb08:
86    pincodes: [g, j]
87    periph:
88      - [a, eic, extint8]
89      - [b, adc, ain2]
90      - [d, sercom4, pad0]
91      - [e, tc0, wo0]
92  pb09:
93    pincodes: [g, j]
94    periph:
95      - [a, eic, extint9]
96      - [b, adc, ain3]
97      - [b, ptc, y15]
98      - [d, sercom4, pad1]
99      - [e, tc0, wo1]
100  pa04:
101    pincodes: [e, g, j]
102    periph:
103      - [a, eic, extint4]
104      - [b, adc, ain4]
105      - [d, sercom0, pad0]
106      - [e, tcc0, wo0]
107  pa05:
108    pincodes: [e, g, j]
109    periph:
110      - [a, eic, extint5]
111      - [b, adc, ain5]
112      - [d, sercom0, pad1]
113      - [e, tcc0, wo1]
114  pa06:
115    pincodes: [e, g, j]
116    periph:
117      - [a, eic, extint6]
118      - [b, adc, ain6]
119      - [b, ptc, y4]
120      - [d, sercom0, pad2]
121      - [e, tcc1, wo0]
122  pa07:
123    pincodes: [e, g, j]
124    periph:
125      - [a, eic, extint7]
126      - [b, adc, ain7]
127      - [d, sercom0, pad3]
128      - [e, tcc1, wo1]
129  pa08:
130    pincodes: [e, g, j]
131    periph:
132      - [a, eic, nmi]
133      - [b, adc, ain16]
134      - [b, ptc, x0]
135      - [b, ptc, y6]
136      - [c, sercom0, pad0]
137      - [d, sercom2, pad0]
138      - [e, tcc0, wo0]
139      - [f, tcc1, wo2]
140  pa09:
141    pincodes: [e, g, j]
142    periph:
143      - [a, eic, extint9]
144      - [b, adc, ain17]
145      - [b, ptc, x1]
146      - [b, ptc, y7]
147      - [c, sercom0, pad1]
148      - [d, sercom2, pad1]
149      - [e, tcc0, wo1]
150      - [f, tcc1, wo3]
151  pa10:
152    pincodes: [e, g, j]
153    periph:
154      - [a, eic, extint10]
155      - [b, adc, ain18]
156      - [b, ptc, x2]
157      - [b, ptc, y8]
158      - [c, sercom0, pad2]
159      - [d, sercom2, pad2]
160      - [e, tcc1, wo0]
161      - [f, tcc0, wo2]
162      - [h, gclk, io4]
163  pa11:
164    pincodes: [e, g, j]
165    periph:
166      - [a, eic, extint11]
167      - [b, adc, ain19]
168      - [b, ptc, x3]
169      - [b, ptc, y9]
170      - [c, sercom0, pad3]
171      - [d, sercom2, pad3]
172      - [e, tcc1, wo1]
173      - [f, tcc0, wo3]
174      - [h, gclk, io5]
175  pb10:
176    pincodes: [g, j]
177    periph:
178      - [a, eic, extint10]
179      - [b, ptc, y2]
180      - [d, sercom4, pad2]
181      - [e, tc1, wo0]
182      - [f, tcc0, wo4]
183      - [h, gclk, io4]
184  pb11:
185    pincodes: [g, j]
186    periph:
187      - [a, eic, extint11]
188      - [b, ptc, y3]
189      - [d, sercom4, pad3]
190      - [e, tc1, wo1]
191      - [f, tcc0, wo5]
192      - [h, gclk, io5]
193  pb12:
194    pincodes: [j]
195    periph:
196      - [a, eic, extint12]
197      - [b, ptc, x12]
198      - [b, ptc, y5]
199      - [c, sercom4, pad0]
200      - [e, tc0, wo0]
201      - [f, tcc0, wo6]
202      - [h, gclk, io6]
203  pb13:
204    pincodes: [j]
205    periph:
206      - [a, eic, extint13]
207      - [b, ptc, x13]
208      - [b, ptc, y14]
209      - [c, sercom4, pad1]
210      - [e, tc0, wo1]
211      - [f, tcc0, wo7]
212      - [h, gclk, io7]
213  pb14:
214    pincodes: [j]
215    periph:
216      - [a, eic, extint14]
217      - [b, ptc, x14]
218      - [c, sercom4, pad2]
219      - [e, tc1, wo0]
220      - [h, gclk, io0]
221  pb15:
222    pincodes: [j]
223    periph:
224      - [a, eic, extint15]
225      - [b, ptc, x15]
226      - [c, sercom4, pad3]
227      - [e, tc1, wo1]
228      - [h, gclk, io1]
229  pa12:
230    pincodes: [g, j]
231    periph:
232      - [a, eic, extint12]
233      - [c, sercom2, pad0]
234      - [d, sercom4, pad0]
235      - [e, tcc2, wo0]
236      - [f, tcc0, wo6]
237      - [h, ac, cmp0]
238  pa13:
239    pincodes: [g, j]
240    periph:
241      - [a, eic, extint13]
242      - [c, sercom2, pad1]
243      - [d, sercom4, pad1]
244      - [e, tcc2, wo1]
245      - [f, tcc0, wo7]
246      - [h, ac, cmp1]
247  pa14:
248    pincodes: [e, g, j]
249    periph:
250      - [a, eic, extint14]
251      - [c, sercom2, pad2]
252      - [d, sercom4, pad2]
253      - [e, tc4, wo0]
254      - [f, tcc0, wo4]
255      - [h, gclk, io0]
256  pa15:
257    pincodes: [e, g, j]
258    periph:
259      - [a, eic, extint15]
260      - [c, sercom2, pad3]
261      - [d, sercom4, pad3]
262      - [e, tc4, wo1]
263      - [f, tcc0, wo5]
264      - [h, gclk, io1]
265  pa16:
266    pincodes: [e, g, j]
267    periph:
268      - [a, eic, extint0]
269      - [b, ptc, x4]
270      - [c, sercom1, pad0]
271      - [d, sercom3, pad0]
272      - [e, tcc2, wo0]
273      - [f, tcc0, wo6]
274      - [h, gclk, io2]
275  pa17:
276    pincodes: [e, g, j]
277    periph:
278      - [a, eic, extint1]
279      - [b, ptc, x5]
280      - [c, sercom1, pad1]
281      - [d, sercom3, pad1]
282      - [e, tcc2, wo1]
283      - [f, tcc0, wo7]
284      - [h, gclk, io3]
285  pa18:
286    pincodes: [e, g, j]
287    periph:
288      - [a, eic, extint2]
289      - [b, ptc, x6]
290      - [c, sercom1, pad2]
291      - [d, sercom3, pad2]
292      - [e, tc4, wo0]
293      - [f, tcc0, wo2]
294      - [h, ac, cmp0]
295  pa19:
296    pincodes: [e, g, j]
297    periph:
298      - [a, eic, extint3]
299      - [b, ptc, x7]
300      - [c, sercom1, pad3]
301      - [d, sercom3, pad3]
302      - [e, tc4, wo1]
303      - [f, tcc0, wo3]
304      - [h, ac, cmp1]
305  pb16:
306    pincodes: [j]
307    periph:
308      - [a, eic, extint0]
309      - [c, sercom5, pad0]
310      - [e, tc2, wo0]
311      - [f, tcc0, wo4]
312      - [h, gclk, io2]
313  pb17:
314    pincodes: [j]
315    periph:
316      - [a, eic, extint1]
317      - [c, sercom5, pad1]
318      - [e, tc2, wo1]
319      - [f, tcc0, wo5]
320      - [h, gclk, io3]
321  pa20:
322    pincodes: [g, j]
323    periph:
324      - [a, eic, extint4]
325      - [b, ptc, x8]
326      - [c, sercom5, pad2]
327      - [d, sercom3, pad2]
328      - [e, tc3, wo0]
329      - [f, tcc0, wo6]
330      - [h, gclk, io4]
331  pa21:
332    pincodes: [g, j]
333    periph:
334      - [a, eic, extint5]
335      - [b, ptc, x9]
336      - [c, sercom5, pad3]
337      - [d, sercom3, pad3]
338      - [e, tc3, wo1]
339      - [f, tcc0, wo7]
340      - [h, gclk, io5]
341  pa22:
342    pincodes: [e, g, j]
343    periph:
344      - [a, eic, extint6]
345      - [b, ptc, x10]
346      - [c, sercom3, pad0]
347      - [d, sercom5, pad0]
348      - [e, tc0, wo0]
349      - [f, tcc0, wo4]
350      - [h, gclk, io6]
351  pa23:
352    pincodes: [e, g, j]
353    periph:
354      - [a, eic, extint7]
355      - [b, ptc, x11]
356      - [c, sercom3, pad1]
357      - [d, sercom5, pad1]
358      - [e, tc0, wo1]
359      - [f, tcc0, wo5]
360      - [g, usb, sof]
361      - [h, gclk, io7]
362  pa24:
363    pincodes: [e, g, j]
364    periph:
365      - [a, eic, extint12]
366      - [c, sercom3, pad2]
367      - [d, sercom5, pad2]
368      - [e, tc1, wo0]
369      - [f, tcc1, wo2]
370      - [g, usb, dm]
371  pa25:
372    pincodes: [e, g, j]
373    periph:
374      - [a, eic, extint13]
375      - [c, sercom3, pad3]
376      - [d, sercom5, pad3]
377      - [e, tc1, wo1]
378      - [f, tcc1, wo3]
379      - [g, usb, dp]
380  pb22:
381    pincodes: [g, j]
382    periph:
383      - [a, eic, extint6]
384      - [d, sercom5, pad2]
385      - [e, tc3, wo0]
386      - [h, gclk, io0]
387  pb23:
388    pincodes: [g, j]
389    periph:
390      - [a, eic, extint7]
391      - [d, sercom5, pad3]
392      - [e, tc3, wo1]
393      - [h, gclk, io1]
394  pa27:
395    pincodes: [e, g, j]
396    periph:
397      - [a, eic, extint15]
398      - [h, gclk, io0]
399  pa30:
400    pincodes: [e, g, j]
401    periph:
402      - [a, eic, extint10]
403      - [d, sercom1, pad2]
404      - [e, tcc1, wo0]
405      - [h, gclk, io0]
406  pa31:
407    pincodes: [e, g, j]
408    periph:
409      - [a, eic, extint11]
410      - [d, sercom1, pad3]
411      - [e, tcc1, wo1]
412  pb30:
413    pincodes: [j]
414    periph:
415      - [a, eic, extint14]
416      - [d, sercom5, pad0]
417      - [e, tcc0, wo0]
418      - [f, tcc1, wo2]
419  pb31:
420    pincodes: [j]
421    periph:
422      - [a, eic, extint15]
423      - [d, sercom5, pad1]
424      - [e, tcc0, wo1]
425      - [f, tcc1, wo3]
426  pb00:
427    pincodes: [j]
428    periph:
429      - [a, eic, extint0]
430      - [b, adc, ain8]
431      - [d, sercom5, pad2]
432      - [e, tc3, wo0]
433  pb01:
434    pincodes: [j]
435    periph:
436      - [a, eic, extint1]
437      - [b, adc, ain9]
438      - [d, sercom5, pad3]
439      - [e, tc3, wo1]
440  pb02:
441    pincodes: [g, j]
442    periph:
443      - [a, eic, extint2]
444      - [b, adc, ain10]
445      - [d, sercom5, pad0]
446      - [e, tc2, wo0]
447  pb03:
448    pincodes: [g, j]
449    periph:
450      - [a, eic, extint3]
451      - [b, adc, ain11]
452      - [d, sercom5, pad1]
453      - [e, tc2, wo1]
454