1/*
2 * Copyright (c) 2023 Nuvoton Technology Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7&pinctrl {
8	/* Prebuild nodes for peripheral device's characteristics (Optional) */
9	/omit-if-no-ref/ vhif_lpc_sl: devctl-vhif-3p3v-lpc {
10		dev-ctl = <0x0 2 2 0x01>;
11	};
12
13	/omit-if-no-ref/ vhif_espi_shi_sl: devctl-vhif-1p8v-espi-shi {
14		dev-ctl = <0x0 2 2 0x02>;
15	};
16
17	/omit-if-no-ref/ vspi_3p3v_sl: devctl-vspi-3p3v {
18		dev-ctl = <0x0 4 2 0x01>;
19	};
20
21	/omit-if-no-ref/ vspi_1p8v_sl: devctl-vspi-1p8v {
22		dev-ctl = <0x0 4 2 0x02>;
23	};
24
25	/omit-if-no-ref/ ext_flash_tris_off: devctl-fiu-ext-tris-off {
26		dev-ctl = <0x0 6 1 0x00>;
27	};
28
29	/omit-if-no-ref/ ext_flash_tris_on: devctl-fiu-ext-tris-on {
30		dev-ctl = <0x0 6 1 0x01>;
31	};
32
33	/omit-if-no-ref/ sio_clk_sel_96m: devctl3-sio-clk_sel-96m {
34		dev-ctl = <0x4 6 2 0x00>;
35	};
36
37	/omit-if-no-ref/ sio_clk_sel_100: devctl3-sio-clk_sel-100m {
38		dev-ctl = <0x4 6 2 0x01>;
39	};
40
41	/omit-if-no-ref/ sio_clk_sel_120m: devctl3-sio-clk_sel-120m {
42		dev-ctl = <0x4 6 2 0x02>;
43	};
44
45	/omit-if-no-ref/ sio_clk_sel_90m: devctl3-sio-clk_sel-90m {
46		dev-ctl = <0x4 6 2 0x03>;
47	};
48
49	/* Prebuild nodes for peripheral device's pin-muxing and pad properties */
50	/* Flash Interface Unit (FIU) */
51	/omit-if-no-ref/ fiu_ext_io0_io1_clk_cs_gpa4_96_a2_a0: periph-fiu-ext {
52		pinmux = <&alt0_gpio_no_fpip>;
53	};
54
55	/omit-if-no-ref/ fiu_ext_quad_io2_io3_gp93_a7: periph-fiu-ext-quad {
56		pinmux = <&alt0_f_spi_quad>;
57	};
58
59	/omit-if-no-ref/ ext_flash_cs1_sl: periph-ext-spi-flash-cs1 {
60		pinmux = <&alt0_f_spi_cs1>;
61	};
62
63	/* Host peripheral interfaces */
64	/omit-if-no-ref/ espi_lpc_gp46_47_51_52_53_54_55_57: periph-lpc-espi {
65		pinmux = <&alt1_no_lpc_espi>;
66	};
67
68	/* I2C peripheral interfaces */
69	/omit-if-no-ref/ i2c0_0_sda_scl_gpb4_b5: periph-i2c0-0 {
70		pinmux = <&alt2_i2c0_0_sl>;
71		periph-pupd = <0x00 0>;
72	};
73
74	/omit-if-no-ref/ i2c1_0_sda_scl_gp87_90: periph-i2c1-0 {
75		pinmux = <&alt2_i2c1_0_sl>;
76		periph-pupd = <0x00 2>;
77	};
78
79	/omit-if-no-ref/ i2c2_0_sda_scl_gp91_92: periph-i2c2-0 {
80		pinmux = <&alt2_i2c2_0_sl>;
81		periph-pupd = <0x00 4>;
82	};
83
84	/omit-if-no-ref/ i2c3_0_sda_scl_gpd0_d1: periph-i2c3-0 {
85		pinmux = <&alt2_i2c3_0_sl>;
86		periph-pupd = <0x00 6>;
87	};
88
89	/omit-if-no-ref/ i2c4_0_sda_scl_gp75_86: periph-i2c4-0 {
90		pinmux = <&alt2_i2c4_0_sl>;
91		periph-pupd = <0x00 7>;
92	};
93
94	/omit-if-no-ref/ i2c4_1_sda_scl_gpf2_f3: periph-i2c4-1 {
95		pinmux = <&alt6_i2c4_1_sl>;
96		periph-pupd = <0x01 2>;
97	};
98
99	/omit-if-no-ref/ i2c5_0_sda_scl_gp33_36: periph-i2c5-0 {
100		pinmux = <&alt2_i2c5_0_sl>;
101		periph-pupd = <0x00 5>;
102	};
103
104	/omit-if-no-ref/ i2c5_1_sda_scl_gpf4_f5: periph-i2c5-1 {
105		pinmux = <&alt6_i2c5_1_sl>;
106		periph-pupd = <0x01 1>;
107	};
108
109	/omit-if-no-ref/ i2c6_0_sda_scl_gpc1_c2: periph-i2c6-0 {
110		pinmux = <&alt2_i2c6_0_sl>;
111		periph-pupd = <0x00 3>;
112	};
113
114	/omit-if-no-ref/ i2c6_1_sda_scl_gpe3_e4: periph-i2c6-1 {
115		pinmux = <&alt6_i2c6_1_sl>;
116		periph-pupd = <0x01 0>;
117	};
118
119	/omit-if-no-ref/ i2c7_0_sda_scl_gpb2_b3: periph-i2c7-0 {
120		pinmux = <&alt2_i2c7_0_sl>;
121		periph-pupd = <0x00 1>;
122	};
123
124	/omit-if-no-ref/ i2c7_1_sda_scl_gpb7_c0: periph-i2c7-1 {
125		pinmux = <&altk_i2c7_1_sl>;
126		periph-pupd = <0x01 3>;
127	};
128
129	/* PS2 peripheral interfaces */
130	/omit-if-no-ref/ ps2_0_dat_clk_gp67_70: periph-ps2-0 {
131		pinmux = <&alt3_ps2_0_sl>;
132	};
133
134	/omit-if-no-ref/ ps2_1_dat_clk_gp62_63: periph-ps2-1 {
135		pinmux = <&alt3_ps2_1_sl>;
136	};
137
138	/omit-if-no-ref/ ps2_2_dat_clk_gp34_37: periph-ps2-2 {
139		pinmux = <&alt3_ps2_2_sl>;
140	};
141
142	/omit-if-no-ref/ ps2_3_2_dat_clk_gpa6_a7: periph-ps2-3-2 {
143		pinmux = <&altc_ps2_3_sl2>;
144	};
145
146	/* Tachometer peripheral interfaces */
147	/omit-if-no-ref/ ta1_1_in_gp40: periph-ta1-1 {
148		pinmux = <&alt3_ta1_sl1>;
149	};
150
151	/omit-if-no-ref/ ta1_2_in_gp93: periph-ta1-2 {
152		pinmux = <&altc_ta1_sl2>;
153	};
154
155	/omit-if-no-ref/ ta2_1_in_gp73: periph-ta2-1 {
156		pinmux = <&alt3_ta2_sl1>;
157	};
158
159	/omit-if-no-ref/ ta2_2_in_gpa6: periph-ta2-2 {
160		pinmux = <&altc_ta2_sl2>;
161	};
162
163	/omit-if-no-ref/ tb1_1_in_gpa4: periph-tb1-1 {
164		pinmux = <&alt3_tb1_sl1>;
165	};
166
167	/omit-if-no-ref/ tb1_2_in_gpd3: periph-tb1-2 {
168		pinmux = <&altc_tb1_sl2>;
169	};
170
171	/omit-if-no-ref/ tb2_2_in_gpa7: periph-tb2-2 {
172		pinmux = <&altc_tb2_sl2>;
173	};
174
175	/* PWM peripheral interfaces */
176	/omit-if-no-ref/ pwm0_gpc3: periph-pwm0 {
177		pinmux = <&alt4_pwm0_sl>;
178	};
179
180	/omit-if-no-ref/ pwm1_gpc2: periph-pwm1 {
181		pinmux = <&alt4_pwm1_sl>;
182	};
183
184	/omit-if-no-ref/ pwm2_gpc4: periph-pwm2 {
185		pinmux = <&alt4_pwm2_sl>;
186	};
187
188	/omit-if-no-ref/ pwm3_gp80: periph-pwm3 {
189		pinmux = <&alt4_pwm3_sl>;
190	};
191
192	/omit-if-no-ref/ pwm4_gpb6: periph-pwm4 {
193		pinmux = <&alt4_pwm4_sl>;
194	};
195
196	/omit-if-no-ref/ pwm5_gpb7: periph-pwm5 {
197		pinmux = <&alt4_pwm5_sl>;
198	};
199
200	/omit-if-no-ref/ pwm6_gpc0: periph-pwm6 {
201		pinmux = <&alt4_pwm6_sl>;
202	};
203
204	/omit-if-no-ref/ pwm7_gp60: periph-pwm7 {
205		pinmux = <&alt4_pwm7_sl>;
206	};
207
208	/* Keyboard peripheral interfaces. */
209	/omit-if-no-ref/ ksi0_gp31: periph-kbscan-ksi0 {
210		pinmux = <&alt7_no_ksi0_sl>;
211	};
212
213	/omit-if-no-ref/ ksi1_gp30: periph-kbscan-ksi1 {
214		pinmux = <&alt7_no_ksi1_sl>;
215	};
216
217	/omit-if-no-ref/ ksi2_gp27: periph-kbscan-ksi2 {
218		pinmux = <&alt7_no_ksi2_sl>;
219	};
220
221	/omit-if-no-ref/ ksi3_gp26: periph-kbscan-ksi3 {
222		pinmux = <&alt7_no_ksi3_sl>;
223	};
224
225	/omit-if-no-ref/ ksi4_gp25: periph-kbscan-ksi4 {
226		pinmux = <&alt7_no_ksi4_sl>;
227	};
228
229	/omit-if-no-ref/ ksi5_gp24: periph-kbscan-ksi5 {
230		pinmux = <&alt7_no_ksi5_sl>;
231	};
232
233	/omit-if-no-ref/ ksi6_gp23: periph-kbscan-ksi6 {
234		pinmux = <&alt7_no_ksi6_sl>;
235	};
236
237	/omit-if-no-ref/ ksi7_gp22: periph-kbscan-ksi7 {
238		pinmux = <&alt7_no_ksi7_sl>;
239	};
240
241	/omit-if-no-ref/ kso00_gp21: periph-kbscan-kso00 {
242		pinmux = <&alt8_no_kso00_sl>;
243	};
244
245	/omit-if-no-ref/ kso01_gp20: periph-kbscan-kso01 {
246		pinmux = <&alt8_no_kso01_sl>;
247	};
248
249	/omit-if-no-ref/ kso02_gp17: periph-kbscan-kso02 {
250		pinmux = <&alt8_no_kso02_sl>;
251	};
252
253	/omit-if-no-ref/ kso03_gp16: periph-kbscan-kso03 {
254		pinmux = <&alt8_no_kso03_sl>;
255	};
256
257	/omit-if-no-ref/ kso04_gp15: periph-kbscan-kso04 {
258		pinmux = <&alt8_no_kso04_sl>;
259	};
260
261	/omit-if-no-ref/ kso05_gp14: periph-kbscan-kso05 {
262		pinmux = <&alt8_no_kso05_sl>;
263	};
264
265	/omit-if-no-ref/ kso06_gp13: periph-kbscan-kso06 {
266		pinmux = <&alt8_no_kso06_sl>;
267	};
268
269	/omit-if-no-ref/ kso07_gp12: periph-kbscan-kso07 {
270		pinmux = <&alt8_no_kso07_sl>;
271	};
272
273	/omit-if-no-ref/ kso08_gp11: periph-kbscan-kso08 {
274		pinmux = <&alt9_no_kso08_sl>;
275	};
276
277	/omit-if-no-ref/ kso09_gp10: periph-kbscan-kso09 {
278		pinmux = <&alt9_no_kso09_sl>;
279	};
280
281	/omit-if-no-ref/ kso10_gp07: periph-kbscan-kso10 {
282		pinmux = <&alt9_no_kso10_sl>;
283	};
284
285	/omit-if-no-ref/ kso11_gp06: periph-kbscan-kso11 {
286		pinmux = <&alt9_no_kso11_sl>;
287	};
288
289	/omit-if-no-ref/ kso12_gp05: periph-kbscan-kso12 {
290		pinmux = <&alt9_no_kso12_sl>;
291	};
292
293	/omit-if-no-ref/ kso13_gp04: periph-kbscan-kso13 {
294		pinmux = <&alt9_no_kso13_sl>;
295	};
296
297	/omit-if-no-ref/ kso14_gp82: periph-kbscan-kso14 {
298		pinmux = <&alt9_no_kso14_sl>;
299	};
300
301	/omit-if-no-ref/ kso15_gp83: periph-kbscan-kso15 {
302		pinmux = <&alt9_no_kso15_sl>;
303	};
304
305	/omit-if-no-ref/ kso16_gp03: periph-kbscan-kso16 {
306		pinmux = <&alta_no_kso16_sl>;
307	};
308
309	/omit-if-no-ref/ kso17_gpb1: periph-kbscan-kso17 {
310		pinmux = <&alta_no_kso17_sl>;
311	};
312
313	/* Miscellaneous peripheral interfaces */
314	/omit-if-no-ref/ clk_32k_out_gp75: periph-clk-32k-out {
315		pinmux = <&alta_32k_out_sl>;
316	};
317
318	/omit-if-no-ref/ clk_32k_in_gpe7: periph-clk-32k-in {
319		pinmux = <&alta_32kclkin_sl>;
320	};
321
322	/omit-if-no-ref/ vcc1_rst_gp77: periph-vcc1-rst {
323		pinmux = <&alta_no_vcc1_rst>;
324	};
325
326	/omit-if-no-ref/ peci_dat_gp81: periph-peci-dat {
327		pinmux = <&alta_no_peci_en>;
328	};
329
330	/* Host UART peripheral interfaces */
331	/omit-if-no-ref/ huart_rxd_gp75: periph-host-uart-rxd {
332		pinmux = <&altb_rxd_sl>;
333	};
334
335	/omit-if-no-ref/ huart_txd_gp86: periph-host-uart-txd {
336		pinmux = <&altb_txd_sl>;
337	};
338
339	/omit-if-no-ref/ huart_rts_gp36: periph-host-uart-rts {
340		pinmux = <&altb_rts_sl>;
341	};
342
343	/omit-if-no-ref/ huart_cts_gp33: periph-host-uart-cts {
344		pinmux = <&altb_cts_sl>;
345	};
346
347	/omit-if-no-ref/ huart_ri_gp42: periph-host-uart-ri {
348		pinmux = <&altb_ri_sl>;
349	};
350
351	/omit-if-no-ref/ huart_dtr_bout_gpc7: periph-host-uart-dtr_bout {
352		pinmux = <&altb_dtr_bout_sl>;
353	};
354
355	/omit-if-no-ref/ huart_dcd_gpb3: periph-host-uart-dcd {
356		pinmux = <&altb_dcd_sl>;
357	};
358
359	/omit-if-no-ref/ huart_dsr_gpb2: periph-host-uart-dsr {
360		pinmux = <&altb_dsr_sl>;
361	};
362
363	/* SHI peripheral interfaces */
364	/omit-if-no-ref/ shi_gp46_47_53_55: periph-shi {
365		pinmux = <&altc_shi_sl>;
366		periph-pupd = <0x01 4>;
367	};
368
369	/* FLM peripheral interfaces */
370	/omit-if-no-ref/ flm_gp96_a0_a2_a4: periph-flm {
371		pinmux = <&alth_flm_sl>;
372	};
373
374	/omit-if-no-ref/ flm_quad_gp93_a7: periph-flm-quad {
375		pinmux = <&alth_flm_quad>;
376	};
377
378	/omit-if-no-ref/ flm_mon_md_gpd6: periph-flm-mon-md {
379		pinmux = <&alth_flm_mon_md>;
380	};
381
382
383	/* ADC peripheral interfaces. */
384	/omit-if-no-ref/ adc0_chan0_gp45: periph-adc0-0 {
385		pinmux = <&alt6_adc0_sl>;
386	};
387
388	/omit-if-no-ref/ adc0_chan1_gp44: periph-adc0-1 {
389		pinmux = <&alt6_adc1_sl>;
390	};
391
392	/omit-if-no-ref/ adc0_chan2_gp43: periph-adc0-2 {
393		pinmux = <&alt6_adc2_sl>;
394	};
395
396	/omit-if-no-ref/ adc0_chan3_gp42: periph-adc0-3 {
397		pinmux = <&alt6_adc3_sl>;
398	};
399
400	/omit-if-no-ref/ adc0_chan4_gp41: periph-adc0-4 {
401		pinmux = <&alt6_adc4_sl>;
402	};
403
404	/omit-if-no-ref/ adc0_chan5_gp37: periph-adc0-5 {
405		pinmux = <&altf_adc5_sl>;
406	};
407
408	/omit-if-no-ref/ adc0_chan6_gp34: periph-adc0-6 {
409		pinmux = <&altf_adc6_sl>;
410	};
411
412	/omit-if-no-ref/ adc0_chan7_gpe1: periph-adc0-7 {
413		pinmux = <&altf_adc7_sl>;
414	};
415
416	/omit-if-no-ref/ adc0_chan8_gpf1: periph-adc0-8 {
417		pinmux = <&altf_adc8_sl>;
418	};
419
420	/omit-if-no-ref/ adc0_chan9_gpf0: periph-adc0-9 {
421		pinmux = <&altf_adc9_sl>;
422	};
423
424	/omit-if-no-ref/ adc0_chan10_gpe0: periph-adc0-10 {
425		pinmux = <&altf_adc10_sl>;
426	};
427
428	/omit-if-no-ref/ adc0_chan11_gpc7: periph-adc0-11 {
429		pinmux = <&altf_adc11_sl>;
430	};
431
432	/omit-if-no-ref/ adc0_chan12_gp24: periph-adc0-12 {
433		pinmux = <&altf_adc12_sl>;
434	};
435
436	/omit-if-no-ref/ adc0_chan13_gp26: periph-adc0-13 {
437		pinmux = <&altl_adc13_sl>;
438	};
439
440	/omit-if-no-ref/ adc0_chan14_gp27: periph-adc0-14 {
441		pinmux = <&altl_adc14_sl>;
442	};
443
444	/omit-if-no-ref/ adc0_chan15_gp31: periph-adc0-15 {
445		pinmux = <&altl_adc15_sl>;
446	};
447
448	/omit-if-no-ref/ adc0_chan16_gp62: periph-adc0-16 {
449		pinmux = <&altl_adc16_sl>;
450	};
451
452	/omit-if-no-ref/ adc0_chan17_gp63: periph-adc0-17 {
453		pinmux = <&altl_adc17_sl>;
454	};
455
456	/omit-if-no-ref/ adc0_chan18_gp67: periph-adc0-18 {
457		pinmux = <&altl_adc18_sl>;
458	};
459
460	/omit-if-no-ref/ adc0_chan19_gp70: periph-adc0-19 {
461		pinmux = <&altl_adc19_sl>;
462	};
463
464	/omit-if-no-ref/ adc0_chan20_gp22: periph-adc0-20 {
465		pinmux = <&altl_adc20_sl>;
466	};
467
468	/omit-if-no-ref/ adc0_chan21_gp23: periph-adc0-21 {
469		pinmux = <&altm_adc21_sl>;
470	};
471
472	/omit-if-no-ref/ adc0_chan22_gpc1: periph-adc0-22 {
473		pinmux = <&altm_adc22_sl>;
474	};
475
476	/omit-if-no-ref/ adc0_chan23_gp74: periph-adc0-23 {
477		pinmux = <&altm_adc23_sl>;
478	};
479
480	/omit-if-no-ref/ adc0_chan24_gp25: periph-adc0-24 {
481		pinmux = <&altm_adc24_sl>;
482	};
483
484	/omit-if-no-ref/ adc0_chan25_gp30: periph-adc0-25 {
485		pinmux = <&altm_adc25_sl>;
486	};
487
488	/* PSL peripheral interfaces */
489	/omit-if-no-ref/ psl_in1_gpd2: periph-psl-in1 {
490		pinmux = <&altd_npsl_in1_sl>;
491		psl-offset = <0>;
492		psl-polarity = <&altd_psl_in1_ahi>;
493	};
494
495	/omit-if-no-ref/ psl_in2_gp00: periph-psl-in2 {
496		pinmux = <&altd_npsl_in2_sl>;
497		psl-offset = <1>;
498		psl-polarity = <&altd_psl_in2_ahi>;
499	};
500
501	/omit-if-no-ref/ psl_in3_gp01: periph-psl-in3 {
502		pinmux = <&altd_psl_in3_sl>;
503		psl-offset = <2>;
504		psl-polarity = <&altd_psl_in3_ahi>;
505	};
506
507	/omit-if-no-ref/ psl_in4_gp02: periph-psl-in4 {
508		pinmux = <&altd_psl_in4_sl>;
509		psl-offset = <3>;
510		psl-polarity = <&altd_psl_in4_ahi>;
511	};
512
513	/omit-if-no-ref/ psl_gpo_gpd7: periph-psl-gpo {
514		pinmux = <&altg_psl_gpo_sl>;
515	};
516
517	/omit-if-no-ref/ psl_out_gp85: periph-psl-out {
518		pinmux = <&altg_psl_out_sl>;
519	};
520
521	/* I3C peripheral interfaces */
522	/omit-if-no-ref/ i3c1_sda_scl_gpe3_e4: periph-i3c1 {
523		pinmux = <&altn_i3c1_sl>;
524	};
525
526	/omit-if-no-ref/ i3c2_sda_scl_gp50_56: periph-i3c2 {
527		pinmux = <&altn_i3c2_sl>;
528	};
529
530	/omit-if-no-ref/ i3c3_sda_scl_gpf4_f5: periph-i3c3 {
531		pinmux = <&altn_i3c3_sl>;
532	};
533
534	/* UART peripheral interfaces */
535	/omit-if-no-ref/ uart1_1_sin_gp10: periph-uart1-1-sin {
536		pinmux = <&altj_cr_sin1_sl1>;
537	};
538
539	/omit-if-no-ref/ uart1_1_sout_gp11: periph-uart1-1-sout {
540		pinmux = <&altj_cr_sout1_sl1>;
541	};
542
543	/omit-if-no-ref/ uart1_2_sin_gp64: periph-uart1-2-sin {
544		pinmux = <&altj_cr_sin1_sl2>;
545	};
546
547	/omit-if-no-ref/ uart1_2_sout_gp65: periph-uart1-2-sout {
548		pinmux = <&altj_cr_sout1_sl2>;
549	};
550
551	/omit-if-no-ref/ uart2_sin_gp75: periph-uart2-sin {
552		pinmux = <&altj_cr_sin2_sl>;
553	};
554
555	/omit-if-no-ref/ uart2_sout_gp86: periph-uart2-sout {
556		pinmux = <&altj_cr_sout2_sl>;
557	};
558
559	/omit-if-no-ref/ uart3_sin_gpd4: periph-uart3-sin {
560		pinmux = <&altj_cr_sin3_sl>;
561	};
562
563	/omit-if-no-ref/ uart3_sout_gpd6: periph-uart3-sout {
564		pinmux = <&altj_cr_sout3_sl>;
565	};
566
567	/omit-if-no-ref/ uart4_sin_gpb1: periph-uart4-sin {
568		pinmux = <&alte_cr_sin4_sl>;
569	};
570
571	/omit-if-no-ref/ uart4_sout_gp35: periph-uart4-sout {
572		pinmux = <&alte_cr_sout4_sl>;
573	};
574
575	/omit-if-no-ref/ spip_sclk_mosi_miso_gp95_gpa1_gpa3_gpa5_sl: periph-spip-sl {
576		pinmux = <&alt0_spip_sl>;
577	};
578
579	/omit-if-no-ref/ spip_sclk_mosi_miso_gp95_gpa1_gpa3_gpa5_no_spip_inv: periph-no-spip-inv {
580		pinmux = <&alt0_gpio_no_spip>;
581	};
582};
583