pm_api_pinctrl.c 70.1 KB
Newer Older
1
/*
2
 * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
3
4
5
6
7
8
9
10
 *
 * 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
			PINCTRL_GRP_ETHERNET0_0,
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
			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,
1494
1495
			END_OF_GROUPS,
		}),
1496
1497
	},
	[PINCTRL_PIN_27] = {
1498
		.groups = &((uint16_t []) {
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
			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,
1512
1513
			END_OF_GROUPS,
		}),
1514
1515
	},
	[PINCTRL_PIN_28] = {
1516
		.groups = &((uint16_t []) {
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
			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,
1530
1531
			END_OF_GROUPS,
		}),
1532
1533
	},
	[PINCTRL_PIN_29] = {
1534
		.groups = &((uint16_t []) {
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
			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,
1548
1549
			END_OF_GROUPS,
		}),
1550
1551
	},
	[PINCTRL_PIN_30] = {
1552
		.groups = &((uint16_t []) {
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
			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,
1566
1567
			END_OF_GROUPS,
		}),
1568
1569
	},
	[PINCTRL_PIN_31] = {
1570
		.groups = &((uint16_t []) {
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
			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,
1584
1585
			END_OF_GROUPS,
		}),
1586
1587
	},
	[PINCTRL_PIN_32] = {
1588
		.groups = &((uint16_t []) {
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
			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,
1602
1603
			END_OF_GROUPS,
		}),
1604
1605
	},
	[PINCTRL_PIN_33] = {
1606
		.groups = &((uint16_t []) {
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
			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,
1620
1621
			END_OF_GROUPS,
		}),
1622
1623
	},
	[PINCTRL_PIN_34] = {
1624
		.groups = &((uint16_t []) {
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
			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,
1638
1639
			END_OF_GROUPS,
		}),
1640
1641
	},
	[PINCTRL_PIN_35] = {
1642
		.groups = &((uint16_t []) {
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
			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,
1656
1657
			END_OF_GROUPS,
		}),
1658
1659
	},
	[PINCTRL_PIN_36] = {
1660
		.groups = &((uint16_t []) {
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
			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,
1674
1675
			END_OF_GROUPS,
		}),
1676
1677
	},
	[PINCTRL_PIN_37] = {
1678
		.groups = &((uint16_t []) {
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
			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,
1692
1693
			END_OF_GROUPS,
		}),
1694
1695
	},
	[PINCTRL_PIN_38] = {
1696
		.groups = &((uint16_t []) {
1697
1698
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1699
			PINCTRL_GRP_SDIO0_1,
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
			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,
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
			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,
		}),
1722
1723
	},
	[PINCTRL_PIN_39] = {
1724
		.groups = &((uint16_t []) {
1725
1726
1727
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_CD,
1728
			PINCTRL_GRP_SDIO1_0,
1729
1730
1731
1732
1733
1734
1735
1736
1737
			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,
1738
1739
1740
1741
			PINCTRL_GRP_SDIO1_4BIT_0_0,
			PINCTRL_GRP_SDIO1_1BIT_0_0,
			END_OF_GROUPS,
		}),
1742
1743
	},
	[PINCTRL_PIN_40] = {
1744
		.groups = &((uint16_t []) {
1745
1746
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1747
1748
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1749
1750
1751
1752
1753
1754
1755
1756
1757
			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,
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
			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,
		}),
1772
1773
	},
	[PINCTRL_PIN_41] = {
1774
		.groups = &((uint16_t []) {
1775
1776
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1777
1778
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1779
1780
1781
1782
1783
1784
1785
1786
1787
			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,
1788
1789
1790
1791
1792
1793
			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,
		}),
1794
1795
	},
	[PINCTRL_PIN_42] = {
1796
		.groups = &((uint16_t []) {
1797
1798
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1799
1800
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1801
1802
1803
1804
1805
1806
1807
1808
1809
			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,
1810
1811
1812
1813
1814
1815
1816
			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,
		}),
1817
1818
	},
	[PINCTRL_PIN_43] = {
1819
		.groups = &((uint16_t []) {
1820
1821
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1822
			PINCTRL_GRP_SDIO0_1,
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
			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,
1833
1834
1835
1836
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_2,
			END_OF_GROUPS,
		}),
1837
1838
	},
	[PINCTRL_PIN_44] = {
1839
		.groups = &((uint16_t []) {
1840
1841
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1842
			PINCTRL_GRP_SDIO0_1,
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
			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,
1853
1854
1855
1856
			PINCTRL_GRP_SDIO0_4BIT_1_0,
			PINCTRL_GRP_SDIO0_1BIT_1_3,
			END_OF_GROUPS,
		}),
1857
1858
	},
	[PINCTRL_PIN_45] = {
1859
		.groups = &((uint16_t []) {
1860
1861
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1862
			PINCTRL_GRP_SDIO0_1,
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
			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,
1873
1874
1875
1876
			PINCTRL_GRP_SDIO0_4BIT_1_1,
			PINCTRL_GRP_SDIO0_1BIT_1_4,
			END_OF_GROUPS,
		}),
1877
1878
	},
	[PINCTRL_PIN_46] = {
1879
		.groups = &((uint16_t []) {
1880
1881
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1882
1883
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1884
1885
1886
1887
1888
1889
1890
1891
1892
			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,
1893
1894
1895
1896
1897
1898
			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,
		}),
1899
1900
	},
	[PINCTRL_PIN_47] = {
1901
		.groups = &((uint16_t []) {
1902
1903
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1904
1905
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1906
1907
1908
1909
1910
1911
1912
1913
1914
			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,
1915
1916
1917
1918
1919
1920
			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,
		}),
1921
1922
	},
	[PINCTRL_PIN_48] = {
1923
		.groups = &((uint16_t []) {
1924
1925
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
1926
1927
			PINCTRL_GRP_SDIO0_1,
			PINCTRL_GRP_SDIO1_0,
1928
1929
1930
1931
1932
1933
1934
1935
1936
			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,
1937
1938
1939
1940
1941
1942
			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,
		}),
1943
1944
	},
	[PINCTRL_PIN_49] = {
1945
		.groups = &((uint16_t []) {
1946
1947
1948
			PINCTRL_GRP_ETHERNET1_0,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_PC,
1949
			PINCTRL_GRP_SDIO1_0,
1950
1951
1952
1953
1954
1955
1956
1957
1958
			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,
1959
1960
1961
1962
			PINCTRL_GRP_SDIO1_4BIT_0_1,
			PINCTRL_GRP_SDIO1_1BIT_0_7,
			END_OF_GROUPS,
		}),
1963
1964
	},
	[PINCTRL_PIN_50] = {
1965
		.groups = &((uint16_t []) {
1966
1967
1968
			PINCTRL_GRP_GEMTSU0_1,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_1_WP,
1969
			PINCTRL_GRP_SDIO1_0,
1970
1971
1972
1973
1974
1975
1976
1977
1978
			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,
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
			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,
		}),
1991
1992
	},
	[PINCTRL_PIN_51] = {
1993
		.groups = &((uint16_t []) {
1994
1995
1996
			PINCTRL_GRP_GEMTSU0_2,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
1997
			PINCTRL_GRP_SDIO1_0,
1998
1999
2000
2001
2002
2003
2004
2005
2006
			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,
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
			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,
		}),
2019
2020
	},
	[PINCTRL_PIN_52] = {
2021
		.groups = &((uint16_t []) {
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
			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,
2035
2036
			END_OF_GROUPS,
		}),
2037
2038
	},
	[PINCTRL_PIN_53] = {
2039
		.groups = &((uint16_t []) {
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
			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,
2053
2054
			END_OF_GROUPS,
		}),
2055
2056
	},
	[PINCTRL_PIN_54] = {
2057
		.groups = &((uint16_t []) {
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
			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,
2071
2072
			END_OF_GROUPS,
		}),
2073
2074
	},
	[PINCTRL_PIN_55] = {
2075
		.groups = &((uint16_t []) {
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
			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,
2089
2090
			END_OF_GROUPS,
		}),
2091
2092
	},
	[PINCTRL_PIN_56] = {
2093
		.groups = &((uint16_t []) {
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
			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,
2107
2108
			END_OF_GROUPS,
		}),
2109
2110
	},
	[PINCTRL_PIN_57] = {
2111
		.groups = &((uint16_t []) {
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
			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,
2125
2126
			END_OF_GROUPS,
		}),
2127
2128
	},
	[PINCTRL_PIN_58] = {
2129
		.groups = &((uint16_t []) {
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
			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,
2143
2144
			END_OF_GROUPS,
		}),
2145
2146
	},
	[PINCTRL_PIN_59] = {
2147
		.groups = &((uint16_t []) {
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
			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,
2161
2162
			END_OF_GROUPS,
		}),
2163
2164
	},
	[PINCTRL_PIN_60] = {
2165
		.groups = &((uint16_t []) {
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
			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,
2179
2180
			END_OF_GROUPS,
		}),
2181
2182
	},
	[PINCTRL_PIN_61] = {
2183
		.groups = &((uint16_t []) {
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
			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,
2197
2198
			END_OF_GROUPS,
		}),
2199
2200
	},
	[PINCTRL_PIN_62] = {
2201
		.groups = &((uint16_t []) {
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
			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,
2215
2216
			END_OF_GROUPS,
		}),
2217
2218
	},
	[PINCTRL_PIN_63] = {
2219
		.groups = &((uint16_t []) {
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
			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,
2233
2234
			END_OF_GROUPS,
		}),
2235
2236
	},
	[PINCTRL_PIN_64] = {
2237
		.groups = &((uint16_t []) {
2238
2239
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2240
			PINCTRL_GRP_SDIO0_2,
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
			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,
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
			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,
		}),
2263
2264
	},
	[PINCTRL_PIN_65] = {
2265
		.groups = &((uint16_t []) {
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
			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,
2279
2280
			END_OF_GROUPS,
		}),
2281
2282
	},
	[PINCTRL_PIN_66] = {
2283
		.groups = &((uint16_t []) {
2284
2285
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2286
			PINCTRL_GRP_SDIO0_2,
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
			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,
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
			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,
		}),
2309
2310
	},
	[PINCTRL_PIN_67] = {
2311
		.groups = &((uint16_t []) {
2312
2313
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2314
			PINCTRL_GRP_SDIO0_2,
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
			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,
2325
2326
2327
2328
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_0,
			END_OF_GROUPS,
		}),
2329
2330
	},
	[PINCTRL_PIN_68] = {
2331
		.groups = &((uint16_t []) {
2332
2333
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2334
			PINCTRL_GRP_SDIO0_2,
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
			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,
2345
2346
2347
2348
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_1,
			END_OF_GROUPS,
		}),
2349
2350
	},
	[PINCTRL_PIN_69] = {
2351
		.groups = &((uint16_t []) {
2352
2353
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2354
			PINCTRL_GRP_SDIO0_2,
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
			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,
2365
2366
2367
2368
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_2,
			END_OF_GROUPS,
		}),
2369
2370
	},
	[PINCTRL_PIN_70] = {
2371
		.groups = &((uint16_t []) {
2372
2373
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2374
			PINCTRL_GRP_SDIO0_2,
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
			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,
2385
2386
2387
2388
			PINCTRL_GRP_SDIO0_4BIT_2_0,
			PINCTRL_GRP_SDIO0_1BIT_2_3,
			END_OF_GROUPS,
		}),
2389
2390
	},
	[PINCTRL_PIN_71] = {
2391
		.groups = &((uint16_t []) {
2392
2393
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2394
2395
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2396
2397
2398
2399
2400
2401
2402
2403
2404
			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,
2405
2406
2407
2408
2409
2410
			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,
		}),
2411
2412
	},
	[PINCTRL_PIN_72] = {
2413
		.groups = &((uint16_t []) {
2414
2415
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2416
2417
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2418
2419
2420
2421
2422
2423
2424
2425
2426
			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,
2427
2428
2429
2430
2431
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_5,
			PINCTRL_GRP_SDIO1_1BIT_1_1,
			END_OF_GROUPS,
		}),
2432
2433
	},
	[PINCTRL_PIN_73] = {
2434
		.groups = &((uint16_t []) {
2435
2436
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2437
2438
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2439
2440
2441
2442
2443
2444
2445
2446
2447
			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,
2448
2449
2450
2451
2452
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_6,
			PINCTRL_GRP_SDIO1_1BIT_1_2,
			END_OF_GROUPS,
		}),
2453
2454
	},
	[PINCTRL_PIN_74] = {
2455
		.groups = &((uint16_t []) {
2456
2457
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
2458
2459
			PINCTRL_GRP_SDIO0_2,
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2460
2461
2462
2463
2464
2465
2466
2467
2468
			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,
2469
2470
2471
2472
2473
			PINCTRL_GRP_SDIO0_4BIT_2_1,
			PINCTRL_GRP_SDIO0_1BIT_2_7,
			PINCTRL_GRP_SDIO1_1BIT_1_3,
			END_OF_GROUPS,
		}),
2474
2475
	},
	[PINCTRL_PIN_75] = {
2476
		.groups = &((uint16_t []) {
2477
2478
2479
			PINCTRL_GRP_ETHERNET3_0,
			PINCTRL_GRP_USB1_0,
			PINCTRL_GRP_SDIO0_2_PC,
2480
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2481
2482
2483
2484
2485
2486
2487
2488
2489
			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,
2490
2491
2492
2493
2494
2495
			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,
		}),
2496
2497
	},
	[PINCTRL_PIN_76] = {
2498
		.groups = &((uint16_t []) {
2499
2500
2501
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_RESERVED,
			PINCTRL_GRP_SDIO0_2_WP,
2502
			PINCTRL_GRP_SDIO1_4BIT_1_0,
2503
2504
2505
2506
2507
2508
2509
2510
2511
			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,
2512
2513
2514
2515
2516
2517
			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,
		}),
2518
2519
	},
	[PINCTRL_PIN_77] = {
2520
		.groups = &((uint16_t []) {
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
			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,
2534
2535
			END_OF_GROUPS,
		}),
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
2590
	},
};

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

	if (pin >= MAX_PIN)
		return PM_RET_ERROR_ARGS;

	memset(groups, END_OF_GROUPS, GROUPS_PAYLOAD_LEN);

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

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

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

	return PM_RET_SUCCESS;
}

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

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

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

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

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

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

	if (i == NFUNCS_PER_PIN)
		return PM_RET_ERROR_NOTSUPPORTED;

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

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

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

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

	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;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3041
	return PM_RET_SUCCESS;
3042
}