pm_api_pinctrl.h 16.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * 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.
 */

#ifndef _PM_API_PINCTRL_H_
#define _PM_API_PINCTRL_H_

#include "pm_common.h"

16
17
18
#define FUNCTION_NAME_LEN		U(16)
#define GROUPS_PAYLOAD_LEN		U(12)
#define NUM_GROUPS_PER_RESP		U(6)
19
20
21
22
#define END_OF_FUNCTION			"END_OF_FUNCTION"
#define END_OF_GROUPS			-1
#define PINCTRL_GRP_RESERVED		-2

23
24
//pinctrl function ids
enum {
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
	PINCTRL_FUNC_CAN0,
	PINCTRL_FUNC_CAN1,
	PINCTRL_FUNC_ETHERNET0,
	PINCTRL_FUNC_ETHERNET1,
	PINCTRL_FUNC_ETHERNET2,
	PINCTRL_FUNC_ETHERNET3,
	PINCTRL_FUNC_GEMTSU0,
	PINCTRL_FUNC_GPIO0,
	PINCTRL_FUNC_I2C0,
	PINCTRL_FUNC_I2C1,
	PINCTRL_FUNC_MDIO0,
	PINCTRL_FUNC_MDIO1,
	PINCTRL_FUNC_MDIO2,
	PINCTRL_FUNC_MDIO3,
	PINCTRL_FUNC_QSPI0,
	PINCTRL_FUNC_QSPI_FBCLK,
	PINCTRL_FUNC_QSPI_SS,
	PINCTRL_FUNC_SPI0,
	PINCTRL_FUNC_SPI1,
	PINCTRL_FUNC_SPI0_SS,
	PINCTRL_FUNC_SPI1_SS,
	PINCTRL_FUNC_SDIO0,
	PINCTRL_FUNC_SDIO0_PC,
	PINCTRL_FUNC_SDIO0_CD,
	PINCTRL_FUNC_SDIO0_WP,
	PINCTRL_FUNC_SDIO1,
	PINCTRL_FUNC_SDIO1_PC,
	PINCTRL_FUNC_SDIO1_CD,
	PINCTRL_FUNC_SDIO1_WP,
	PINCTRL_FUNC_NAND0,
	PINCTRL_FUNC_NAND0_CE,
	PINCTRL_FUNC_NAND0_RB,
	PINCTRL_FUNC_NAND0_DQS,
	PINCTRL_FUNC_TTC0_CLK,
	PINCTRL_FUNC_TTC0_WAV,
	PINCTRL_FUNC_TTC1_CLK,
	PINCTRL_FUNC_TTC1_WAV,
	PINCTRL_FUNC_TTC2_CLK,
	PINCTRL_FUNC_TTC2_WAV,
	PINCTRL_FUNC_TTC3_CLK,
	PINCTRL_FUNC_TTC3_WAV,
	PINCTRL_FUNC_UART0,
	PINCTRL_FUNC_UART1,
	PINCTRL_FUNC_USB0,
	PINCTRL_FUNC_USB1,
	PINCTRL_FUNC_SWDT0_CLK,
	PINCTRL_FUNC_SWDT0_RST,
	PINCTRL_FUNC_SWDT1_CLK,
	PINCTRL_FUNC_SWDT1_RST,
	PINCTRL_FUNC_PMU0,
	PINCTRL_FUNC_PCIE0,
	PINCTRL_FUNC_CSU0,
	PINCTRL_FUNC_DPAUX0,
	PINCTRL_FUNC_PJTAG0,
	PINCTRL_FUNC_TRACE0,
	PINCTRL_FUNC_TRACE0_CLK,
	PINCTRL_FUNC_TESTSCAN0,
82
	END_FUNCTION,
83
84
};

85
86
87
88
#define MAX_FUNCTION (unsigned int)(END_FUNCTION)

// pinctrl pin numbers
enum {
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
	PINCTRL_PIN_0,
	PINCTRL_PIN_1,
	PINCTRL_PIN_2,
	PINCTRL_PIN_3,
	PINCTRL_PIN_4,
	PINCTRL_PIN_5,
	PINCTRL_PIN_6,
	PINCTRL_PIN_7,
	PINCTRL_PIN_8,
	PINCTRL_PIN_9,
	PINCTRL_PIN_10,
	PINCTRL_PIN_11,
	PINCTRL_PIN_12,
	PINCTRL_PIN_13,
	PINCTRL_PIN_14,
	PINCTRL_PIN_15,
	PINCTRL_PIN_16,
	PINCTRL_PIN_17,
	PINCTRL_PIN_18,
	PINCTRL_PIN_19,
	PINCTRL_PIN_20,
	PINCTRL_PIN_21,
	PINCTRL_PIN_22,
	PINCTRL_PIN_23,
	PINCTRL_PIN_24,
	PINCTRL_PIN_25,
	PINCTRL_PIN_26,
	PINCTRL_PIN_27,
	PINCTRL_PIN_28,
	PINCTRL_PIN_29,
	PINCTRL_PIN_30,
	PINCTRL_PIN_31,
	PINCTRL_PIN_32,
	PINCTRL_PIN_33,
	PINCTRL_PIN_34,
	PINCTRL_PIN_35,
	PINCTRL_PIN_36,
	PINCTRL_PIN_37,
	PINCTRL_PIN_38,
	PINCTRL_PIN_39,
	PINCTRL_PIN_40,
	PINCTRL_PIN_41,
	PINCTRL_PIN_42,
	PINCTRL_PIN_43,
	PINCTRL_PIN_44,
	PINCTRL_PIN_45,
	PINCTRL_PIN_46,
	PINCTRL_PIN_47,
	PINCTRL_PIN_48,
	PINCTRL_PIN_49,
	PINCTRL_PIN_50,
	PINCTRL_PIN_51,
	PINCTRL_PIN_52,
	PINCTRL_PIN_53,
	PINCTRL_PIN_54,
	PINCTRL_PIN_55,
	PINCTRL_PIN_56,
	PINCTRL_PIN_57,
	PINCTRL_PIN_58,
	PINCTRL_PIN_59,
	PINCTRL_PIN_60,
	PINCTRL_PIN_61,
	PINCTRL_PIN_62,
	PINCTRL_PIN_63,
	PINCTRL_PIN_64,
	PINCTRL_PIN_65,
	PINCTRL_PIN_66,
	PINCTRL_PIN_67,
	PINCTRL_PIN_68,
	PINCTRL_PIN_69,
	PINCTRL_PIN_70,
	PINCTRL_PIN_71,
	PINCTRL_PIN_72,
	PINCTRL_PIN_73,
	PINCTRL_PIN_74,
	PINCTRL_PIN_75,
	PINCTRL_PIN_76,
	PINCTRL_PIN_77,
167
	END_PINS,
168
169
};

170
171
172
173
#define MAX_PIN (unsigned int)(END_PINS)

// pinctrl group ids
enum  {
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
	PINCTRL_GRP_ETHERNET0_0,
	PINCTRL_GRP_ETHERNET1_0,
	PINCTRL_GRP_ETHERNET2_0,
	PINCTRL_GRP_ETHERNET3_0,
	PINCTRL_GRP_GEMTSU0_0,
	PINCTRL_GRP_GEMTSU0_1,
	PINCTRL_GRP_GEMTSU0_2,
	PINCTRL_GRP_MDIO0_0,
	PINCTRL_GRP_MDIO1_0,
	PINCTRL_GRP_MDIO1_1,
	PINCTRL_GRP_MDIO2_0,
	PINCTRL_GRP_MDIO3_0,
	PINCTRL_GRP_QSPI0_0,
	PINCTRL_GRP_QSPI_SS,
	PINCTRL_GRP_QSPI_FBCLK,
	PINCTRL_GRP_SPI0_0,
	PINCTRL_GRP_SPI0_0_SS0,
	PINCTRL_GRP_SPI0_0_SS1,
	PINCTRL_GRP_SPI0_0_SS2,
	PINCTRL_GRP_SPI0_1,
	PINCTRL_GRP_SPI0_1_SS0,
	PINCTRL_GRP_SPI0_1_SS1,
	PINCTRL_GRP_SPI0_1_SS2,
	PINCTRL_GRP_SPI0_2,
	PINCTRL_GRP_SPI0_2_SS0,
	PINCTRL_GRP_SPI0_2_SS1,
	PINCTRL_GRP_SPI0_2_SS2,
	PINCTRL_GRP_SPI0_3,
	PINCTRL_GRP_SPI0_3_SS0,
	PINCTRL_GRP_SPI0_3_SS1,
	PINCTRL_GRP_SPI0_3_SS2,
	PINCTRL_GRP_SPI0_4,
	PINCTRL_GRP_SPI0_4_SS0,
	PINCTRL_GRP_SPI0_4_SS1,
	PINCTRL_GRP_SPI0_4_SS2,
	PINCTRL_GRP_SPI0_5,
	PINCTRL_GRP_SPI0_5_SS0,
	PINCTRL_GRP_SPI0_5_SS1,
	PINCTRL_GRP_SPI0_5_SS2,
	PINCTRL_GRP_SPI1_0,
	PINCTRL_GRP_SPI1_0_SS0,
	PINCTRL_GRP_SPI1_0_SS1,
	PINCTRL_GRP_SPI1_0_SS2,
	PINCTRL_GRP_SPI1_1,
	PINCTRL_GRP_SPI1_1_SS0,
	PINCTRL_GRP_SPI1_1_SS1,
	PINCTRL_GRP_SPI1_1_SS2,
	PINCTRL_GRP_SPI1_2,
	PINCTRL_GRP_SPI1_2_SS0,
	PINCTRL_GRP_SPI1_2_SS1,
	PINCTRL_GRP_SPI1_2_SS2,
	PINCTRL_GRP_SPI1_3,
	PINCTRL_GRP_SPI1_3_SS0,
	PINCTRL_GRP_SPI1_3_SS1,
	PINCTRL_GRP_SPI1_3_SS2,
	PINCTRL_GRP_SPI1_4,
	PINCTRL_GRP_SPI1_4_SS0,
	PINCTRL_GRP_SPI1_4_SS1,
	PINCTRL_GRP_SPI1_4_SS2,
	PINCTRL_GRP_SPI1_5,
	PINCTRL_GRP_SPI1_5_SS0,
	PINCTRL_GRP_SPI1_5_SS1,
	PINCTRL_GRP_SPI1_5_SS2,
	PINCTRL_GRP_SDIO0_0,
238
239
	PINCTRL_GRP_SDIO0_1,
	PINCTRL_GRP_SDIO0_2,
240
241
	PINCTRL_GRP_SDIO0_4BIT_0_0,
	PINCTRL_GRP_SDIO0_4BIT_0_1,
242
243
244
245
	PINCTRL_GRP_SDIO0_4BIT_1_0,
	PINCTRL_GRP_SDIO0_4BIT_1_1,
	PINCTRL_GRP_SDIO0_4BIT_2_0,
	PINCTRL_GRP_SDIO0_4BIT_2_1,
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
	PINCTRL_GRP_SDIO0_1BIT_0_0,
	PINCTRL_GRP_SDIO0_1BIT_0_1,
	PINCTRL_GRP_SDIO0_1BIT_0_2,
	PINCTRL_GRP_SDIO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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,
295
296
297
	PINCTRL_GRP_SDIO1_0_PC,
	PINCTRL_GRP_SDIO1_0_CD,
	PINCTRL_GRP_SDIO1_0_WP,
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
	PINCTRL_GRP_SDIO1_1_PC,
	PINCTRL_GRP_SDIO1_1_CD,
	PINCTRL_GRP_SDIO1_1_WP,
	PINCTRL_GRP_NAND0_0,
	PINCTRL_GRP_NAND0_0_CE,
	PINCTRL_GRP_NAND0_0_RB,
	PINCTRL_GRP_NAND0_0_DQS,
	PINCTRL_GRP_NAND0_1_CE,
	PINCTRL_GRP_NAND0_1_RB,
	PINCTRL_GRP_NAND0_1_DQS,
	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,
	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,
	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,
	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,
	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,
	PIN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E0_1,
	PINCTRL_GRP_TRACE0_1_CLK,
	PINCTRL_GRP_TRACE0_2,
	PINCTRL_GRP_TRACE0_2_CLK,
	PINCTRL_GRP_TESTSCAN0_0,
};

679
680
// pinctrl config parameters
enum {
681
682
683
684
685
686
687
688
689
	PINCTRL_CONFIG_SLEW_RATE,
	PINCTRL_CONFIG_BIAS_STATUS,
	PINCTRL_CONFIG_PULL_CTRL,
	PINCTRL_CONFIG_SCHMITT_CMOS,
	PINCTRL_CONFIG_DRIVE_STRENGTH,
	PINCTRL_CONFIG_VOLTAGE_STATUS,
	PINCTRL_CONFIG_MAX,
};

690
691
692
// pinctrl slew rate
#define	PINCTRL_SLEW_RATE_FAST 0U
#define	PINCTRL_SLEW_RATE_SLOW 1U
693

694
695
696
// pinctrl bias status
#define	PINCTRL_BIAS_DISABLE 0U
#define	PINCTRL_BIAS_ENABLE 1U
697

698
699
700
// pinctrl pull control
#define	PINCTRL_BIAS_PULL_DOWN 0U
#define	PINCTRL_BIAS_PULL_UP 1U
701

702
703
704
// pinctrl schmitt cmos type
#define PINCTRL_INPUT_TYPE_CMOS 0U
#define	PINCTRL_INPUT_TYPE_SCHMITT 1U
705

706
707
708
709
710
//pinctrl drive strength values
#define	PINCTRL_DRIVE_STRENGTH_2MA 0U
#define	PINCTRL_DRIVE_STRENGTH_4MA 1U
#define	PINCTRL_DRIVE_STRENGTH_8MA 2U
#define	PINCTRL_DRIVE_STRENGTH_12MA 3U
711

712
enum pm_ret_status pm_api_pinctrl_set_function(unsigned int pin,
713
					       unsigned int fid);
714
enum pm_ret_status pm_api_pinctrl_get_function(unsigned int pin,
715
					       unsigned int *id);
716
717
718
719
720
721
enum pm_ret_status pm_api_pinctrl_set_config(unsigned int pin,
					     unsigned int param,
					     unsigned int value);
enum pm_ret_status pm_api_pinctrl_get_config(unsigned int pin,
					     unsigned int param,
					     unsigned int *value);
722
723
724
725
726
727
728
729
730
731
732
733
enum pm_ret_status pm_api_pinctrl_get_function_name(unsigned int fid,
						    char *name);
enum pm_ret_status pm_api_pinctrl_get_function_groups(unsigned int fid,
						      unsigned int index,
						      uint16_t *groups);
enum pm_ret_status pm_api_pinctrl_get_pin_groups(unsigned int pin,
						 unsigned int index,
						 uint16_t *groups);
enum pm_ret_status pm_api_pinctrl_get_num_pins(unsigned int *npins);
enum pm_ret_status pm_api_pinctrl_get_num_functions(unsigned int *nfuncs);
enum pm_ret_status pm_api_pinctrl_get_num_func_groups(unsigned int fid,
						      unsigned int *ngroups);
734
#endif /* _PM_API_PINCTRL_H_ */