pm_api_pinctrl.c 70 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
/*
 * 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.
 */

11
#include <string.h>
12
13
14
15

#include <arch_helpers.h>
#include <plat/common/platform.h>

16
17
18
19
20
21
#include "pm_api_pinctrl.h"
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_common.h"
#include "pm_ipi.h"

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#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)			\
40
	((addr) + 4 * PINCTRL_NUM_MIOS + PINCTRL_BANK_ADDR_STEP *	\
41
	((miopin) / MAX_PIN_PER_REG) + (reg))
42

43
44
#define PINCTRL_PIN_OFFSET(_miopin) \
	((_miopin) - (MAX_PIN_PER_REG * ((_miopin) / MAX_PIN_PER_REG)))
45

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

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

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

/* Max groups for one pin */
62
#define MAX_PIN_GROUPS	U(13)
63
64

struct zynqmp_pin_group {
65
	uint16_t (*groups)[];
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
969
970
};

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,
		}),
	},
971
972
};

973
974
static struct zynqmp_pin_group zynqmp_pin_groups[MAX_PIN] = {
	[PINCTRL_PIN_0] = {
975
		.groups = &((uint16_t []) {
976
977
978
979
980
981
982
983
984
985
986
987
988
			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,
989
990
			END_OF_GROUPS,
		}),
991
992
	},
	[PINCTRL_PIN_1] = {
993
		.groups = &((uint16_t []) {
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
			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,
1007
1008
			END_OF_GROUPS,
		}),
1009
1010
	},
	[PINCTRL_PIN_2] = {
1011
		.groups = &((uint16_t []) {
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
			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,
1025
1026
			END_OF_GROUPS,
		}),
1027
1028
	},
	[PINCTRL_PIN_3] = {
1029
		.groups = &((uint16_t []) {
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
			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,
1043
1044
			END_OF_GROUPS,
		}),
1045
1046
	},
	[PINCTRL_PIN_4] = {
1047
		.groups = &((uint16_t []) {
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
			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,
1061
1062
			END_OF_GROUPS,
		}),
1063
1064
	},
	[PINCTRL_PIN_5] = {
1065
		.groups = &((uint16_t []) {
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
			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,
1079
1080
			END_OF_GROUPS,
		}),
1081
1082
	},
	[PINCTRL_PIN_6] = {
1083
		.groups = &((uint16_t []) {
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
			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,
1097
1098
			END_OF_GROUPS,
		}),
1099
1100
	},
	[PINCTRL_PIN_7] = {
1101
		.groups = &((uint16_t []) {
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
			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,
1115
1116
			END_OF_GROUPS,
		}),
1117
1118
	},
	[PINCTRL_PIN_8] = {
1119
		.groups = &((uint16_t []) {
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
			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,
1133
1134
			END_OF_GROUPS,
		}),
1135
1136
	},
	[PINCTRL_PIN_9] = {
1137
		.groups = &((uint16_t []) {
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
			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,
1151
1152
			END_OF_GROUPS,
		}),
1153
1154
	},
	[PINCTRL_PIN_10] = {
1155
		.groups = &((uint16_t []) {
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
			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,
1169
1170
			END_OF_GROUPS,
		}),
1171
1172
	},
	[PINCTRL_PIN_11] = {
1173
		.groups = &((uint16_t []) {
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
			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,
1187
1188
			END_OF_GROUPS,
		}),
1189
1190
	},
	[PINCTRL_PIN_12] = {
1191
		.groups = &((uint16_t []) {
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
			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,
1205
1206
			END_OF_GROUPS,
		}),
1207
1208
	},
	[PINCTRL_PIN_13] = {
1209
		.groups = &((uint16_t []) {
1210
1211
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1212
			PINCTRL_GRP_SDIO0_0,
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
			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,
1223
1224
1225
1226
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_0,
			END_OF_GROUPS,
		}),
1227
1228
	},
	[PINCTRL_PIN_14] = {
1229
		.groups = &((uint16_t []) {
1230
1231
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1232
			PINCTRL_GRP_SDIO0_0,
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
			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,
1243
1244
1245
1246
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_1,
			END_OF_GROUPS,
		}),
1247
1248
	},
	[PINCTRL_PIN_15] = {
1249
		.groups = &((uint16_t []) {
1250
1251
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1252
			PINCTRL_GRP_SDIO0_0,
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
			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,
1263
1264
1265
1266
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_2,
			END_OF_GROUPS,
		}),
1267
1268
	},
	[PINCTRL_PIN_16] = {
1269
		.groups = &((uint16_t []) {
1270
1271
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1272
			PINCTRL_GRP_SDIO0_0,
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
			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,
1283
1284
1285
1286
			PINCTRL_GRP_SDIO0_4BIT_0_0,
			PINCTRL_GRP_SDIO0_1BIT_0_3,
			END_OF_GROUPS,
		}),
1287
1288
	},
	[PINCTRL_PIN_17] = {
1289
		.groups = &((uint16_t []) {
1290
1291
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1292
			PINCTRL_GRP_SDIO0_0,
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
			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,
1303
1304
1305
1306
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_4,
			END_OF_GROUPS,
		}),
1307
1308
	},
	[PINCTRL_PIN_18] = {
1309
		.groups = &((uint16_t []) {
1310
1311
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1312
			PINCTRL_GRP_SDIO0_0,
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
			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,
1323
1324
1325
1326
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_5,
			END_OF_GROUPS,
		}),
1327
1328
	},
	[PINCTRL_PIN_19] = {
1329
		.groups = &((uint16_t []) {
1330
1331
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1332
			PINCTRL_GRP_SDIO0_0,
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
			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,
1343
1344
1345
1346
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_6,
			END_OF_GROUPS,
		}),
1347
1348
	},
	[PINCTRL_PIN_20] = {
1349
		.groups = &((uint16_t []) {
1350
1351
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1352
			PINCTRL_GRP_SDIO0_0,
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
			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,
1363
1364
1365
1366
			PINCTRL_GRP_SDIO0_4BIT_0_1,
			PINCTRL_GRP_SDIO0_1BIT_0_7,
			END_OF_GROUPS,
		}),
1367
1368
	},
	[PINCTRL_PIN_21] = {
1369
		.groups = &((uint16_t []) {
1370
1371
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1372
			PINCTRL_GRP_SDIO0_0,
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
			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,
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
			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,
		}),
1395
1396
	},
	[PINCTRL_PIN_22] = {
1397
		.groups = &((uint16_t []) {
1398
1399
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_NAND0_0,
1400
			PINCTRL_GRP_SDIO0_0,
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
			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,
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
			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,
		}),
1423
1424
	},
	[PINCTRL_PIN_23] = {
1425
		.groups = &((uint16_t []) {
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
			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,
1439
1440
			END_OF_GROUPS,
		}),
1441
1442
	},
	[PINCTRL_PIN_24] = {
1443
		.groups = &((uint16_t []) {
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
			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,
1457
1458
			END_OF_GROUPS,
		}),
1459
1460
	},
	[PINCTRL_PIN_25] = {
1461
		.groups = &((uint16_t []) {
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
			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,
1475
1476
			END_OF_GROUPS,
		}),
1477
1478
	},
	[PINCTRL_PIN_26] = {
1479
		.groups = &((uint16_t []) {
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
			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,
1493
1494
			END_OF_GROUPS,
		}),
1495
1496
	},
	[PINCTRL_PIN_27] = {
1497
		.groups = &((uint16_t []) {
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
			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,
1511
1512
			END_OF_GROUPS,
		}),
1513
1514
	},
	[PINCTRL_PIN_28] = {
1515
		.groups = &((uint16_t []) {
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
			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,
1529
1530
			END_OF_GROUPS,
		}),
1531
1532
	},
	[PINCTRL_PIN_29] = {
1533
		.groups = &((uint16_t []) {
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
			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,
1547
1548
			END_OF_GROUPS,
		}),
1549
1550
	},
	[PINCTRL_PIN_30] = {
1551
		.groups = &((uint16_t []) {
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
			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,
1565
1566
			END_OF_GROUPS,
		}),
1567
1568
	},
	[PINCTRL_PIN_31] = {
1569
		.groups = &((uint16_t []) {
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
			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,
1583
1584
			END_OF_GROUPS,
		}),
1585
1586
	},
	[PINCTRL_PIN_32] = {
1587
		.groups = &((uint16_t []) {
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
			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,
1601
1602
			END_OF_GROUPS,
		}),
1603
1604
	},
	[PINCTRL_PIN_33] = {
1605
		.groups = &((uint16_t []) {
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
			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,
1619
1620
			END_OF_GROUPS,
		}),
1621
1622
	},
	[PINCTRL_PIN_34] = {
1623
		.groups = &((uint16_t []) {
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
			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,
1637
1638
			END_OF_GROUPS,
		}),
1639
1640
	},
	[PINCTRL_PIN_35] = {
1641
		.groups = &((uint16_t []) {
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
			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,
1655
1656
			END_OF_GROUPS,
		}),
1657
1658
	},
	[PINCTRL_PIN_36] = {
1659
		.groups = &((uint16_t []) {
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
			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,
1673
1674
			END_OF_GROUPS,
		}),
1675
1676
	},
	[PINCTRL_PIN_37] = {
1677
		.groups = &((uint16_t []) {
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
			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,
1691
1692
			END_OF_GROUPS,
		}),
1693
1694
	},
	[PINCTRL_PIN_38] = {
1695
		.groups = &((uint16_t []) {
1696
1697
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1698
			PINCTRL_GRP_SDIO0_1,
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
			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,
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
			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,
		}),
1721
1722
	},
	[PINCTRL_PIN_39] = {
1723
		.groups = &((uint16_t []) {
1724
1725
1726
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_CD,
1727
			PINCTRL_GRP_SDIO1_0,
1728
1729
1730
1731
1732
1733
1734
1735
1736
			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,
1737
1738
1739
1740
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_0,
			END_OF_GROUPS,
		}),
1741
1742
	},
	[PINCTRL_PIN_40] = {
1743
		.groups = &((uint16_t []) {
1744
1745
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1746
1747
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1748
1749
1750
1751
1752
1753
1754
1755
1756
			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,
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
			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,
		}),
1771
1772
	},
	[PINCTRL_PIN_41] = {
1773
		.groups = &((uint16_t []) {
1774
1775
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1776
1777
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1778
1779
1780
1781
1782
1783
1784
1785
1786
			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,
1787
1788
1789
1790
1791
1792
			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,
		}),
1793
1794
	},
	[PINCTRL_PIN_42] = {
1795
		.groups = &((uint16_t []) {
1796
1797
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1798
1799
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1800
1801
1802
1803
1804
1805
1806
1807
1808
			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,
1809
1810
1811
1812
1813
1814
1815
			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,
		}),
1816
1817
	},
	[PINCTRL_PIN_43] = {
1818
		.groups = &((uint16_t []) {
1819
1820
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1821
			PINCTRL_GRP_SDIO0_1,
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
			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,
1832
1833
1834
1835
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_2,
			END_OF_GROUPS,
		}),
1836
1837
	},
	[PINCTRL_PIN_44] = {
1838
		.groups = &((uint16_t []) {
1839
1840
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1841
			PINCTRL_GRP_SDIO0_1,
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
			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,
1852
1853
1854
1855
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_3,
			END_OF_GROUPS,
		}),
1856
1857
	},
	[PINCTRL_PIN_45] = {
1858
		.groups = &((uint16_t []) {
1859
1860
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1861
			PINCTRL_GRP_SDIO0_1,
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
			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,
1872
1873
1874
1875
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_4,
			END_OF_GROUPS,
		}),
1876
1877
	},
	[PINCTRL_PIN_46] = {
1878
		.groups = &((uint16_t []) {
1879
1880
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1881
1882
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1883
1884
1885
1886
1887
1888
1889
1890
1891
			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,
1892
1893
1894
1895
1896
1897
			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,
		}),
1898
1899
	},
	[PINCTRL_PIN_47] = {
1900
		.groups = &((uint16_t []) {
1901
1902
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1903
1904
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1905
1906
1907
1908
1909
1910
1911
1912
1913
			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,
1914
1915
1916
1917
1918
1919
			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,
		}),
1920
1921
	},
	[PINCTRL_PIN_48] = {
1922
		.groups = &((uint16_t []) {
1923
1924
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1925
1926
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1927
1928
1929
1930
1931
1932
1933
1934
1935
			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,
1936
1937
1938
1939
1940
1941
			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,
		}),
1942
1943
	},
	[PINCTRL_PIN_49] = {
1944
		.groups = &((uint16_t []) {
1945
1946
1947
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_PC,
1948
			PINCTRL_GRP_SDIO1_0,
1949
1950
1951
1952
1953
1954
1955
1956
1957
			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,
1958
1959
1960
1961
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_7,
			END_OF_GROUPS,
		}),
1962
1963
	},
	[PINCTRL_PIN_50] = {
1964
		.groups = &((uint16_t []) {
1965
1966
1967
			PINCTRL_GRP_GEMTSU0_1,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_WP,
1968
			PINCTRL_GRP_SDIO1_0,
1969
1970
1971
1972
1973
1974
1975
1976
1977
			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,
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
			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,
		}),
1990
1991
	},
	[PINCTRL_PIN_51] = {
1992
		.groups = &((uint16_t []) {
1993
1994
1995
			PINCTRL_GRP_GEMTSU0_2,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
1996
			PINCTRL_GRP_SDIO1_0,
1997
1998
1999
2000
2001
2002
2003
2004
2005
			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,
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
			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,
		}),
2018
2019
	},
	[PINCTRL_PIN_52] = {
2020
		.groups = &((uint16_t []) {
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
			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,
2034
2035
			END_OF_GROUPS,
		}),
2036
2037
	},
	[PINCTRL_PIN_53] = {
2038
		.groups = &((uint16_t []) {
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
			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,
2052
2053
			END_OF_GROUPS,
		}),
2054
2055
	},
	[PINCTRL_PIN_54] = {
2056
		.groups = &((uint16_t []) {
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
			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,
2070
2071
			END_OF_GROUPS,
		}),
2072
2073
	},
	[PINCTRL_PIN_55] = {
2074
		.groups = &((uint16_t []) {
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
			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,
2088
2089
			END_OF_GROUPS,
		}),
2090
2091
	},
	[PINCTRL_PIN_56] = {
2092
		.groups = &((uint16_t []) {
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
			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,
2106
2107
			END_OF_GROUPS,
		}),
2108
2109
	},
	[PINCTRL_PIN_57] = {
2110
		.groups = &((uint16_t []) {
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
			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,
2124
2125
			END_OF_GROUPS,
		}),
2126
2127
	},
	[PINCTRL_PIN_58] = {
2128
		.groups = &((uint16_t []) {
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
			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,
2142
2143
			END_OF_GROUPS,
		}),
2144
2145
	},
	[PINCTRL_PIN_59] = {
2146
		.groups = &((uint16_t []) {
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
			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,
2160
2161
			END_OF_GROUPS,
		}),
2162
2163
	},
	[PINCTRL_PIN_60] = {
2164
		.groups = &((uint16_t []) {
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
			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,
2178
2179
			END_OF_GROUPS,
		}),
2180
2181
	},
	[PINCTRL_PIN_61] = {
2182
		.groups = &((uint16_t []) {
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
			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,
2196
2197
			END_OF_GROUPS,
		}),
2198
2199
	},
	[PINCTRL_PIN_62] = {
2200
		.groups = &((uint16_t []) {
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
			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,
2214
2215
			END_OF_GROUPS,
		}),
2216
2217
	},
	[PINCTRL_PIN_63] = {
2218
		.groups = &((uint16_t []) {
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
			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,
2232
2233
			END_OF_GROUPS,
		}),
2234
2235
	},
	[PINCTRL_PIN_64] = {
2236
		.groups = &((uint16_t []) {
2237
2238
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2239
			PINCTRL_GRP_SDIO0_2,
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
			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,
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
			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,
		}),
2262
2263
	},
	[PINCTRL_PIN_65] = {
2264
		.groups = &((uint16_t []) {
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
			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,
2278
2279
			END_OF_GROUPS,
		}),
2280
2281
	},
	[PINCTRL_PIN_66] = {
2282
		.groups = &((uint16_t []) {
2283
2284
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2285
			PINCTRL_GRP_SDIO0_2,
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
			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,
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
			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,
		}),
2308
2309
	},
	[PINCTRL_PIN_67] = {
2310
		.groups = &((uint16_t []) {
2311
2312
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2313
			PINCTRL_GRP_SDIO0_2,
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
			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,
2324
2325
2326
2327
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_0,
			END_OF_GROUPS,
		}),
2328
2329
	},
	[PINCTRL_PIN_68] = {
2330
		.groups = &((uint16_t []) {
2331
2332
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2333
			PINCTRL_GRP_SDIO0_2,
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
			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,
2344
2345
2346
2347
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_1,
			END_OF_GROUPS,
		}),
2348
2349
	},
	[PINCTRL_PIN_69] = {
2350
		.groups = &((uint16_t []) {
2351
2352
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2353
			PINCTRL_GRP_SDIO0_2,
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
			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,
2364
2365
2366
2367
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_2,
			END_OF_GROUPS,
		}),
2368
2369
	},
	[PINCTRL_PIN_70] = {
2370
		.groups = &((uint16_t []) {
2371
2372
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2373
			PINCTRL_GRP_SDIO0_2,
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
			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,
2384
2385
2386
2387
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_3,
			END_OF_GROUPS,
		}),
2388
2389
	},
	[PINCTRL_PIN_71] = {
2390
		.groups = &((uint16_t []) {
2391
2392
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2393
2394
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2395
2396
2397
2398
2399
2400
2401
2402
2403
			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,
2404
2405
2406
2407
2408
2409
			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,
		}),
2410
2411
	},
	[PINCTRL_PIN_72] = {
2412
		.groups = &((uint16_t []) {
2413
2414
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2415
2416
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2417
2418
2419
2420
2421
2422
2423
2424
2425
			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,
2426
2427
2428
2429
2430
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_5,
			PINCTRL_GRP_SDIO1_1BIT_1_1,
			END_OF_GROUPS,
		}),
2431
2432
	},
	[PINCTRL_PIN_73] = {
2433
		.groups = &((uint16_t []) {
2434
2435
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2436
2437
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2438
2439
2440
2441
2442
2443
2444
2445
2446
			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,
2447
2448
2449
2450
2451
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_6,
			PINCTRL_GRP_SDIO1_1BIT_1_2,
			END_OF_GROUPS,
		}),
2452
2453
	},
	[PINCTRL_PIN_74] = {
2454
		.groups = &((uint16_t []) {
2455
2456
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2457
2458
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2459
2460
2461
2462
2463
2464
2465
2466
2467
			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,
2468
2469
2470
2471
2472
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_7,
			PINCTRL_GRP_SDIO1_1BIT_1_3,
			END_OF_GROUPS,
		}),
2473
2474
	},
	[PINCTRL_PIN_75] = {
2475
		.groups = &((uint16_t []) {
2476
2477
2478
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
			PINCTRL_GRP_SDIO0_2_PC,
2479
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2480
2481
2482
2483
2484
2485
2486
2487
2488
			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,
2489
2490
2491
2492
2493
2494
			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,
		}),
2495
2496
	},
	[PINCTRL_PIN_76] = {
2497
		.groups = &((uint16_t []) {
2498
2499
2500
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_2_WP,
2501
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2502
2503
2504
2505
2506
2507
2508
2509
2510
			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,
2511
2512
2513
2514
2515
2516
			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,
		}),
2517
2518
	},
	[PINCTRL_PIN_77] = {
2519
		.groups = &((uint16_t []) {
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
			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,
2533
2534
			END_OF_GROUPS,
		}),
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
2588
2589
	},
};

/**
 * 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;
2590
	if (grps == NULL)
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
2640
2641
		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)
{
2642
	unsigned int i;
2643
2644
2645
2646
2647
2648
2649
2650
	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;
2651
	if (grps == NULL)
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
2688
2689
		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)
{
2690
	unsigned int i;
2691
	uint16_t *grps;
2692
2693
2694
2695
2696
2697

	if (pin >= MAX_PIN)
		return PM_RET_ERROR_ARGS;

	memset(groups, END_OF_GROUPS, GROUPS_PAYLOAD_LEN);

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

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

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

	return PM_RET_SUCCESS;
}

2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
/**
 * 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,
2726
					       unsigned int *id)
2727
{
2728
2729
2730
	unsigned int i = 0, j = 0;
	enum pm_ret_status ret = PM_RET_SUCCESS;
	unsigned int ctrlreg, val, gid;
2731
	uint16_t *grps;
2732

2733
2734
2735
	ctrlreg = IOU_SLCR_BASEADDR + 4U * pin;
	ret = pm_mmio_read(ctrlreg, &val);
	if (ret != PM_RET_SUCCESS)
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
		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;

2747
	gid = *(*zynqmp_pin_groups[pin].groups + i);
2748

2749
2750
	for (i = 0; i < MAX_FUNCTION; i++) {
		grps = *pinctrl_functions[i].groups;
2751
		if (grps == NULL)
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
			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:
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
	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,
2779
					       unsigned int fid)
2780
{
2781
	int i, j;
2782
	unsigned int ctrlreg, val;
2783
	uint16_t *pgrps, *fgrps;
2784

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

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

	if (i == NFUNCS_PER_PIN)
		return PM_RET_ERROR_NOTSUPPORTED;

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

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

2803
2804
2805
2806
2807
2808
2809
2810
	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:
2811
	return pm_mmio_write(ctrlreg, PINCTRL_FUNCTION_MASK, val);
2812
}
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827

/**
 * 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)
{
2828
2829
	enum pm_ret_status ret;
	unsigned int ctrlreg, mask, val, offset;
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844

	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;

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

2856
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2857
2858
2859
2860
					      PINCTRL_PULLSTAT_REG_OFFSET,
					      pin);

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

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

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

2875
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2876
2877
2878
2879
					      PINCTRL_PULLSTAT_REG_OFFSET,
					      pin);

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

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

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

2900
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2901
2902
2903
2904
					      PINCTRL_SCHCMOS_REG_OFFSET,
					      pin);

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

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

2919
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2920
2921
					      PINCTRL_DRVSTRN1_REG_OFFSET,
					      pin);
2922
2923
		val = (value & 0x01U) << PINCTRL_PIN_OFFSET(pin);
		ret = pm_mmio_write(ctrlreg, mask, val);
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
		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)
{
2948
2949
	enum pm_ret_status ret;
	unsigned int ctrlreg, val;
2950
2951
2952
2953
2954
2955
2956
2957
2958

	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:
2959
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2960
2961
2962
					      PINCTRL_SLEWCTRL_REG_OFFSET,
					      pin);

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

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

2974
		ret = pm_mmio_read(ctrlreg, &val);
2975
2976
2977
		if (ret)
			return ret;

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

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

2985
		ctrlreg = PINCTRL_CFG_ADDR_OFFSET(IOU_SLCR_BASEADDR,
2986
2987
2988
					      PINCTRL_PULLCTRL_REG_OFFSET,
					      pin);

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

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

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

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

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

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

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

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

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

3040
	return PM_RET_SUCCESS;
3041
}