xref: /freebsd/sys/contrib/device-tree/include/dt-bindings/pinctrl/amlogic,pinctrl.h (revision 8ccc0d235c226d84112561d453c49904398d085c)
1*8ccc0d23SEmmanuel Vadot /* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
2*8ccc0d23SEmmanuel Vadot /*
3*8ccc0d23SEmmanuel Vadot  * Copyright (c) 2024 Amlogic, Inc. All rights reserved.
4*8ccc0d23SEmmanuel Vadot  * Author: Xianwei Zhao <xianwei.zhao@amlogic.com>
5*8ccc0d23SEmmanuel Vadot  */
6*8ccc0d23SEmmanuel Vadot 
7*8ccc0d23SEmmanuel Vadot #ifndef _DT_BINDINGS_AMLOGIC_PINCTRL_H
8*8ccc0d23SEmmanuel Vadot #define _DT_BINDINGS_AMLOGIC_PINCTRL_H
9*8ccc0d23SEmmanuel Vadot /* Normal PIN bank */
10*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_A		0
11*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_B		1
12*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_C		2
13*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_D		3
14*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_E		4
15*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_F		5
16*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_G		6
17*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_H		7
18*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_I		8
19*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_J		9
20*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_K		10
21*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_L		11
22*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_M		12
23*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_N		13
24*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_O		14
25*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_P		15
26*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_Q		16
27*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_R		17
28*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_S		18
29*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_T		19
30*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_U		20
31*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_V		21
32*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_W		22
33*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_X		23
34*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_Y		24
35*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_Z		25
36*8ccc0d23SEmmanuel Vadot 
37*8ccc0d23SEmmanuel Vadot /* Special PIN bank */
38*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_DV		26
39*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_AO		27
40*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_CC		28
41*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_TEST_N	29
42*8ccc0d23SEmmanuel Vadot #define AMLOGIC_GPIO_ANALOG	30
43*8ccc0d23SEmmanuel Vadot 
44*8ccc0d23SEmmanuel Vadot #define AML_PINMUX(bank, offset, mode)	(((((bank) << 8) + (offset)) << 8) | (mode))
45*8ccc0d23SEmmanuel Vadot 
46*8ccc0d23SEmmanuel Vadot #endif /* _DT_BINDINGS_AMLOGIC_PINCTRL_H */
47