pm_api_pinctrl.c 70 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

/*
 * ZynqMP system level PM-API functions for pin control.
 */

#include <arch_helpers.h>
#include <platform.h>
13
#include <string.h>
14
15
16
17
18
19
#include "pm_api_pinctrl.h"
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_common.h"
#include "pm_ipi.h"

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#define PINCTRL_FUNCTION_MASK			U(0xFE)
#define PINCTRL_VOLTAGE_STATUS_MASK		U(0x01)
#define NFUNCS_PER_PIN				U(13)
#define PINCTRL_NUM_MIOS			U(78)
#define MAX_PIN_PER_REG				U(26)
#define PINCTRL_BANK_ADDR_STEP			U(28)

#define PINCTRL_DRVSTRN0_REG_OFFSET		U(0)
#define PINCTRL_DRVSTRN1_REG_OFFSET		U(4)
#define PINCTRL_SCHCMOS_REG_OFFSET		U(8)
#define PINCTRL_PULLCTRL_REG_OFFSET		U(12)
#define PINCTRL_PULLSTAT_REG_OFFSET		U(16)
#define PINCTRL_SLEWCTRL_REG_OFFSET		U(20)
#define PINCTRL_VOLTAGE_STAT_REG_OFFSET		U(24)

#define IOU_SLCR_BANK1_CTRL5			U(0XFF180164)

#define PINCTRL_CFG_ADDR_OFFSET(addr, reg, miopin)			\
38
	((addr) + 4 * PINCTRL_NUM_MIOS + PINCTRL_BANK_ADDR_STEP *	\
39
	((miopin) / MAX_PIN_PER_REG) + (reg))
40

41
42
#define PINCTRL_PIN_OFFSET(_miopin) \
	((_miopin) - (MAX_PIN_PER_REG * ((_miopin) / MAX_PIN_PER_REG)))
43

44
45
#define PINCTRL_REGVAL_TO_PIN_CONFIG(_pin, _val)			\
	(((_val) >> PINCTRL_PIN_OFFSET(_pin)) & 0x1)
46
47
48
49
50
51
52

static uint8_t pm_pinctrl_mux[NFUNCS_PER_PIN] = {
	0x02, 0x04, 0x08, 0x10, 0x18,
	0x00, 0x20, 0x40, 0x60, 0x80,
	0xA0, 0xC0, 0xE0
};

53
54
55
56
57
58
59
struct pinctrl_function {
	char name[FUNCTION_NAME_LEN];
	uint16_t (*groups)[];
	uint8_t regval;
};

/* Max groups for one pin */
60
#define MAX_PIN_GROUPS	U(13)
61
62

struct zynqmp_pin_group {
63
	uint16_t (*groups)[];
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
};

static struct pinctrl_function pinctrl_functions[MAX_FUNCTION] =  {
	[PINCTRL_FUNC_CAN0] = {
		.name = "can0",
		.regval = 0x20,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_CAN0_0,
			PINCTRL_GRP_CAN0_1,
			PINCTRL_GRP_CAN0_2,
			PINCTRL_GRP_CAN0_3,
			PINCTRL_GRP_CAN0_4,
			PINCTRL_GRP_CAN0_5,
			PINCTRL_GRP_CAN0_6,
			PINCTRL_GRP_CAN0_7,
			PINCTRL_GRP_CAN0_8,
			PINCTRL_GRP_CAN0_9,
			PINCTRL_GRP_CAN0_10,
			PINCTRL_GRP_CAN0_11,
			PINCTRL_GRP_CAN0_12,
			PINCTRL_GRP_CAN0_13,
			PINCTRL_GRP_CAN0_14,
			PINCTRL_GRP_CAN0_15,
			PINCTRL_GRP_CAN0_16,
			PINCTRL_GRP_CAN0_17,
			PINCTRL_GRP_CAN0_18,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_CAN1] = {
		.name = "can1",
		.regval = 0x20,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_CAN1_0,
			PINCTRL_GRP_CAN1_1,
			PINCTRL_GRP_CAN1_2,
			PINCTRL_GRP_CAN1_3,
			PINCTRL_GRP_CAN1_4,
			PINCTRL_GRP_CAN1_5,
			PINCTRL_GRP_CAN1_6,
			PINCTRL_GRP_CAN1_7,
			PINCTRL_GRP_CAN1_8,
			PINCTRL_GRP_CAN1_9,
			PINCTRL_GRP_CAN1_10,
			PINCTRL_GRP_CAN1_11,
			PINCTRL_GRP_CAN1_12,
			PINCTRL_GRP_CAN1_13,
			PINCTRL_GRP_CAN1_14,
			PINCTRL_GRP_CAN1_15,
			PINCTRL_GRP_CAN1_16,
			PINCTRL_GRP_CAN1_17,
			PINCTRL_GRP_CAN1_18,
			PINCTRL_GRP_CAN1_19,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_ETHERNET0] = {
		.name = "ethernet0",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_ETHERNET0_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_ETHERNET1] = {
		.name = "ethernet1",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_ETHERNET1_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_ETHERNET2] = {
		.name = "ethernet2",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_ETHERNET2_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_ETHERNET3] = {
		.name = "ethernet3",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_ETHERNET3_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_GEMTSU0] = {
		.name = "gemtsu0",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_GEMTSU0_0,
			PINCTRL_GRP_GEMTSU0_1,
			PINCTRL_GRP_GEMTSU0_2,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_GPIO0] = {
		.name = "gpio0",
		.regval = 0x00,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_GPIO0_0,
			PINCTRL_GRP_GPIO0_1,
			PINCTRL_GRP_GPIO0_2,
			PINCTRL_GRP_GPIO0_3,
			PINCTRL_GRP_GPIO0_4,
			PINCTRL_GRP_GPIO0_5,
			PINCTRL_GRP_GPIO0_6,
			PINCTRL_GRP_GPIO0_7,
			PINCTRL_GRP_GPIO0_8,
			PINCTRL_GRP_GPIO0_9,
			PINCTRL_GRP_GPIO0_10,
			PINCTRL_GRP_GPIO0_11,
			PINCTRL_GRP_GPIO0_12,
			PINCTRL_GRP_GPIO0_13,
			PINCTRL_GRP_GPIO0_14,
			PINCTRL_GRP_GPIO0_15,
			PINCTRL_GRP_GPIO0_16,
			PINCTRL_GRP_GPIO0_17,
			PINCTRL_GRP_GPIO0_18,
			PINCTRL_GRP_GPIO0_19,
			PINCTRL_GRP_GPIO0_20,
			PINCTRL_GRP_GPIO0_21,
			PINCTRL_GRP_GPIO0_22,
			PINCTRL_GRP_GPIO0_23,
			PINCTRL_GRP_GPIO0_24,
			PINCTRL_GRP_GPIO0_25,
			PINCTRL_GRP_GPIO0_26,
			PINCTRL_GRP_GPIO0_27,
			PINCTRL_GRP_GPIO0_28,
			PINCTRL_GRP_GPIO0_29,
			PINCTRL_GRP_GPIO0_30,
			PINCTRL_GRP_GPIO0_31,
			PINCTRL_GRP_GPIO0_32,
			PINCTRL_GRP_GPIO0_33,
			PINCTRL_GRP_GPIO0_34,
			PINCTRL_GRP_GPIO0_35,
			PINCTRL_GRP_GPIO0_36,
			PINCTRL_GRP_GPIO0_37,
			PINCTRL_GRP_GPIO0_38,
			PINCTRL_GRP_GPIO0_39,
			PINCTRL_GRP_GPIO0_40,
			PINCTRL_GRP_GPIO0_41,
			PINCTRL_GRP_GPIO0_42,
			PINCTRL_GRP_GPIO0_43,
			PINCTRL_GRP_GPIO0_44,
			PINCTRL_GRP_GPIO0_45,
			PINCTRL_GRP_GPIO0_46,
			PINCTRL_GRP_GPIO0_47,
			PINCTRL_GRP_GPIO0_48,
			PINCTRL_GRP_GPIO0_49,
			PINCTRL_GRP_GPIO0_50,
			PINCTRL_GRP_GPIO0_51,
			PINCTRL_GRP_GPIO0_52,
			PINCTRL_GRP_GPIO0_53,
			PINCTRL_GRP_GPIO0_54,
			PINCTRL_GRP_GPIO0_55,
			PINCTRL_GRP_GPIO0_56,
			PINCTRL_GRP_GPIO0_57,
			PINCTRL_GRP_GPIO0_58,
			PINCTRL_GRP_GPIO0_59,
			PINCTRL_GRP_GPIO0_60,
			PINCTRL_GRP_GPIO0_61,
			PINCTRL_GRP_GPIO0_62,
			PINCTRL_GRP_GPIO0_63,
			PINCTRL_GRP_GPIO0_64,
			PINCTRL_GRP_GPIO0_65,
			PINCTRL_GRP_GPIO0_66,
			PINCTRL_GRP_GPIO0_67,
			PINCTRL_GRP_GPIO0_68,
			PINCTRL_GRP_GPIO0_69,
			PINCTRL_GRP_GPIO0_70,
			PINCTRL_GRP_GPIO0_71,
			PINCTRL_GRP_GPIO0_72,
			PINCTRL_GRP_GPIO0_73,
			PINCTRL_GRP_GPIO0_74,
			PINCTRL_GRP_GPIO0_75,
			PINCTRL_GRP_GPIO0_76,
			PINCTRL_GRP_GPIO0_77,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_I2C0] = {
		.name = "i2c0",
		.regval = 0x40,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_I2C0_0,
			PINCTRL_GRP_I2C0_1,
			PINCTRL_GRP_I2C0_2,
			PINCTRL_GRP_I2C0_3,
			PINCTRL_GRP_I2C0_4,
			PINCTRL_GRP_I2C0_5,
			PINCTRL_GRP_I2C0_6,
			PINCTRL_GRP_I2C0_7,
			PINCTRL_GRP_I2C0_8,
			PINCTRL_GRP_I2C0_9,
			PINCTRL_GRP_I2C0_10,
			PINCTRL_GRP_I2C0_11,
			PINCTRL_GRP_I2C0_12,
			PINCTRL_GRP_I2C0_13,
			PINCTRL_GRP_I2C0_14,
			PINCTRL_GRP_I2C0_15,
			PINCTRL_GRP_I2C0_16,
			PINCTRL_GRP_I2C0_17,
			PINCTRL_GRP_I2C0_18,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_I2C1] = {
		.name = "i2c1",
		.regval = 0x40,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_I2C1_0,
			PINCTRL_GRP_I2C1_1,
			PINCTRL_GRP_I2C1_2,
			PINCTRL_GRP_I2C1_3,
			PINCTRL_GRP_I2C1_4,
			PINCTRL_GRP_I2C1_5,
			PINCTRL_GRP_I2C1_6,
			PINCTRL_GRP_I2C1_7,
			PINCTRL_GRP_I2C1_8,
			PINCTRL_GRP_I2C1_9,
			PINCTRL_GRP_I2C1_10,
			PINCTRL_GRP_I2C1_11,
			PINCTRL_GRP_I2C1_12,
			PINCTRL_GRP_I2C1_13,
			PINCTRL_GRP_I2C1_14,
			PINCTRL_GRP_I2C1_15,
			PINCTRL_GRP_I2C1_16,
			PINCTRL_GRP_I2C1_17,
			PINCTRL_GRP_I2C1_18,
			PINCTRL_GRP_I2C1_19,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_MDIO0] = {
		.name = "mdio0",
		.regval = 0x60,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_MDIO0_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_MDIO1] = {
		.name = "mdio1",
		.regval = 0x80,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_MDIO1_0,
			PINCTRL_GRP_MDIO1_1,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_MDIO2] = {
		.name = "mdio2",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_MDIO2_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_MDIO3] = {
		.name = "mdio3",
		.regval = 0xc0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_MDIO3_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_QSPI0] = {
		.name = "qspi0",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_QSPI0_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_QSPI_FBCLK] = {
		.name = "qspi_fbclk",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_QSPI_FBCLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_QSPI_SS] = {
		.name = "qspi_ss",
		.regval = 0x02,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_QSPI_SS,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SPI0] = {
		.name = "spi0",
		.regval = 0x80,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SPI0_0,
			PINCTRL_GRP_SPI0_1,
			PINCTRL_GRP_SPI0_2,
			PINCTRL_GRP_SPI0_3,
			PINCTRL_GRP_SPI0_4,
			PINCTRL_GRP_SPI0_5,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SPI1] = {
		.name = "spi1",
		.regval = 0x80,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SPI1_0,
			PINCTRL_GRP_SPI1_1,
			PINCTRL_GRP_SPI1_2,
			PINCTRL_GRP_SPI1_3,
			PINCTRL_GRP_SPI1_4,
			PINCTRL_GRP_SPI1_5,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SPI0_SS] = {
		.name = "spi0_ss",
		.regval = 0x80,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SPI0_0_SS0,
			PINCTRL_GRP_SPI0_0_SS1,
			PINCTRL_GRP_SPI0_0_SS2,
			PINCTRL_GRP_SPI0_1_SS0,
			PINCTRL_GRP_SPI0_1_SS1,
			PINCTRL_GRP_SPI0_1_SS2,
			PINCTRL_GRP_SPI0_2_SS0,
			PINCTRL_GRP_SPI0_2_SS1,
			PINCTRL_GRP_SPI0_2_SS2,
			PINCTRL_GRP_SPI0_3_SS0,
			PINCTRL_GRP_SPI0_3_SS1,
			PINCTRL_GRP_SPI0_3_SS2,
			PINCTRL_GRP_SPI0_4_SS0,
			PINCTRL_GRP_SPI0_4_SS1,
			PINCTRL_GRP_SPI0_4_SS2,
			PINCTRL_GRP_SPI0_5_SS0,
			PINCTRL_GRP_SPI0_5_SS1,
			PINCTRL_GRP_SPI0_5_SS2,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SPI1_SS] = {
		.name = "spi1_ss",
		.regval = 0x80,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SPI1_0_SS0,
			PINCTRL_GRP_SPI1_0_SS1,
			PINCTRL_GRP_SPI1_0_SS2,
			PINCTRL_GRP_SPI1_1_SS0,
			PINCTRL_GRP_SPI1_1_SS1,
			PINCTRL_GRP_SPI1_1_SS2,
			PINCTRL_GRP_SPI1_2_SS0,
			PINCTRL_GRP_SPI1_2_SS1,
			PINCTRL_GRP_SPI1_2_SS2,
			PINCTRL_GRP_SPI1_3_SS0,
			PINCTRL_GRP_SPI1_3_SS1,
			PINCTRL_GRP_SPI1_3_SS2,
			PINCTRL_GRP_SPI1_4_SS0,
			PINCTRL_GRP_SPI1_4_SS1,
			PINCTRL_GRP_SPI1_4_SS2,
			PINCTRL_GRP_SPI1_5_SS0,
			PINCTRL_GRP_SPI1_5_SS1,
			PINCTRL_GRP_SPI1_5_SS2,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO0] = {
		.name = "sdio0",
		.regval = 0x08,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO0_0,
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_2,
			PINCTRL_GRP_SDIO0_1BIT_0_3,
			PINCTRL_GRP_SDIO0_1BIT_0_4,
			PINCTRL_GRP_SDIO0_1BIT_0_5,
			PINCTRL_GRP_SDIO0_1BIT_0_6,
			PINCTRL_GRP_SDIO0_1BIT_0_7,
			PINCTRL_GRP_SDIO0_1BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_2,
			PINCTRL_GRP_SDIO0_1BIT_1_3,
			PINCTRL_GRP_SDIO0_1BIT_1_4,
			PINCTRL_GRP_SDIO0_1BIT_1_5,
			PINCTRL_GRP_SDIO0_1BIT_1_6,
			PINCTRL_GRP_SDIO0_1BIT_1_7,
			PINCTRL_GRP_SDIO0_1BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_2,
			PINCTRL_GRP_SDIO0_1BIT_2_3,
			PINCTRL_GRP_SDIO0_1BIT_2_4,
			PINCTRL_GRP_SDIO0_1BIT_2_5,
			PINCTRL_GRP_SDIO0_1BIT_2_6,
			PINCTRL_GRP_SDIO0_1BIT_2_7,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO0_PC] = {
		.name = "sdio0_pc",
		.regval = 0x08,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO0_0_PC,
			PINCTRL_GRP_SDIO0_1_PC,
			PINCTRL_GRP_SDIO0_2_PC,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO0_CD] = {
		.name = "sdio0_cd",
		.regval = 0x08,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO0_0_CD,
			PINCTRL_GRP_SDIO0_1_CD,
			PINCTRL_GRP_SDIO0_2_CD,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO0_WP] = {
		.name = "sdio0_wp",
		.regval = 0x08,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO0_0_WP,
			PINCTRL_GRP_SDIO0_1_WP,
			PINCTRL_GRP_SDIO0_2_WP,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO1] = {
		.name = "sdio1",
		.regval = 0x10,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO1_0,
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
			PINCTRL_GRP_SDIO1_1BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_2,
			PINCTRL_GRP_SDIO1_1BIT_0_3,
			PINCTRL_GRP_SDIO1_1BIT_0_4,
			PINCTRL_GRP_SDIO1_1BIT_0_5,
			PINCTRL_GRP_SDIO1_1BIT_0_6,
			PINCTRL_GRP_SDIO1_1BIT_0_7,
			PINCTRL_GRP_SDIO1_1BIT_1_0,
			PINCTRL_GRP_SDIO1_1BIT_1_1,
			PINCTRL_GRP_SDIO1_1BIT_1_2,
			PINCTRL_GRP_SDIO1_1BIT_1_3,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO1_PC] = {
		.name = "sdio1_pc",
		.regval = 0x10,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO1_0_PC,
			PINCTRL_GRP_SDIO1_1_PC,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO1_CD] = {
		.name = "sdio1_cd",
		.regval = 0x10,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO1_0_CD,
			PINCTRL_GRP_SDIO1_1_CD,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SDIO1_WP] = {
		.name = "sdio1_wp",
		.regval = 0x10,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SDIO1_0_WP,
			PINCTRL_GRP_SDIO1_1_WP,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_NAND0] = {
		.name = "nand0",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_NAND0_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_NAND0_CE] = {
		.name = "nand0_ce",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_NAND0_0_CE,
			PINCTRL_GRP_NAND0_1_CE,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_NAND0_RB] = {
		.name = "nand0_rb",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_NAND0_0_RB,
			PINCTRL_GRP_NAND0_1_RB,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_NAND0_DQS] = {
		.name = "nand0_dqs",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_NAND0_0_DQS,
			PINCTRL_GRP_NAND0_1_DQS,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC0_CLK] = {
		.name = "ttc0_clk",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC0_0_CLK,
			PINCTRL_GRP_TTC0_1_CLK,
			PINCTRL_GRP_TTC0_2_CLK,
			PINCTRL_GRP_TTC0_3_CLK,
			PINCTRL_GRP_TTC0_4_CLK,
			PINCTRL_GRP_TTC0_5_CLK,
			PINCTRL_GRP_TTC0_6_CLK,
			PINCTRL_GRP_TTC0_7_CLK,
			PINCTRL_GRP_TTC0_8_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC0_WAV] = {
		.name = "ttc0_wav",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC0_0_WAV,
			PINCTRL_GRP_TTC0_1_WAV,
			PINCTRL_GRP_TTC0_2_WAV,
			PINCTRL_GRP_TTC0_3_WAV,
			PINCTRL_GRP_TTC0_4_WAV,
			PINCTRL_GRP_TTC0_5_WAV,
			PINCTRL_GRP_TTC0_6_WAV,
			PINCTRL_GRP_TTC0_7_WAV,
			PINCTRL_GRP_TTC0_8_WAV,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC1_CLK] = {
		.name = "ttc1_clk",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC1_0_CLK,
			PINCTRL_GRP_TTC1_1_CLK,
			PINCTRL_GRP_TTC1_2_CLK,
			PINCTRL_GRP_TTC1_3_CLK,
			PINCTRL_GRP_TTC1_4_CLK,
			PINCTRL_GRP_TTC1_5_CLK,
			PINCTRL_GRP_TTC1_6_CLK,
			PINCTRL_GRP_TTC1_7_CLK,
			PINCTRL_GRP_TTC1_8_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC1_WAV] = {
		.name = "ttc1_wav",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC1_0_WAV,
			PINCTRL_GRP_TTC1_1_WAV,
			PINCTRL_GRP_TTC1_2_WAV,
			PINCTRL_GRP_TTC1_3_WAV,
			PINCTRL_GRP_TTC1_4_WAV,
			PINCTRL_GRP_TTC1_5_WAV,
			PINCTRL_GRP_TTC1_6_WAV,
			PINCTRL_GRP_TTC1_7_WAV,
			PINCTRL_GRP_TTC1_8_WAV,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC2_CLK] = {
		.name = "ttc2_clk",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC2_0_CLK,
			PINCTRL_GRP_TTC2_1_CLK,
			PINCTRL_GRP_TTC2_2_CLK,
			PINCTRL_GRP_TTC2_3_CLK,
			PINCTRL_GRP_TTC2_4_CLK,
			PINCTRL_GRP_TTC2_5_CLK,
			PINCTRL_GRP_TTC2_6_CLK,
			PINCTRL_GRP_TTC2_7_CLK,
			PINCTRL_GRP_TTC2_8_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC2_WAV] = {
		.name = "ttc2_wav",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC2_0_WAV,
			PINCTRL_GRP_TTC2_1_WAV,
			PINCTRL_GRP_TTC2_2_WAV,
			PINCTRL_GRP_TTC2_3_WAV,
			PINCTRL_GRP_TTC2_4_WAV,
			PINCTRL_GRP_TTC2_5_WAV,
			PINCTRL_GRP_TTC2_6_WAV,
			PINCTRL_GRP_TTC2_7_WAV,
			PINCTRL_GRP_TTC2_8_WAV,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC3_CLK] = {
		.name = "ttc3_clk",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC3_0_CLK,
			PINCTRL_GRP_TTC3_1_CLK,
			PINCTRL_GRP_TTC3_2_CLK,
			PINCTRL_GRP_TTC3_3_CLK,
			PINCTRL_GRP_TTC3_4_CLK,
			PINCTRL_GRP_TTC3_5_CLK,
			PINCTRL_GRP_TTC3_6_CLK,
			PINCTRL_GRP_TTC3_7_CLK,
			PINCTRL_GRP_TTC3_8_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TTC3_WAV] = {
		.name = "ttc3_wav",
		.regval = 0xa0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TTC3_0_WAV,
			PINCTRL_GRP_TTC3_1_WAV,
			PINCTRL_GRP_TTC3_2_WAV,
			PINCTRL_GRP_TTC3_3_WAV,
			PINCTRL_GRP_TTC3_4_WAV,
			PINCTRL_GRP_TTC3_5_WAV,
			PINCTRL_GRP_TTC3_6_WAV,
			PINCTRL_GRP_TTC3_7_WAV,
			PINCTRL_GRP_TTC3_8_WAV,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_UART0] = {
		.name = "uart0",
		.regval = 0xc0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_UART0_0,
			PINCTRL_GRP_UART0_1,
			PINCTRL_GRP_UART0_2,
			PINCTRL_GRP_UART0_3,
			PINCTRL_GRP_UART0_4,
			PINCTRL_GRP_UART0_5,
			PINCTRL_GRP_UART0_6,
			PINCTRL_GRP_UART0_7,
			PINCTRL_GRP_UART0_8,
			PINCTRL_GRP_UART0_9,
			PINCTRL_GRP_UART0_10,
			PINCTRL_GRP_UART0_11,
			PINCTRL_GRP_UART0_12,
			PINCTRL_GRP_UART0_13,
			PINCTRL_GRP_UART0_14,
			PINCTRL_GRP_UART0_15,
			PINCTRL_GRP_UART0_16,
			PINCTRL_GRP_UART0_17,
			PINCTRL_GRP_UART0_18,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_UART1] = {
		.name = "uart1",
		.regval = 0xc0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_UART1_0,
			PINCTRL_GRP_UART1_1,
			PINCTRL_GRP_UART1_2,
			PINCTRL_GRP_UART1_3,
			PINCTRL_GRP_UART1_4,
			PINCTRL_GRP_UART1_5,
			PINCTRL_GRP_UART1_6,
			PINCTRL_GRP_UART1_7,
			PINCTRL_GRP_UART1_8,
			PINCTRL_GRP_UART1_9,
			PINCTRL_GRP_UART1_10,
			PINCTRL_GRP_UART1_11,
			PINCTRL_GRP_UART1_12,
			PINCTRL_GRP_UART1_13,
			PINCTRL_GRP_UART1_14,
			PINCTRL_GRP_UART1_15,
			PINCTRL_GRP_UART1_16,
			PINCTRL_GRP_UART1_17,
			PINCTRL_GRP_UART1_18,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_USB0] = {
		.name = "usb0",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_USB0_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_USB1] = {
		.name = "usb1",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_USB1_0,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SWDT0_CLK] = {
		.name = "swdt0_clk",
		.regval = 0x60,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SWDT0_0_CLK,
			PINCTRL_GRP_SWDT0_1_CLK,
			PINCTRL_GRP_SWDT0_2_CLK,
			PINCTRL_GRP_SWDT0_3_CLK,
			PINCTRL_GRP_SWDT0_4_CLK,
			PINCTRL_GRP_SWDT0_5_CLK,
			PINCTRL_GRP_SWDT0_6_CLK,
			PINCTRL_GRP_SWDT0_7_CLK,
			PINCTRL_GRP_SWDT0_8_CLK,
			PINCTRL_GRP_SWDT0_9_CLK,
			PINCTRL_GRP_SWDT0_10_CLK,
			PINCTRL_GRP_SWDT0_11_CLK,
			PINCTRL_GRP_SWDT0_12_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SWDT0_RST] = {
		.name = "swdt0_rst",
		.regval = 0x60,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SWDT0_0_RST,
			PINCTRL_GRP_SWDT0_1_RST,
			PINCTRL_GRP_SWDT0_2_RST,
			PINCTRL_GRP_SWDT0_3_RST,
			PINCTRL_GRP_SWDT0_4_RST,
			PINCTRL_GRP_SWDT0_5_RST,
			PINCTRL_GRP_SWDT0_6_RST,
			PINCTRL_GRP_SWDT0_7_RST,
			PINCTRL_GRP_SWDT0_8_RST,
			PINCTRL_GRP_SWDT0_9_RST,
			PINCTRL_GRP_SWDT0_10_RST,
			PINCTRL_GRP_SWDT0_11_RST,
			PINCTRL_GRP_SWDT0_12_RST,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SWDT1_CLK] = {
		.name = "swdt1_clk",
		.regval = 0x60,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SWDT1_0_CLK,
			PINCTRL_GRP_SWDT1_1_CLK,
			PINCTRL_GRP_SWDT1_2_CLK,
			PINCTRL_GRP_SWDT1_3_CLK,
			PINCTRL_GRP_SWDT1_4_CLK,
			PINCTRL_GRP_SWDT1_5_CLK,
			PINCTRL_GRP_SWDT1_6_CLK,
			PINCTRL_GRP_SWDT1_7_CLK,
			PINCTRL_GRP_SWDT1_8_CLK,
			PINCTRL_GRP_SWDT1_9_CLK,
			PINCTRL_GRP_SWDT1_10_CLK,
			PINCTRL_GRP_SWDT1_11_CLK,
			PINCTRL_GRP_SWDT1_12_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_SWDT1_RST] = {
		.name = "swdt1_rst",
		.regval = 0x60,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_SWDT1_0_RST,
			PINCTRL_GRP_SWDT1_1_RST,
			PINCTRL_GRP_SWDT1_2_RST,
			PINCTRL_GRP_SWDT1_3_RST,
			PINCTRL_GRP_SWDT1_4_RST,
			PINCTRL_GRP_SWDT1_5_RST,
			PINCTRL_GRP_SWDT1_6_RST,
			PINCTRL_GRP_SWDT1_7_RST,
			PINCTRL_GRP_SWDT1_8_RST,
			PINCTRL_GRP_SWDT1_9_RST,
			PINCTRL_GRP_SWDT1_10_RST,
			PINCTRL_GRP_SWDT1_11_RST,
			PINCTRL_GRP_SWDT1_12_RST,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_PMU0] = {
		.name = "pmu0",
		.regval = 0x08,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_PMU0_0,
			PINCTRL_GRP_PMU0_1,
			PINCTRL_GRP_PMU0_2,
			PINCTRL_GRP_PMU0_3,
			PINCTRL_GRP_PMU0_4,
			PINCTRL_GRP_PMU0_5,
			PINCTRL_GRP_PMU0_6,
			PINCTRL_GRP_PMU0_7,
			PINCTRL_GRP_PMU0_8,
			PINCTRL_GRP_PMU0_9,
			PINCTRL_GRP_PMU0_10,
			PINCTRL_GRP_PMU0_11,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_PCIE0] = {
		.name = "pcie0",
		.regval = 0x04,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_PCIE0_0,
			PINCTRL_GRP_PCIE0_1,
			PINCTRL_GRP_PCIE0_2,
			PINCTRL_GRP_PCIE0_3,
			PINCTRL_GRP_PCIE0_4,
			PINCTRL_GRP_PCIE0_5,
			PINCTRL_GRP_PCIE0_6,
			PINCTRL_GRP_PCIE0_7,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_CSU0] = {
		.name = "csu0",
		.regval = 0x18,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_CSU0_0,
			PINCTRL_GRP_CSU0_1,
			PINCTRL_GRP_CSU0_2,
			PINCTRL_GRP_CSU0_3,
			PINCTRL_GRP_CSU0_4,
			PINCTRL_GRP_CSU0_5,
			PINCTRL_GRP_CSU0_6,
			PINCTRL_GRP_CSU0_7,
			PINCTRL_GRP_CSU0_8,
			PINCTRL_GRP_CSU0_9,
			PINCTRL_GRP_CSU0_10,
			PINCTRL_GRP_CSU0_11,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_DPAUX0] = {
		.name = "dpaux0",
		.regval = 0x18,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_DPAUX0_0,
			PINCTRL_GRP_DPAUX0_1,
			PINCTRL_GRP_DPAUX0_2,
			PINCTRL_GRP_DPAUX0_3,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_PJTAG0] = {
		.name = "pjtag0",
		.regval = 0x60,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_PJTAG0_0,
			PINCTRL_GRP_PJTAG0_1,
			PINCTRL_GRP_PJTAG0_2,
			PINCTRL_GRP_PJTAG0_3,
			PINCTRL_GRP_PJTAG0_4,
			PINCTRL_GRP_PJTAG0_5,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TRACE0] = {
		.name = "trace0",
		.regval = 0xe0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TRACE0_0,
			PINCTRL_GRP_TRACE0_1,
			PINCTRL_GRP_TRACE0_2,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TRACE0_CLK] = {
		.name = "trace0_clk",
		.regval = 0xe0,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TRACE0_0_CLK,
			PINCTRL_GRP_TRACE0_1_CLK,
			PINCTRL_GRP_TRACE0_2_CLK,
			END_OF_GROUPS,
		}),
	},
	[PINCTRL_FUNC_TESTSCAN0] = {
		.name = "testscan0",
		.regval = 0x10,
		.groups = &((uint16_t []) {
			PINCTRL_GRP_TESTSCAN0_0,
			END_OF_GROUPS,
		}),
	},
969
970
};

971
972
static struct zynqmp_pin_group zynqmp_pin_groups[MAX_PIN] = {
	[PINCTRL_PIN_0] = {
973
		.groups = &((uint16_t []) {
974
975
976
977
978
979
980
981
982
983
984
985
986
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_0,
			PINCTRL_GRP_CAN1_0,
			PINCTRL_GRP_I2C1_0,
			PINCTRL_GRP_PJTAG0_0,
			PINCTRL_GRP_SPI0_0,
			PINCTRL_GRP_TTC3_0_CLK,
			PINCTRL_GRP_UART1_0,
			PINCTRL_GRP_TRACE0_0_CLK,
987
988
			END_OF_GROUPS,
		}),
989
990
	},
	[PINCTRL_PIN_1] = {
991
		.groups = &((uint16_t []) {
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_1,
			PINCTRL_GRP_CAN1_0,
			PINCTRL_GRP_I2C1_0,
			PINCTRL_GRP_PJTAG0_0,
			PINCTRL_GRP_SPI0_0_SS2,
			PINCTRL_GRP_TTC3_0_WAV,
			PINCTRL_GRP_UART1_0,
			PINCTRL_GRP_TRACE0_0_CLK,
1005
1006
			END_OF_GROUPS,
		}),
1007
1008
	},
	[PINCTRL_PIN_2] = {
1009
		.groups = &((uint16_t []) {
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_2,
			PINCTRL_GRP_CAN0_0,
			PINCTRL_GRP_I2C0_0,
			PINCTRL_GRP_PJTAG0_0,
			PINCTRL_GRP_SPI0_0_SS1,
			PINCTRL_GRP_TTC2_0_CLK,
			PINCTRL_GRP_UART0_0,
			PINCTRL_GRP_TRACE0_0,
1023
1024
			END_OF_GROUPS,
		}),
1025
1026
	},
	[PINCTRL_PIN_3] = {
1027
		.groups = &((uint16_t []) {
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_3,
			PINCTRL_GRP_CAN0_0,
			PINCTRL_GRP_I2C0_0,
			PINCTRL_GRP_PJTAG0_0,
			PINCTRL_GRP_SPI0_0_SS0,
			PINCTRL_GRP_TTC2_0_WAV,
			PINCTRL_GRP_UART0_0,
			PINCTRL_GRP_TRACE0_0,
1041
1042
			END_OF_GROUPS,
		}),
1043
1044
	},
	[PINCTRL_PIN_4] = {
1045
		.groups = &((uint16_t []) {
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_4,
			PINCTRL_GRP_CAN1_1,
			PINCTRL_GRP_I2C1_1,
			PINCTRL_GRP_SWDT1_0_CLK,
			PINCTRL_GRP_SPI0_0,
			PINCTRL_GRP_TTC1_0_CLK,
			PINCTRL_GRP_UART1_1,
			PINCTRL_GRP_TRACE0_0,
1059
1060
			END_OF_GROUPS,
		}),
1061
1062
	},
	[PINCTRL_PIN_5] = {
1063
		.groups = &((uint16_t []) {
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
			PINCTRL_GRP_QSPI_SS,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_5,
			PINCTRL_GRP_CAN1_1,
			PINCTRL_GRP_I2C1_1,
			PINCTRL_GRP_SWDT1_0_RST,
			PINCTRL_GRP_SPI0_0,
			PINCTRL_GRP_TTC1_0_WAV,
			PINCTRL_GRP_UART1_1,
			PINCTRL_GRP_TRACE0_0,
1077
1078
			END_OF_GROUPS,
		}),
1079
1080
	},
	[PINCTRL_PIN_6] = {
1081
		.groups = &((uint16_t []) {
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
			PINCTRL_GRP_QSPI_FBCLK,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_6,
			PINCTRL_GRP_CAN0_1,
			PINCTRL_GRP_I2C0_1,
			PINCTRL_GRP_SWDT0_0_CLK,
			PINCTRL_GRP_SPI1_0,
			PINCTRL_GRP_TTC0_0_CLK,
			PINCTRL_GRP_UART0_1,
			PINCTRL_GRP_TRACE0_0,
1095
1096
			END_OF_GROUPS,
		}),
1097
1098
	},
	[PINCTRL_PIN_7] = {
1099
		.groups = &((uint16_t []) {
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
			PINCTRL_GRP_QSPI_SS,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_7,
			PINCTRL_GRP_CAN0_1,
			PINCTRL_GRP_I2C0_1,
			PINCTRL_GRP_SWDT0_0_RST,
			PINCTRL_GRP_SPI1_0_SS2,
			PINCTRL_GRP_TTC0_0_WAV,
			PINCTRL_GRP_UART0_1,
			PINCTRL_GRP_TRACE0_0,
1113
1114
			END_OF_GROUPS,
		}),
1115
1116
	},
	[PINCTRL_PIN_8] = {
1117
		.groups = &((uint16_t []) {
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_8,
			PINCTRL_GRP_CAN1_2,
			PINCTRL_GRP_I2C1_2,
			PINCTRL_GRP_SWDT1_1_CLK,
			PINCTRL_GRP_SPI1_0_SS1,
			PINCTRL_GRP_TTC3_1_CLK,
			PINCTRL_GRP_UART1_2,
			PINCTRL_GRP_TRACE0_0,
1131
1132
			END_OF_GROUPS,
		}),
1133
1134
	},
	[PINCTRL_PIN_9] = {
1135
		.groups = &((uint16_t []) {
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_NAND0_0_CE,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_9,
			PINCTRL_GRP_CAN1_2,
			PINCTRL_GRP_I2C1_2,
			PINCTRL_GRP_SWDT1_1_RST,
			PINCTRL_GRP_SPI1_0_SS0,
			PINCTRL_GRP_TTC3_1_WAV,
			PINCTRL_GRP_UART1_2,
			PINCTRL_GRP_TRACE0_0,
1149
1150
			END_OF_GROUPS,
		}),
1151
1152
	},
	[PINCTRL_PIN_10] = {
1153
		.groups = &((uint16_t []) {
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_NAND0_0_RB,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_10,
			PINCTRL_GRP_CAN0_2,
			PINCTRL_GRP_I2C0_2,
			PINCTRL_GRP_SWDT0_1_CLK,
			PINCTRL_GRP_SPI1_0,
			PINCTRL_GRP_TTC2_1_CLK,
			PINCTRL_GRP_UART0_2,
			PINCTRL_GRP_TRACE0_0,
1167
1168
			END_OF_GROUPS,
		}),
1169
1170
	},
	[PINCTRL_PIN_11] = {
1171
		.groups = &((uint16_t []) {
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_NAND0_0_RB,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_11,
			PINCTRL_GRP_CAN0_2,
			PINCTRL_GRP_I2C0_2,
			PINCTRL_GRP_SWDT0_1_RST,
			PINCTRL_GRP_SPI1_0,
			PINCTRL_GRP_TTC2_1_WAV,
			PINCTRL_GRP_UART0_2,
			PINCTRL_GRP_TRACE0_0,
1185
1186
			END_OF_GROUPS,
		}),
1187
1188
	},
	[PINCTRL_PIN_12] = {
1189
		.groups = &((uint16_t []) {
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
			PINCTRL_GRP_QSPI0_0,
			PINCTRL_GRP_NAND0_0_DQS,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_12,
			PINCTRL_GRP_CAN1_3,
			PINCTRL_GRP_I2C1_3,
			PINCTRL_GRP_PJTAG0_1,
			PINCTRL_GRP_SPI0_1,
			PINCTRL_GRP_TTC1_1_CLK,
			PINCTRL_GRP_UART1_3,
			PINCTRL_GRP_TRACE0_0,
1203
1204
			END_OF_GROUPS,
		}),
1205
1206
	},
	[PINCTRL_PIN_13] = {
1207
		.groups = &((uint16_t []) {
1208
1209
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1210
			PINCTRL_GRP_SDIO0_0,
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_13,
			PINCTRL_GRP_CAN1_3,
			PINCTRL_GRP_I2C1_3,
			PINCTRL_GRP_PJTAG0_1,
			PINCTRL_GRP_SPI0_1_SS2,
			PINCTRL_GRP_TTC1_1_WAV,
			PINCTRL_GRP_UART1_3,
			PINCTRL_GRP_TRACE0_0,
1221
1222
1223
1224
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_0,
			END_OF_GROUPS,
		}),
1225
1226
	},
	[PINCTRL_PIN_14] = {
1227
		.groups = &((uint16_t []) {
1228
1229
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1230
			PINCTRL_GRP_SDIO0_0,
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_14,
			PINCTRL_GRP_CAN0_3,
			PINCTRL_GRP_I2C0_3,
			PINCTRL_GRP_PJTAG0_1,
			PINCTRL_GRP_SPI0_1_SS1,
			PINCTRL_GRP_TTC0_1_CLK,
			PINCTRL_GRP_UART0_3,
			PINCTRL_GRP_TRACE0_0,
1241
1242
1243
1244
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_1,
			END_OF_GROUPS,
		}),
1245
1246
	},
	[PINCTRL_PIN_15] = {
1247
		.groups = &((uint16_t []) {
1248
1249
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1250
			PINCTRL_GRP_SDIO0_0,
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_15,
			PINCTRL_GRP_CAN0_3,
			PINCTRL_GRP_I2C0_3,
			PINCTRL_GRP_PJTAG0_1,
			PINCTRL_GRP_SPI0_1_SS0,
			PINCTRL_GRP_TTC0_1_WAV,
			PINCTRL_GRP_UART0_3,
			PINCTRL_GRP_TRACE0_0,
1261
1262
1263
1264
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_2,
			END_OF_GROUPS,
		}),
1265
1266
	},
	[PINCTRL_PIN_16] = {
1267
		.groups = &((uint16_t []) {
1268
1269
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1270
			PINCTRL_GRP_SDIO0_0,
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_16,
			PINCTRL_GRP_CAN1_4,
			PINCTRL_GRP_I2C1_4,
			PINCTRL_GRP_SWDT1_2_CLK,
			PINCTRL_GRP_SPI0_1,
			PINCTRL_GRP_TTC3_2_CLK,
			PINCTRL_GRP_UART1_4,
			PINCTRL_GRP_TRACE0_0,
1281
1282
1283
1284
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_3,
			END_OF_GROUPS,
		}),
1285
1286
	},
	[PINCTRL_PIN_17] = {
1287
		.groups = &((uint16_t []) {
1288
1289
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1290
			PINCTRL_GRP_SDIO0_0,
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_17,
			PINCTRL_GRP_CAN1_4,
			PINCTRL_GRP_I2C1_4,
			PINCTRL_GRP_SWDT1_2_RST,
			PINCTRL_GRP_SPI0_1,
			PINCTRL_GRP_TTC3_2_WAV,
			PINCTRL_GRP_UART1_4,
			PINCTRL_GRP_TRACE0_0,
1301
1302
1303
1304
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_4,
			END_OF_GROUPS,
		}),
1305
1306
	},
	[PINCTRL_PIN_18] = {
1307
		.groups = &((uint16_t []) {
1308
1309
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1310
			PINCTRL_GRP_SDIO0_0,
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_0,
			PINCTRL_GRP_GPIO0_18,
			PINCTRL_GRP_CAN0_4,
			PINCTRL_GRP_I2C0_4,
			PINCTRL_GRP_SWDT0_2_CLK,
			PINCTRL_GRP_SPI1_1,
			PINCTRL_GRP_TTC2_2_CLK,
			PINCTRL_GRP_UART0_4,
			PINCTRL_GRP_RESERVED,
1321
1322
1323
1324
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_5,
			END_OF_GROUPS,
		}),
1325
1326
	},
	[PINCTRL_PIN_19] = {
1327
		.groups = &((uint16_t []) {
1328
1329
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1330
			PINCTRL_GRP_SDIO0_0,
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_1,
			PINCTRL_GRP_GPIO0_19,
			PINCTRL_GRP_CAN0_4,
			PINCTRL_GRP_I2C0_4,
			PINCTRL_GRP_SWDT0_2_RST,
			PINCTRL_GRP_SPI1_1_SS2,
			PINCTRL_GRP_TTC2_2_WAV,
			PINCTRL_GRP_UART0_4,
			PINCTRL_GRP_RESERVED,
1341
1342
1343
1344
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_6,
			END_OF_GROUPS,
		}),
1345
1346
	},
	[PINCTRL_PIN_20] = {
1347
		.groups = &((uint16_t []) {
1348
1349
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1350
			PINCTRL_GRP_SDIO0_0,
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_2,
			PINCTRL_GRP_GPIO0_20,
			PINCTRL_GRP_CAN1_5,
			PINCTRL_GRP_I2C1_5,
			PINCTRL_GRP_SWDT1_3_CLK,
			PINCTRL_GRP_SPI1_1_SS1,
			PINCTRL_GRP_TTC1_2_CLK,
			PINCTRL_GRP_UART1_5,
			PINCTRL_GRP_RESERVED,
1361
1362
1363
1364
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_7,
			END_OF_GROUPS,
		}),
1365
1366
	},
	[PINCTRL_PIN_21] = {
1367
		.groups = &((uint16_t []) {
1368
1369
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1370
			PINCTRL_GRP_SDIO0_0,
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_3,
			PINCTRL_GRP_GPIO0_21,
			PINCTRL_GRP_CAN1_5,
			PINCTRL_GRP_I2C1_5,
			PINCTRL_GRP_SWDT1_3_RST,
			PINCTRL_GRP_SPI1_1_SS0,
			PINCTRL_GRP_TTC1_2_WAV,
			PINCTRL_GRP_UART1_5,
			PINCTRL_GRP_RESERVED,
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_2,
			PINCTRL_GRP_SDIO0_1BIT_0_3,
			PINCTRL_GRP_SDIO0_1BIT_0_4,
			PINCTRL_GRP_SDIO0_1BIT_0_5,
			PINCTRL_GRP_SDIO0_1BIT_0_6,
			PINCTRL_GRP_SDIO0_1BIT_0_7,
			END_OF_GROUPS,
		}),
1393
1394
	},
	[PINCTRL_PIN_22] = {
1395
		.groups = &((uint16_t []) {
1396
1397
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1398
			PINCTRL_GRP_SDIO0_0,
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_4,
			PINCTRL_GRP_GPIO0_22,
			PINCTRL_GRP_CAN0_5,
			PINCTRL_GRP_I2C0_5,
			PINCTRL_GRP_SWDT0_3_CLK,
			PINCTRL_GRP_SPI1_1,
			PINCTRL_GRP_TTC0_2_CLK,
			PINCTRL_GRP_UART0_5,
			PINCTRL_GRP_RESERVED,
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_2,
			PINCTRL_GRP_SDIO0_1BIT_0_3,
			PINCTRL_GRP_SDIO0_1BIT_0_4,
			PINCTRL_GRP_SDIO0_1BIT_0_5,
			PINCTRL_GRP_SDIO0_1BIT_0_6,
			PINCTRL_GRP_SDIO0_1BIT_0_7,
			END_OF_GROUPS,
		}),
1421
1422
	},
	[PINCTRL_PIN_23] = {
1423
		.groups = &((uint16_t []) {
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
			PINCTRL_GRP_SDIO0_0_PC,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_5,
			PINCTRL_GRP_GPIO0_23,
			PINCTRL_GRP_CAN0_5,
			PINCTRL_GRP_I2C0_5,
			PINCTRL_GRP_SWDT0_3_RST,
			PINCTRL_GRP_SPI1_1,
			PINCTRL_GRP_TTC0_2_WAV,
			PINCTRL_GRP_UART0_5,
			PINCTRL_GRP_RESERVED,
1437
1438
			END_OF_GROUPS,
		}),
1439
1440
	},
	[PINCTRL_PIN_24] = {
1441
		.groups = &((uint16_t []) {
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
			PINCTRL_GRP_SDIO0_0_CD,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_6,
			PINCTRL_GRP_GPIO0_24,
			PINCTRL_GRP_CAN1_6,
			PINCTRL_GRP_I2C1_6,
			PINCTRL_GRP_SWDT1_4_CLK,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TTC3_3_CLK,
			PINCTRL_GRP_UART1_6,
			PINCTRL_GRP_RESERVED,
1455
1456
			END_OF_GROUPS,
		}),
1457
1458
	},
	[PINCTRL_PIN_25] = {
1459
		.groups = &((uint16_t []) {
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
			PINCTRL_GRP_SDIO0_0_WP,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_7,
			PINCTRL_GRP_GPIO0_25,
			PINCTRL_GRP_CAN1_6,
			PINCTRL_GRP_I2C1_6,
			PINCTRL_GRP_SWDT1_4_RST,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_TTC3_3_WAV,
			PINCTRL_GRP_UART1_6,
			PINCTRL_GRP_RESERVED,
1473
1474
			END_OF_GROUPS,
		}),
1475
1476
	},
	[PINCTRL_PIN_26] = {
1477
		.groups = &((uint16_t []) {
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
			PINCTRL_GRP_GEMTSU0_0,
			PINCTRL_GRP_NAND0_1_CE,
			PINCTRL_GRP_PMU0_0,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_8,
			PINCTRL_GRP_GPIO0_26,
			PINCTRL_GRP_CAN0_6,
			PINCTRL_GRP_I2C0_6,
			PINCTRL_GRP_PJTAG0_2,
			PINCTRL_GRP_SPI0_2,
			PINCTRL_GRP_TTC2_3_CLK,
			PINCTRL_GRP_UART0_6,
			PINCTRL_GRP_TRACE0_1,
1491
1492
			END_OF_GROUPS,
		}),
1493
1494
	},
	[PINCTRL_PIN_27] = {
1495
		.groups = &((uint16_t []) {
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_NAND0_1_RB,
			PINCTRL_GRP_PMU0_1,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_0,
			PINCTRL_GRP_GPIO0_27,
			PINCTRL_GRP_CAN0_6,
			PINCTRL_GRP_I2C0_6,
			PINCTRL_GRP_PJTAG0_2,
			PINCTRL_GRP_SPI0_2_SS2,
			PINCTRL_GRP_TTC2_3_WAV,
			PINCTRL_GRP_UART0_6,
			PINCTRL_GRP_TRACE0_1,
1509
1510
			END_OF_GROUPS,
		}),
1511
1512
	},
	[PINCTRL_PIN_28] = {
1513
		.groups = &((uint16_t []) {
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_NAND0_1_RB,
			PINCTRL_GRP_PMU0_2,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_0,
			PINCTRL_GRP_GPIO0_28,
			PINCTRL_GRP_CAN1_7,
			PINCTRL_GRP_I2C1_7,
			PINCTRL_GRP_PJTAG0_2,
			PINCTRL_GRP_SPI0_2_SS1,
			PINCTRL_GRP_TTC1_3_CLK,
			PINCTRL_GRP_UART1_7,
			PINCTRL_GRP_TRACE0_1,
1527
1528
			END_OF_GROUPS,
		}),
1529
1530
	},
	[PINCTRL_PIN_29] = {
1531
		.groups = &((uint16_t []) {
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_0,
			PINCTRL_GRP_PMU0_3,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_1,
			PINCTRL_GRP_GPIO0_29,
			PINCTRL_GRP_CAN1_7,
			PINCTRL_GRP_I2C1_7,
			PINCTRL_GRP_PJTAG0_2,
			PINCTRL_GRP_SPI0_2_SS0,
			PINCTRL_GRP_TTC1_3_WAV,
			PINCTRL_GRP_UART1_7,
			PINCTRL_GRP_TRACE0_1,
1545
1546
			END_OF_GROUPS,
		}),
1547
1548
	},
	[PINCTRL_PIN_30] = {
1549
		.groups = &((uint16_t []) {
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_1,
			PINCTRL_GRP_PMU0_4,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_1,
			PINCTRL_GRP_GPIO0_30,
			PINCTRL_GRP_CAN0_7,
			PINCTRL_GRP_I2C0_7,
			PINCTRL_GRP_SWDT0_4_CLK,
			PINCTRL_GRP_SPI0_2,
			PINCTRL_GRP_TTC0_3_CLK,
			PINCTRL_GRP_UART0_7,
			PINCTRL_GRP_TRACE0_1,
1563
1564
			END_OF_GROUPS,
		}),
1565
1566
	},
	[PINCTRL_PIN_31] = {
1567
		.groups = &((uint16_t []) {
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_2,
			PINCTRL_GRP_PMU0_5,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_9,
			PINCTRL_GRP_GPIO0_31,
			PINCTRL_GRP_CAN0_7,
			PINCTRL_GRP_I2C0_7,
			PINCTRL_GRP_SWDT0_4_RST,
			PINCTRL_GRP_SPI0_2,
			PINCTRL_GRP_TTC0_3_WAV,
			PINCTRL_GRP_UART0_7,
			PINCTRL_GRP_TRACE0_1,
1581
1582
			END_OF_GROUPS,
		}),
1583
1584
	},
	[PINCTRL_PIN_32] = {
1585
		.groups = &((uint16_t []) {
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_NAND0_1_DQS,
			PINCTRL_GRP_PMU0_6,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_10,
			PINCTRL_GRP_GPIO0_32,
			PINCTRL_GRP_CAN1_8,
			PINCTRL_GRP_I2C1_8,
			PINCTRL_GRP_SWDT1_5_CLK,
			PINCTRL_GRP_SPI1_2,
			PINCTRL_GRP_TTC3_4_CLK,
			PINCTRL_GRP_UART1_8,
			PINCTRL_GRP_TRACE0_1,
1599
1600
			END_OF_GROUPS,
		}),
1601
1602
	},
	[PINCTRL_PIN_33] = {
1603
		.groups = &((uint16_t []) {
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_3,
			PINCTRL_GRP_PMU0_7,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_CSU0_11,
			PINCTRL_GRP_GPIO0_33,
			PINCTRL_GRP_CAN1_8,
			PINCTRL_GRP_I2C1_8,
			PINCTRL_GRP_SWDT1_5_RST,
			PINCTRL_GRP_SPI1_2_SS2,
			PINCTRL_GRP_TTC3_4_WAV,
			PINCTRL_GRP_UART1_8,
			PINCTRL_GRP_TRACE0_1,
1617
1618
			END_OF_GROUPS,
		}),
1619
1620
	},
	[PINCTRL_PIN_34] = {
1621
		.groups = &((uint16_t []) {
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_4,
			PINCTRL_GRP_PMU0_8,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_2,
			PINCTRL_GRP_GPIO0_34,
			PINCTRL_GRP_CAN0_8,
			PINCTRL_GRP_I2C0_8,
			PINCTRL_GRP_SWDT0_5_CLK,
			PINCTRL_GRP_SPI1_2_SS1,
			PINCTRL_GRP_TTC2_4_CLK,
			PINCTRL_GRP_UART0_8,
			PINCTRL_GRP_TRACE0_1,
1635
1636
			END_OF_GROUPS,
		}),
1637
1638
	},
	[PINCTRL_PIN_35] = {
1639
		.groups = &((uint16_t []) {
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_5,
			PINCTRL_GRP_PMU0_9,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_2,
			PINCTRL_GRP_GPIO0_35,
			PINCTRL_GRP_CAN0_8,
			PINCTRL_GRP_I2C0_8,
			PINCTRL_GRP_SWDT0_5_RST,
			PINCTRL_GRP_SPI1_2_SS0,
			PINCTRL_GRP_TTC2_4_WAV,
			PINCTRL_GRP_UART0_8,
			PINCTRL_GRP_TRACE0_1,
1653
1654
			END_OF_GROUPS,
		}),
1655
1656
	},
	[PINCTRL_PIN_36] = {
1657
		.groups = &((uint16_t []) {
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_6,
			PINCTRL_GRP_PMU0_10,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_3,
			PINCTRL_GRP_GPIO0_36,
			PINCTRL_GRP_CAN1_9,
			PINCTRL_GRP_I2C1_9,
			PINCTRL_GRP_SWDT1_6_CLK,
			PINCTRL_GRP_SPI1_2,
			PINCTRL_GRP_TTC1_4_CLK,
			PINCTRL_GRP_UART1_9,
			PINCTRL_GRP_TRACE0_1,
1671
1672
			END_OF_GROUPS,
		}),
1673
1674
	},
	[PINCTRL_PIN_37] = {
1675
		.groups = &((uint16_t []) {
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
			PINCTRL_GRP_ETHERNET0_0,
			PINCTRL_GRP_PCIE0_7,
			PINCTRL_GRP_PMU0_11,
			PINCTRL_GRP_TESTSCAN0_0,
			PINCTRL_GRP_DPAUX0_3,
			PINCTRL_GRP_GPIO0_37,
			PINCTRL_GRP_CAN1_9,
			PINCTRL_GRP_I2C1_9,
			PINCTRL_GRP_SWDT1_6_RST,
			PINCTRL_GRP_SPI1_2,
			PINCTRL_GRP_TTC1_4_WAV,
			PINCTRL_GRP_UART1_9,
			PINCTRL_GRP_TRACE0_1,
1689
1690
			END_OF_GROUPS,
		}),
1691
1692
	},
	[PINCTRL_PIN_38] = {
1693
		.groups = &((uint16_t []) {
1694
1695
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1696
			PINCTRL_GRP_SDIO0_1,
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_38,
			PINCTRL_GRP_CAN0_9,
			PINCTRL_GRP_I2C0_9,
			PINCTRL_GRP_PJTAG0_3,
			PINCTRL_GRP_SPI0_3,
			PINCTRL_GRP_TTC0_4_CLK,
			PINCTRL_GRP_UART0_9,
			PINCTRL_GRP_TRACE0_1_CLK,
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_2,
			PINCTRL_GRP_SDIO0_1BIT_1_3,
			PINCTRL_GRP_SDIO0_1BIT_1_4,
			PINCTRL_GRP_SDIO0_1BIT_1_5,
			PINCTRL_GRP_SDIO0_1BIT_1_6,
			PINCTRL_GRP_SDIO0_1BIT_1_7,
			END_OF_GROUPS,
		}),
1719
1720
	},
	[PINCTRL_PIN_39] = {
1721
		.groups = &((uint16_t []) {
1722
1723
1724
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_CD,
1725
			PINCTRL_GRP_SDIO1_0,
1726
1727
1728
1729
1730
1731
1732
1733
1734
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_39,
			PINCTRL_GRP_CAN0_9,
			PINCTRL_GRP_I2C0_9,
			PINCTRL_GRP_PJTAG0_3,
			PINCTRL_GRP_SPI0_3_SS2,
			PINCTRL_GRP_TTC0_4_WAV,
			PINCTRL_GRP_UART0_9,
			PINCTRL_GRP_TRACE0_1_CLK,
1735
1736
1737
1738
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_0,
			END_OF_GROUPS,
		}),
1739
1740
	},
	[PINCTRL_PIN_40] = {
1741
		.groups = &((uint16_t []) {
1742
1743
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1744
1745
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1746
1747
1748
1749
1750
1751
1752
1753
1754
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_40,
			PINCTRL_GRP_CAN1_10,
			PINCTRL_GRP_I2C1_10,
			PINCTRL_GRP_PJTAG0_3,
			PINCTRL_GRP_SPI0_3_SS1,
			PINCTRL_GRP_TTC3_5_CLK,
			PINCTRL_GRP_UART1_10,
			PINCTRL_GRP_TRACE0_1,
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_2,
			PINCTRL_GRP_SDIO0_1BIT_1_3,
			PINCTRL_GRP_SDIO0_1BIT_1_4,
			PINCTRL_GRP_SDIO0_1BIT_1_5,
			PINCTRL_GRP_SDIO0_1BIT_1_6,
			PINCTRL_GRP_SDIO0_1BIT_1_7,
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_1,
			END_OF_GROUPS,
		}),
1769
1770
	},
	[PINCTRL_PIN_41] = {
1771
		.groups = &((uint16_t []) {
1772
1773
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1774
1775
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1776
1777
1778
1779
1780
1781
1782
1783
1784
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_41,
			PINCTRL_GRP_CAN1_10,
			PINCTRL_GRP_I2C1_10,
			PINCTRL_GRP_PJTAG0_3,
			PINCTRL_GRP_SPI0_3_SS0,
			PINCTRL_GRP_TTC3_5_WAV,
			PINCTRL_GRP_UART1_10,
			PINCTRL_GRP_TRACE0_1,
1785
1786
1787
1788
1789
1790
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_0,
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_2,
			END_OF_GROUPS,
		}),
1791
1792
	},
	[PINCTRL_PIN_42] = {
1793
		.groups = &((uint16_t []) {
1794
1795
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1796
1797
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1798
1799
1800
1801
1802
1803
1804
1805
1806
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_42,
			PINCTRL_GRP_CAN0_10,
			PINCTRL_GRP_I2C0_10,
			PINCTRL_GRP_SWDT0_6_CLK,
			PINCTRL_GRP_SPI0_3,
			PINCTRL_GRP_TTC2_5_CLK,
			PINCTRL_GRP_UART0_10,
			PINCTRL_GRP_TRACE0_1,
1807
1808
1809
1810
1811
1812
1813
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_1,
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_3,
			END_OF_GROUPS,
		}),
1814
1815
	},
	[PINCTRL_PIN_43] = {
1816
		.groups = &((uint16_t []) {
1817
1818
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1819
			PINCTRL_GRP_SDIO0_1,
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
			PINCTRL_GRP_SDIO1_0_PC,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_43,
			PINCTRL_GRP_CAN0_10,
			PINCTRL_GRP_I2C0_10,
			PINCTRL_GRP_SWDT0_6_RST,
			PINCTRL_GRP_SPI0_3,
			PINCTRL_GRP_TTC2_5_WAV,
			PINCTRL_GRP_UART0_10,
			PINCTRL_GRP_TRACE0_1,
1830
1831
1832
1833
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_2,
			END_OF_GROUPS,
		}),
1834
1835
	},
	[PINCTRL_PIN_44] = {
1836
		.groups = &((uint16_t []) {
1837
1838
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1839
			PINCTRL_GRP_SDIO0_1,
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
			PINCTRL_GRP_SDIO1_0_WP,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_44,
			PINCTRL_GRP_CAN1_11,
			PINCTRL_GRP_I2C1_11,
			PINCTRL_GRP_SWDT1_7_CLK,
			PINCTRL_GRP_SPI1_3,
			PINCTRL_GRP_TTC1_5_CLK,
			PINCTRL_GRP_UART1_11,
			PINCTRL_GRP_RESERVED,
1850
1851
1852
1853
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_3,
			END_OF_GROUPS,
		}),
1854
1855
	},
	[PINCTRL_PIN_45] = {
1856
		.groups = &((uint16_t []) {
1857
1858
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1859
			PINCTRL_GRP_SDIO0_1,
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
			PINCTRL_GRP_SDIO1_0_CD,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_45,
			PINCTRL_GRP_CAN1_11,
			PINCTRL_GRP_I2C1_11,
			PINCTRL_GRP_SWDT1_7_RST,
			PINCTRL_GRP_SPI1_3_SS2,
			PINCTRL_GRP_TTC1_5_WAV,
			PINCTRL_GRP_UART1_11,
			PINCTRL_GRP_RESERVED,
1870
1871
1872
1873
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_4,
			END_OF_GROUPS,
		}),
1874
1875
	},
	[PINCTRL_PIN_46] = {
1876
		.groups = &((uint16_t []) {
1877
1878
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1879
1880
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1881
1882
1883
1884
1885
1886
1887
1888
1889
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_46,
			PINCTRL_GRP_CAN0_11,
			PINCTRL_GRP_I2C0_11,
			PINCTRL_GRP_SWDT0_7_CLK,
			PINCTRL_GRP_SPI1_3_SS1,
			PINCTRL_GRP_TTC0_5_CLK,
			PINCTRL_GRP_UART0_11,
			PINCTRL_GRP_RESERVED,
1890
1891
1892
1893
1894
1895
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_5,
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_4,
			END_OF_GROUPS,
		}),
1896
1897
	},
	[PINCTRL_PIN_47] = {
1898
		.groups = &((uint16_t []) {
1899
1900
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1901
1902
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1903
1904
1905
1906
1907
1908
1909
1910
1911
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_47,
			PINCTRL_GRP_CAN0_11,
			PINCTRL_GRP_I2C0_11,
			PINCTRL_GRP_SWDT0_7_RST,
			PINCTRL_GRP_SPI1_3_SS0,
			PINCTRL_GRP_TTC0_5_WAV,
			PINCTRL_GRP_UART0_11,
			PINCTRL_GRP_RESERVED,
1912
1913
1914
1915
1916
1917
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_6,
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_5,
			END_OF_GROUPS,
		}),
1918
1919
	},
	[PINCTRL_PIN_48] = {
1920
		.groups = &((uint16_t []) {
1921
1922
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1923
1924
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1925
1926
1927
1928
1929
1930
1931
1932
1933
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_48,
			PINCTRL_GRP_CAN1_12,
			PINCTRL_GRP_I2C1_12,
			PINCTRL_GRP_SWDT1_8_CLK,
			PINCTRL_GRP_SPI1_3,
			PINCTRL_GRP_TTC3_6_CLK,
			PINCTRL_GRP_UART1_12,
			PINCTRL_GRP_RESERVED,
1934
1935
1936
1937
1938
1939
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_7,
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_6,
			END_OF_GROUPS,
		}),
1940
1941
	},
	[PINCTRL_PIN_49] = {
1942
		.groups = &((uint16_t []) {
1943
1944
1945
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_PC,
1946
			PINCTRL_GRP_SDIO1_0,
1947
1948
1949
1950
1951
1952
1953
1954
1955
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_49,
			PINCTRL_GRP_CAN1_12,
			PINCTRL_GRP_I2C1_12,
			PINCTRL_GRP_SWDT1_8_RST,
			PINCTRL_GRP_SPI1_3,
			PINCTRL_GRP_TTC3_6_WAV,
			PINCTRL_GRP_UART1_12,
			PINCTRL_GRP_RESERVED,
1956
1957
1958
1959
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_7,
			END_OF_GROUPS,
		}),
1960
1961
	},
	[PINCTRL_PIN_50] = {
1962
		.groups = &((uint16_t []) {
1963
1964
1965
			PINCTRL_GRP_GEMTSU0_1,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_WP,
1966
			PINCTRL_GRP_SDIO1_0,
1967
1968
1969
1970
1971
1972
1973
1974
1975
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_50,
			PINCTRL_GRP_CAN0_12,
			PINCTRL_GRP_I2C0_12,
			PINCTRL_GRP_SWDT0_8_CLK,
			PINCTRL_GRP_MDIO1_0,
			PINCTRL_GRP_TTC2_6_CLK,
			PINCTRL_GRP_UART0_12,
			PINCTRL_GRP_RESERVED,
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_2,
			PINCTRL_GRP_SDIO1_1BIT_0_3,
			PINCTRL_GRP_SDIO1_1BIT_0_4,
			PINCTRL_GRP_SDIO1_1BIT_0_5,
			PINCTRL_GRP_SDIO1_1BIT_0_6,
			PINCTRL_GRP_SDIO1_1BIT_0_7,
			END_OF_GROUPS,
		}),
1988
1989
	},
	[PINCTRL_PIN_51] = {
1990
		.groups = &((uint16_t []) {
1991
1992
1993
			PINCTRL_GRP_GEMTSU0_2,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
1994
			PINCTRL_GRP_SDIO1_0,
1995
1996
1997
1998
1999
2000
2001
2002
2003
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_51,
			PINCTRL_GRP_CAN0_12,
			PINCTRL_GRP_I2C0_12,
			PINCTRL_GRP_SWDT0_8_RST,
			PINCTRL_GRP_MDIO1_0,
			PINCTRL_GRP_TTC2_6_WAV,
			PINCTRL_GRP_UART0_12,
			PINCTRL_GRP_RESERVED,
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_2,
			PINCTRL_GRP_SDIO1_1BIT_0_3,
			PINCTRL_GRP_SDIO1_1BIT_0_4,
			PINCTRL_GRP_SDIO1_1BIT_0_5,
			PINCTRL_GRP_SDIO1_1BIT_0_6,
			PINCTRL_GRP_SDIO1_1BIT_0_7,
			END_OF_GROUPS,
		}),
2016
2017
	},
	[PINCTRL_PIN_52] = {
2018
		.groups = &((uint16_t []) {
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_52,
			PINCTRL_GRP_CAN1_13,
			PINCTRL_GRP_I2C1_13,
			PINCTRL_GRP_PJTAG0_4,
			PINCTRL_GRP_SPI0_4,
			PINCTRL_GRP_TTC1_6_CLK,
			PINCTRL_GRP_UART1_13,
			PINCTRL_GRP_TRACE0_2_CLK,
2032
2033
			END_OF_GROUPS,
		}),
2034
2035
	},
	[PINCTRL_PIN_53] = {
2036
		.groups = &((uint16_t []) {
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_53,
			PINCTRL_GRP_CAN1_13,
			PINCTRL_GRP_I2C1_13,
			PINCTRL_GRP_PJTAG0_4,
			PINCTRL_GRP_SPI0_4_SS2,
			PINCTRL_GRP_TTC1_6_WAV,
			PINCTRL_GRP_UART1_13,
			PINCTRL_GRP_TRACE0_2_CLK,
2050
2051
			END_OF_GROUPS,
		}),
2052
2053
	},
	[PINCTRL_PIN_54] = {
2054
		.groups = &((uint16_t []) {
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_54,
			PINCTRL_GRP_CAN0_13,
			PINCTRL_GRP_I2C0_13,
			PINCTRL_GRP_PJTAG0_4,
			PINCTRL_GRP_SPI0_4_SS1,
			PINCTRL_GRP_TTC0_6_CLK,
			PINCTRL_GRP_UART0_13,
			PINCTRL_GRP_TRACE0_2,
2068
2069
			END_OF_GROUPS,
		}),
2070
2071
	},
	[PINCTRL_PIN_55] = {
2072
		.groups = &((uint16_t []) {
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_55,
			PINCTRL_GRP_CAN0_13,
			PINCTRL_GRP_I2C0_13,
			PINCTRL_GRP_PJTAG0_4,
			PINCTRL_GRP_SPI0_4_SS0,
			PINCTRL_GRP_TTC0_6_WAV,
			PINCTRL_GRP_UART0_13,
			PINCTRL_GRP_TRACE0_2,
2086
2087
			END_OF_GROUPS,
		}),
2088
2089
	},
	[PINCTRL_PIN_56] = {
2090
		.groups = &((uint16_t []) {
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_56,
			PINCTRL_GRP_CAN1_14,
			PINCTRL_GRP_I2C1_14,
			PINCTRL_GRP_SWDT1_9_CLK,
			PINCTRL_GRP_SPI0_4,
			PINCTRL_GRP_TTC3_7_CLK,
			PINCTRL_GRP_UART1_14,
			PINCTRL_GRP_TRACE0_2,
2104
2105
			END_OF_GROUPS,
		}),
2106
2107
	},
	[PINCTRL_PIN_57] = {
2108
		.groups = &((uint16_t []) {
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_57,
			PINCTRL_GRP_CAN1_14,
			PINCTRL_GRP_I2C1_14,
			PINCTRL_GRP_SWDT1_9_RST,
			PINCTRL_GRP_SPI0_4,
			PINCTRL_GRP_TTC3_7_WAV,
			PINCTRL_GRP_UART1_14,
			PINCTRL_GRP_TRACE0_2,
2122
2123
			END_OF_GROUPS,
		}),
2124
2125
	},
	[PINCTRL_PIN_58] = {
2126
		.groups = &((uint16_t []) {
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_58,
			PINCTRL_GRP_CAN0_14,
			PINCTRL_GRP_I2C0_14,
			PINCTRL_GRP_PJTAG0_5,
			PINCTRL_GRP_SPI1_4,
			PINCTRL_GRP_TTC2_7_CLK,
			PINCTRL_GRP_UART0_14,
			PINCTRL_GRP_TRACE0_2,
2140
2141
			END_OF_GROUPS,
		}),
2142
2143
	},
	[PINCTRL_PIN_59] = {
2144
		.groups = &((uint16_t []) {
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_59,
			PINCTRL_GRP_CAN0_14,
			PINCTRL_GRP_I2C0_14,
			PINCTRL_GRP_PJTAG0_5,
			PINCTRL_GRP_SPI1_4_SS2,
			PINCTRL_GRP_TTC2_7_WAV,
			PINCTRL_GRP_UART0_14,
			PINCTRL_GRP_TRACE0_2,
2158
2159
			END_OF_GROUPS,
		}),
2160
2161
	},
	[PINCTRL_PIN_60] = {
2162
		.groups = &((uint16_t []) {
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_60,
			PINCTRL_GRP_CAN1_15,
			PINCTRL_GRP_I2C1_15,
			PINCTRL_GRP_PJTAG0_5,
			PINCTRL_GRP_SPI1_4_SS1,
			PINCTRL_GRP_TTC1_7_CLK,
			PINCTRL_GRP_UART1_15,
			PINCTRL_GRP_TRACE0_2,
2176
2177
			END_OF_GROUPS,
		}),
2178
2179
	},
	[PINCTRL_PIN_61] = {
2180
		.groups = &((uint16_t []) {
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_61,
			PINCTRL_GRP_CAN1_15,
			PINCTRL_GRP_I2C1_15,
			PINCTRL_GRP_PJTAG0_5,
			PINCTRL_GRP_SPI1_4_SS0,
			PINCTRL_GRP_TTC1_7_WAV,
			PINCTRL_GRP_UART1_15,
			PINCTRL_GRP_TRACE0_2,
2194
2195
			END_OF_GROUPS,
		}),
2196
2197
	},
	[PINCTRL_PIN_62] = {
2198
		.groups = &((uint16_t []) {
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_62,
			PINCTRL_GRP_CAN0_15,
			PINCTRL_GRP_I2C0_15,
			PINCTRL_GRP_SWDT0_9_CLK,
			PINCTRL_GRP_SPI1_4,
			PINCTRL_GRP_TTC0_7_CLK,
			PINCTRL_GRP_UART0_15,
			PINCTRL_GRP_TRACE0_2,
2212
2213
			END_OF_GROUPS,
		}),
2214
2215
	},
	[PINCTRL_PIN_63] = {
2216
		.groups = &((uint16_t []) {
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
			PINCTRL_GRP_ETHERNET2_0,
			PINCTRL_GRP_USB0_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_63,
			PINCTRL_GRP_CAN0_15,
			PINCTRL_GRP_I2C0_15,
			PINCTRL_GRP_SWDT0_9_RST,
			PINCTRL_GRP_SPI1_4,
			PINCTRL_GRP_TTC0_7_WAV,
			PINCTRL_GRP_UART0_15,
			PINCTRL_GRP_TRACE0_2,
2230
2231
			END_OF_GROUPS,
		}),
2232
2233
	},
	[PINCTRL_PIN_64] = {
2234
		.groups = &((uint16_t []) {
2235
2236
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2237
			PINCTRL_GRP_SDIO0_2,
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_64,
			PINCTRL_GRP_CAN1_16,
			PINCTRL_GRP_I2C1_16,
			PINCTRL_GRP_SWDT1_10_CLK,
			PINCTRL_GRP_SPI0_5,
			PINCTRL_GRP_TTC3_8_CLK,
			PINCTRL_GRP_UART1_16,
			PINCTRL_GRP_TRACE0_2,
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_2,
			PINCTRL_GRP_SDIO0_1BIT_2_3,
			PINCTRL_GRP_SDIO0_1BIT_2_4,
			PINCTRL_GRP_SDIO0_1BIT_2_5,
			PINCTRL_GRP_SDIO0_1BIT_2_6,
			PINCTRL_GRP_SDIO0_1BIT_2_7,
			END_OF_GROUPS,
		}),
2260
2261
	},
	[PINCTRL_PIN_65] = {
2262
		.groups = &((uint16_t []) {
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
			PINCTRL_GRP_SDIO0_2_CD,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_65,
			PINCTRL_GRP_CAN1_16,
			PINCTRL_GRP_I2C1_16,
			PINCTRL_GRP_SWDT1_10_RST,
			PINCTRL_GRP_SPI0_5_SS2,
			PINCTRL_GRP_TTC3_8_WAV,
			PINCTRL_GRP_UART1_16,
			PINCTRL_GRP_TRACE0_2,
2276
2277
			END_OF_GROUPS,
		}),
2278
2279
	},
	[PINCTRL_PIN_66] = {
2280
		.groups = &((uint16_t []) {
2281
2282
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2283
			PINCTRL_GRP_SDIO0_2,
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_66,
			PINCTRL_GRP_CAN0_16,
			PINCTRL_GRP_I2C0_16,
			PINCTRL_GRP_SWDT0_10_CLK,
			PINCTRL_GRP_SPI0_5_SS1,
			PINCTRL_GRP_TTC2_8_CLK,
			PINCTRL_GRP_UART0_16,
			PINCTRL_GRP_TRACE0_2,
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_2,
			PINCTRL_GRP_SDIO0_1BIT_2_3,
			PINCTRL_GRP_SDIO0_1BIT_2_4,
			PINCTRL_GRP_SDIO0_1BIT_2_5,
			PINCTRL_GRP_SDIO0_1BIT_2_6,
			PINCTRL_GRP_SDIO0_1BIT_2_7,
			END_OF_GROUPS,
		}),
2306
2307
	},
	[PINCTRL_PIN_67] = {
2308
		.groups = &((uint16_t []) {
2309
2310
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2311
			PINCTRL_GRP_SDIO0_2,
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_67,
			PINCTRL_GRP_CAN0_16,
			PINCTRL_GRP_I2C0_16,
			PINCTRL_GRP_SWDT0_10_RST,
			PINCTRL_GRP_SPI0_5_SS0,
			PINCTRL_GRP_TTC2_8_WAV,
			PINCTRL_GRP_UART0_16,
			PINCTRL_GRP_TRACE0_2,
2322
2323
2324
2325
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_0,
			END_OF_GROUPS,
		}),
2326
2327
	},
	[PINCTRL_PIN_68] = {
2328
		.groups = &((uint16_t []) {
2329
2330
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2331
			PINCTRL_GRP_SDIO0_2,
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_68,
			PINCTRL_GRP_CAN1_17,
			PINCTRL_GRP_I2C1_17,
			PINCTRL_GRP_SWDT1_11_CLK,
			PINCTRL_GRP_SPI0_5,
			PINCTRL_GRP_TTC1_8_CLK,
			PINCTRL_GRP_UART1_17,
			PINCTRL_GRP_TRACE0_2,
2342
2343
2344
2345
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_1,
			END_OF_GROUPS,
		}),
2346
2347
	},
	[PINCTRL_PIN_69] = {
2348
		.groups = &((uint16_t []) {
2349
2350
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2351
			PINCTRL_GRP_SDIO0_2,
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
			PINCTRL_GRP_SDIO1_1_WP,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_69,
			PINCTRL_GRP_CAN1_17,
			PINCTRL_GRP_I2C1_17,
			PINCTRL_GRP_SWDT1_11_RST,
			PINCTRL_GRP_SPI0_5,
			PINCTRL_GRP_TTC1_8_WAV,
			PINCTRL_GRP_UART1_17,
			PINCTRL_GRP_TRACE0_2,
2362
2363
2364
2365
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_2,
			END_OF_GROUPS,
		}),
2366
2367
	},
	[PINCTRL_PIN_70] = {
2368
		.groups = &((uint16_t []) {
2369
2370
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2371
			PINCTRL_GRP_SDIO0_2,
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
			PINCTRL_GRP_SDIO1_1_PC,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_70,
			PINCTRL_GRP_CAN0_17,
			PINCTRL_GRP_I2C0_17,
			PINCTRL_GRP_SWDT0_11_CLK,
			PINCTRL_GRP_SPI1_5,
			PINCTRL_GRP_TTC0_8_CLK,
			PINCTRL_GRP_UART0_17,
			PINCTRL_GRP_RESERVED,
2382
2383
2384
2385
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_3,
			END_OF_GROUPS,
		}),
2386
2387
	},
	[PINCTRL_PIN_71] = {
2388
		.groups = &((uint16_t []) {
2389
2390
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2391
2392
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2393
2394
2395
2396
2397
2398
2399
2400
2401
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_71,
			PINCTRL_GRP_CAN0_17,
			PINCTRL_GRP_I2C0_17,
			PINCTRL_GRP_SWDT0_11_RST,
			PINCTRL_GRP_SPI1_5_SS2,
			PINCTRL_GRP_TTC0_8_WAV,
			PINCTRL_GRP_UART0_17,
			PINCTRL_GRP_RESERVED,
2402
2403
2404
2405
2406
2407
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_4,
			PINCTRL_GRP_SDIO1_1BIT_1_0,
			END_OF_GROUPS,
		}),
2408
2409
	},
	[PINCTRL_PIN_72] = {
2410
		.groups = &((uint16_t []) {
2411
2412
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2413
2414
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2415
2416
2417
2418
2419
2420
2421
2422
2423
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_72,
			PINCTRL_GRP_CAN1_18,
			PINCTRL_GRP_I2C1_18,
			PINCTRL_GRP_SWDT1_12_CLK,
			PINCTRL_GRP_SPI1_5_SS1,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_UART1_18,
			PINCTRL_GRP_RESERVED,
2424
2425
2426
2427
2428
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_5,
			PINCTRL_GRP_SDIO1_1BIT_1_1,
			END_OF_GROUPS,
		}),
2429
2430
	},
	[PINCTRL_PIN_73] = {
2431
		.groups = &((uint16_t []) {
2432
2433
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2434
2435
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2436
2437
2438
2439
2440
2441
2442
2443
2444
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_73,
			PINCTRL_GRP_CAN1_18,
			PINCTRL_GRP_I2C1_18,
			PINCTRL_GRP_SWDT1_12_RST,
			PINCTRL_GRP_SPI1_5_SS0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_UART1_18,
			PINCTRL_GRP_RESERVED,
2445
2446
2447
2448
2449
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_6,
			PINCTRL_GRP_SDIO1_1BIT_1_2,
			END_OF_GROUPS,
		}),
2450
2451
	},
	[PINCTRL_PIN_74] = {
2452
		.groups = &((uint16_t []) {
2453
2454
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2455
2456
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2457
2458
2459
2460
2461
2462
2463
2464
2465
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_74,
			PINCTRL_GRP_CAN0_18,
			PINCTRL_GRP_I2C0_18,
			PINCTRL_GRP_SWDT0_12_CLK,
			PINCTRL_GRP_SPI1_5,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_UART0_18,
			PINCTRL_GRP_RESERVED,
2466
2467
2468
2469
2470
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_7,
			PINCTRL_GRP_SDIO1_1BIT_1_3,
			END_OF_GROUPS,
		}),
2471
2472
	},
	[PINCTRL_PIN_75] = {
2473
		.groups = &((uint16_t []) {
2474
2475
2476
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
			PINCTRL_GRP_SDIO0_2_PC,
2477
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2478
2479
2480
2481
2482
2483
2484
2485
2486
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_75,
			PINCTRL_GRP_CAN0_18,
			PINCTRL_GRP_I2C0_18,
			PINCTRL_GRP_SWDT0_12_RST,
			PINCTRL_GRP_SPI1_5,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_UART0_18,
			PINCTRL_GRP_RESERVED,
2487
2488
2489
2490
2491
2492
			PINCTRL_GRP_SDIO1_1BIT_1_0,
			PINCTRL_GRP_SDIO1_1BIT_1_1,
			PINCTRL_GRP_SDIO1_1BIT_1_2,
			PINCTRL_GRP_SDIO1_1BIT_1_3,
			END_OF_GROUPS,
		}),
2493
2494
	},
	[PINCTRL_PIN_76] = {
2495
		.groups = &((uint16_t []) {
2496
2497
2498
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_2_WP,
2499
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2500
2501
2502
2503
2504
2505
2506
2507
2508
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_76,
			PINCTRL_GRP_CAN1_19,
			PINCTRL_GRP_I2C1_19,
			PINCTRL_GRP_MDIO0_0,
			PINCTRL_GRP_MDIO1_1,
			PINCTRL_GRP_MDIO2_0,
			PINCTRL_GRP_MDIO3_0,
			PINCTRL_GRP_RESERVED,
2509
2510
2511
2512
2513
2514
			PINCTRL_GRP_SDIO1_1BIT_1_0,
			PINCTRL_GRP_SDIO1_1BIT_1_1,
			PINCTRL_GRP_SDIO1_1BIT_1_2,
			PINCTRL_GRP_SDIO1_1BIT_1_3,
			END_OF_GROUPS,
		}),
2515
2516
	},
	[PINCTRL_PIN_77] = {
2517
		.groups = &((uint16_t []) {
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO1_1_CD,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_GPIO0_77,
			PINCTRL_GRP_CAN1_19,
			PINCTRL_GRP_I2C1_19,
			PINCTRL_GRP_MDIO0_0,
			PINCTRL_GRP_MDIO1_1,
			PINCTRL_GRP_MDIO2_0,
			PINCTRL_GRP_MDIO3_0,
			PINCTRL_GRP_RESERVED,
2531
2532
			END_OF_GROUPS,
		}),
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
	},
};

/**
 * pm_api_pinctrl_get_num_pins() - PM call to request number of pins
 * @npins	Number of pins
 *
 * This function is used by master to get number of pins
 *
 * @return	Returns success.
 */
enum pm_ret_status pm_api_pinctrl_get_num_pins(unsigned int *npins)
{
	*npins = MAX_PIN;

	return PM_RET_SUCCESS;
}

/**
 * pm_api_pinctrl_get_num_functions() - PM call to request number of functions
 * @nfuncs	Number of functions
 *
 * This function is used by master to get number of functions
 *
 * @return	Returns success.
 */
enum pm_ret_status pm_api_pinctrl_get_num_functions(unsigned int *nfuncs)
{
	*nfuncs = MAX_FUNCTION;

	return PM_RET_SUCCESS;
}

/**
 * pm_api_pinctrl_get_num_func_groups() - PM call to request number of
 *					  function groups
 * @fid		Function Id
 * @ngroups	Number of function groups
 *
 * This function is used by master to get number of function groups
 *
 * @return	Returns success.
 */
enum pm_ret_status pm_api_pinctrl_get_num_func_groups(unsigned int fid,
						      unsigned int *ngroups)
{
	int i = 0;
	uint16_t *grps;

	if (fid >= MAX_FUNCTION)
		return PM_RET_ERROR_ARGS;

	*ngroups = 0;

	grps = *pinctrl_functions[fid].groups;
2588
	if (grps == NULL)
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
		return PM_RET_SUCCESS;

	while (grps[i++] != (uint16_t)END_OF_GROUPS)
		(*ngroups)++;

	return PM_RET_SUCCESS;
}

/**
 * pm_api_pinctrl_get_function_name() - PM call to request a function name
 * @fid		Function ID
 * @name	Name of function (max 16 bytes)
 *
 * This function is used by master to get name of function specified
 * by given function ID.
 *
 * @return	Returns success. In case of error, name data is 0.
 */
enum pm_ret_status pm_api_pinctrl_get_function_name(unsigned int fid,
						    char *name)
{
	if (fid >= MAX_FUNCTION)
		memcpy(name, END_OF_FUNCTION, FUNCTION_NAME_LEN);
	else
		memcpy(name, pinctrl_functions[fid].name, FUNCTION_NAME_LEN);

	return PM_RET_SUCCESS;
}

/**
 * pm_api_pinctrl_get_function_groups() - PM call to request first 6 function
 *					  groups of function Id
 * @fid		Function ID
 * @index	Index of next function groups
 * @groups	Function groups
 *
 * This function is used by master to get function groups specified
 * by given function Id. This API will return 6 function groups with
 * a single response. To get other function groups, master should call
 * same API in loop with new function groups index till error is returned.
 *
 * E.g First call should have index 0 which will return function groups
 * 0, 1, 2, 3, 4 and 5. Next call, index should be 6 which will return
 * function groups 6, 7, 8, 9, 10 and 11 and so on.
 *
 * Return: Returns status, either success or error+reason.
 */
enum pm_ret_status pm_api_pinctrl_get_function_groups(unsigned int fid,
						      unsigned int index,
						      uint16_t *groups)
{
2640
	unsigned int i;
2641
2642
2643
2644
2645
2646
2647
2648
	uint16_t *grps;

	if (fid >= MAX_FUNCTION)
		return PM_RET_ERROR_ARGS;

	memset(groups, END_OF_GROUPS, GROUPS_PAYLOAD_LEN);

	grps = *pinctrl_functions[fid].groups;
2649
	if (grps == NULL)
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
		return PM_RET_SUCCESS;

	/* Skip groups till index */
	for (i = 0; i < index; i++)
		if (grps[i] == (uint16_t)END_OF_GROUPS)
			return PM_RET_SUCCESS;

	for (i = 0; i < NUM_GROUPS_PER_RESP; i++) {
		groups[i] = grps[index + i];
		if (groups[i] == (uint16_t)END_OF_GROUPS)
			break;
	}

	return PM_RET_SUCCESS;
}

/**
 * pm_api_pinctrl_get_pin_groups() - PM call to request first 6 pin
 *				     groups of pin
 * @pin		Pin
 * @index	Index of next pin groups
 * @groups	pin groups
 *
 * This function is used by master to get pin groups specified
 * by given pin Id. This API will return 6 pin groups with
 * a single response. To get other pin groups, master should call
 * same API in loop with new pin groups index till error is returned.
 *
 * E.g First call should have index 0 which will return pin groups
 * 0, 1, 2, 3, 4 and 5. Next call, index should be 6 which will return
 * pin groups 6, 7, 8, 9, 10 and 11 and so on.
 *
 * Return: Returns status, either success or error+reason.
 */
enum pm_ret_status pm_api_pinctrl_get_pin_groups(unsigned int pin,
						 unsigned int index,
						 uint16_t *groups)
{
2688
	unsigned int i;
2689
	uint16_t *grps;
2690
2691
2692
2693
2694
2695

	if (pin >= MAX_PIN)
		return PM_RET_ERROR_ARGS;

	memset(groups, END_OF_GROUPS, GROUPS_PAYLOAD_LEN);

2696
2697
	grps = *zynqmp_pin_groups[pin].groups;
	if (!grps)
2698
2699
		return PM_RET_SUCCESS;

2700
2701
2702
2703
2704
	/* Skip groups till index */
	for (i = 0; i < index; i++)
		if (grps[i] == (uint16_t)END_OF_GROUPS)
			return PM_RET_SUCCESS;

2705
2706
	for (i = 0; i < NUM_GROUPS_PER_RESP; i++) {
		groups[i] = grps[index + i];
2707
2708
		if (groups[i] == (uint16_t)END_OF_GROUPS)
			break;
2709
2710
2711
2712
2713
	}

	return PM_RET_SUCCESS;
}

2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
/**
 * pm_api_pinctrl_get_function() - Read function id set for the given pin
 * @pin		Pin number
 * @nid		Node ID of function currently set for given pin
 *
 * This function provides the function currently set for the given pin.
 *
 * @return	Returns status, either success or error+reason
 */
enum pm_ret_status pm_api_pinctrl_get_function(unsigned int pin,
2724
					       unsigned int *id)
2725
{
2726
2727
2728
	unsigned int i = 0, j = 0;
	enum pm_ret_status ret = PM_RET_SUCCESS;
	unsigned int ctrlreg, val, gid;
2729
	uint16_t *grps;
2730

2731
2732
2733
	ctrlreg = IOU_SLCR_BASEADDR + 4U * pin;
	ret = pm_mmio_read(ctrlreg, &val);
	if (ret != PM_RET_SUCCESS)
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
		return ret;

	val &= PINCTRL_FUNCTION_MASK;

	for (i = 0; i < NFUNCS_PER_PIN; i++)
		if (val == pm_pinctrl_mux[i])
			break;

	if (i == NFUNCS_PER_PIN)
		return PM_RET_ERROR_NOTSUPPORTED;

2745
	gid = *(*zynqmp_pin_groups[pin].groups + i);
2746

2747
2748
	for (i = 0; i < MAX_FUNCTION; i++) {
		grps = *pinctrl_functions[i].groups;
2749
		if (grps == NULL)
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
			continue;
		if (val != pinctrl_functions[i].regval)
			continue;

		for (j = 0; grps[j] != (uint16_t)END_OF_GROUPS; j++) {
			if (gid == grps[j]) {
				*id = i;
				goto done;
			}
		}
	}
	if (i == MAX_FUNCTION)
		ret = PM_RET_ERROR_ARGS;
done:
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
	return ret;
}

/**
 * pm_api_pinctrl_set_function() - Set function id set for the given pin
 * @pin		Pin number
 * @nid		Node ID of function to set for given pin
 *
 * This function provides the function currently set for the given pin.
 *
 * @return	Returns status, either success or error+reason
 */
enum pm_ret_status pm_api_pinctrl_set_function(unsigned int pin,
2777
					       unsigned int fid)
2778
{
2779
	int i, j;
2780
	unsigned int ctrlreg, val;
2781
	uint16_t *pgrps, *fgrps;
2782

2783
	ctrlreg = IOU_SLCR_BASEADDR + 4U * pin;
2784
	val = pinctrl_functions[fid].regval;
2785
2786

	for (i = 0; i < NFUNCS_PER_PIN; i++)
2787
		if (val == pm_pinctrl_mux[i])
2788
2789
2790
2791
2792
			break;

	if (i == NFUNCS_PER_PIN)
		return PM_RET_ERROR_NOTSUPPORTED;

2793
2794
	pgrps = *zynqmp_pin_groups[pin].groups;
	if (!pgrps)
2795
2796
		return PM_RET_ERROR_NOTSUPPORTED;

2797
2798
	fgrps = *pinctrl_functions[fid].groups;
	if (!fgrps)
2799
		return PM_RET_ERROR_NOTSUPPORTED;
2800

2801
2802
2803
2804
2805
2806
2807
2808
	for (i = 0; fgrps[i] != (uint16_t)END_OF_GROUPS; i++)
		for (j = 0; pgrps[j] != (uint16_t)END_OF_GROUPS; j++)
			if (fgrps[i] == pgrps[j])
				goto match;

	return PM_RET_ERROR_NOTSUPPORTED;

match:
2809
	return pm_mmio_write(ctrlreg, PINCTRL_FUNCTION_MASK, val);
2810
}
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825

/**
 * pm_api_pinctrl_set_config() - Set configuration parameter for given pin
 * @pin: Pin for which configuration is to be set
 * @param: Configuration parameter to be set
 * @value: Value to be set for configuration parameter
 *
 * This function sets value of requested configuration parameter for given pin.
 *
 * @return	Returns status, either success or error+reason
 */
enum pm_ret_status pm_api_pinctrl_set_config(unsigned int pin,
					     unsigned int param,
					     unsigned int value)
{
2826
2827
	enum pm_ret_status ret;
	unsigned int ctrlreg, mask, val, offset;
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842

	if (param >= PINCTRL_CONFIG_MAX)
		return PM_RET_ERROR_NOTSUPPORTED;

	if (pin >=  PINCTRL_NUM_MIOS)
		return PM_RET_ERROR_ARGS;

	mask = 1 << PINCTRL_PIN_OFFSET(pin);

	switch (param) {
	case PINCTRL_CONFIG_SLEW_RATE:
		if (value != PINCTRL_SLEW_RATE_FAST &&
		    value != PINCTRL_SLEW_RATE_SLOW)
			return PM_RET_ERROR_ARGS;

2843
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2844
2845
2846
					      PINCTRL_SLEWCTRL_REG_OFFSET,
					      pin);
		val = value << PINCTRL_PIN_OFFSET(pin);
2847
		ret = pm_mmio_write(ctrlreg, mask, val);
2848
2849
2850
2851
2852
2853
		break;
	case PINCTRL_CONFIG_BIAS_STATUS:
		if (value != PINCTRL_BIAS_ENABLE &&
		    value != PINCTRL_BIAS_DISABLE)
			return PM_RET_ERROR_ARGS;

2854
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2855
2856
2857
2858
					      PINCTRL_PULLSTAT_REG_OFFSET,
					      pin);

		offset = PINCTRL_PIN_OFFSET(pin);
2859
2860
2861
		if (ctrlreg == IOU_SLCR_BANK1_CTRL5)
			offset = (offset < 12U) ?
					(offset + 14U) : (offset - 12U);
2862
2863
2864

		val = value << offset;
		mask = 1 << offset;
2865
		ret = pm_mmio_write(ctrlreg, mask, val);
2866
2867
2868
2869
2870
2871
2872
		break;
	case PINCTRL_CONFIG_PULL_CTRL:

		if (value != PINCTRL_BIAS_PULL_DOWN &&
		    value != PINCTRL_BIAS_PULL_UP)
			return PM_RET_ERROR_ARGS;

2873
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2874
2875
2876
2877
					      PINCTRL_PULLSTAT_REG_OFFSET,
					      pin);

		offset = PINCTRL_PIN_OFFSET(pin);
2878
2879
2880
		if (ctrlreg == IOU_SLCR_BANK1_CTRL5)
			offset = (offset < 12U) ?
					(offset + 14U) : (offset - 12U);
2881
2882

		val = PINCTRL_BIAS_ENABLE << offset;
2883
2884
		ret = pm_mmio_write(ctrlreg, 1 << offset, val);
		if (ret != PM_RET_SUCCESS)
2885
2886
			return ret;

2887
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2888
2889
2890
					      PINCTRL_PULLCTRL_REG_OFFSET,
					      pin);
		val = value << PINCTRL_PIN_OFFSET(pin);
2891
		ret = pm_mmio_write(ctrlreg, mask, val);
2892
2893
2894
2895
2896
2897
		break;
	case PINCTRL_CONFIG_SCHMITT_CMOS:
		if (value != PINCTRL_INPUT_TYPE_CMOS &&
		    value != PINCTRL_INPUT_TYPE_SCHMITT)
			return PM_RET_ERROR_ARGS;

2898
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2899
2900
2901
2902
					      PINCTRL_SCHCMOS_REG_OFFSET,
					      pin);

		val = value << PINCTRL_PIN_OFFSET(pin);
2903
		ret = pm_mmio_write(ctrlreg, mask, val);
2904
2905
2906
2907
2908
		break;
	case PINCTRL_CONFIG_DRIVE_STRENGTH:
		if (value > PINCTRL_DRIVE_STRENGTH_12MA)
			return PM_RET_ERROR_ARGS;

2909
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2910
2911
2912
					      PINCTRL_DRVSTRN0_REG_OFFSET,
					      pin);
		val = (value >> 1) << PINCTRL_PIN_OFFSET(pin);
2913
		ret = pm_mmio_write(ctrlreg, mask, val);
2914
2915
2916
		if (ret)
			return ret;

2917
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2918
2919
					      PINCTRL_DRVSTRN1_REG_OFFSET,
					      pin);
2920
2921
		val = (value & 0x01U) << PINCTRL_PIN_OFFSET(pin);
		ret = pm_mmio_write(ctrlreg, mask, val);
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
		break;
	default:
		ERROR("Invalid parameter %u\n", param);
		ret = PM_RET_ERROR_NOTSUPPORTED;
		break;
	}

	return ret;
}

/**
 * pm_api_pinctrl_get_config() - Get configuration parameter value for given pin
 * @pin: Pin for which configuration is to be read
 * @param: Configuration parameter to be read
 * @value: buffer to store value of configuration parameter
 *
 * This function reads value of requested configuration parameter for given pin.
 *
 * @return	Returns status, either success or error+reason
 */
enum pm_ret_status pm_api_pinctrl_get_config(unsigned int pin,
					     unsigned int param,
					     unsigned int *value)
{
2946
2947
	enum pm_ret_status ret;
	unsigned int ctrlreg, val;
2948
2949
2950
2951
2952
2953
2954
2955
2956

	if (param >= PINCTRL_CONFIG_MAX)
		return PM_RET_ERROR_NOTSUPPORTED;

	if (pin >=  PINCTRL_NUM_MIOS)
		return PM_RET_ERROR_ARGS;

	switch (param) {
	case PINCTRL_CONFIG_SLEW_RATE:
2957
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2958
2959
2960
					      PINCTRL_SLEWCTRL_REG_OFFSET,
					      pin);

2961
2962
		ret = pm_mmio_read(ctrlreg, &val);
		if (ret != PM_RET_SUCCESS)
2963
2964
2965
2966
2967
			return ret;

		*value = PINCTRL_REGVAL_TO_PIN_CONFIG(pin, val);
		break;
	case PINCTRL_CONFIG_BIAS_STATUS:
2968
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2969
2970
2971
					      PINCTRL_PULLSTAT_REG_OFFSET,
					      pin);

2972
		ret = pm_mmio_read(ctrlreg, &val);
2973
2974
2975
		if (ret)
			return ret;

2976
		if (ctrlreg == IOU_SLCR_BANK1_CTRL5)
2977
2978
2979
2980
2981
2982
			val = ((val & 0x3FFF) << 12) | ((val >> 14) & 0xFFF);

		*value = PINCTRL_REGVAL_TO_PIN_CONFIG(pin, val);
		break;
	case PINCTRL_CONFIG_PULL_CTRL:

2983
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2984
2985
2986
					      PINCTRL_PULLCTRL_REG_OFFSET,
					      pin);

2987
		ret = pm_mmio_read(ctrlreg, &val);
2988
2989
2990
2991
2992
2993
		if (ret)
			return ret;

		*value = PINCTRL_REGVAL_TO_PIN_CONFIG(pin, val);
		break;
	case PINCTRL_CONFIG_SCHMITT_CMOS:
2994
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2995
2996
2997
					      PINCTRL_SCHCMOS_REG_OFFSET,
					      pin);

2998
		ret = pm_mmio_read(ctrlreg, &val);
2999
3000
3001
3002
3003
3004
		if (ret)
			return ret;

		*value = PINCTRL_REGVAL_TO_PIN_CONFIG(pin, val);
		break;
	case PINCTRL_CONFIG_DRIVE_STRENGTH:
3005
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
3006
3007
					      PINCTRL_DRVSTRN0_REG_OFFSET,
					      pin);
3008
		ret = pm_mmio_read(ctrlreg, &val);
3009
3010
3011
3012
3013
		if (ret)
			return ret;

		*value = PINCTRL_REGVAL_TO_PIN_CONFIG(pin, val) << 1;

3014
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
3015
3016
					      PINCTRL_DRVSTRN1_REG_OFFSET,
					      pin);
3017
		ret = pm_mmio_read(ctrlreg, &val);
3018
3019
3020
3021
3022
3023
		if (ret)
			return ret;

		*value |= PINCTRL_REGVAL_TO_PIN_CONFIG(pin, val);
		break;
	case PINCTRL_CONFIG_VOLTAGE_STATUS:
3024
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
3025
3026
3027
					      PINCTRL_VOLTAGE_STAT_REG_OFFSET,
					      pin);

3028
		ret = pm_mmio_read(ctrlreg, &val);
3029
3030
3031
3032
3033
3034
3035
3036
3037
		if (ret)
			return ret;

		*value = val & PINCTRL_VOLTAGE_STATUS_MASK;
		break;
	default:
		return PM_RET_ERROR_NOTSUPPORTED;
	}

3038
	return PM_RET_SUCCESS;
3039
}