1*8946034aSSimon Glass /*
2*8946034aSSimon Glass  * This header provides constants for binding nvidia,tegra*-gpio.
3*8946034aSSimon Glass  *
4*8946034aSSimon Glass  * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
5*8946034aSSimon Glass  * provide names for this.
6*8946034aSSimon Glass  *
7*8946034aSSimon Glass  * The second cell contains standard flag values specified in gpio.h.
8*8946034aSSimon Glass  */
9*8946034aSSimon Glass 
10*8946034aSSimon Glass #ifndef _DT_BINDINGS_GPIO_TEGRA_GPIO_H
11*8946034aSSimon Glass #define _DT_BINDINGS_GPIO_TEGRA_GPIO_H
12*8946034aSSimon Glass 
13*8946034aSSimon Glass #include <dt-bindings/gpio/gpio.h>
14*8946034aSSimon Glass 
15*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_A 0
16*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_B 1
17*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_C 2
18*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_D 3
19*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_E 4
20*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_F 5
21*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_G 6
22*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_H 7
23*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_I 8
24*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_J 9
25*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_K 10
26*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_L 11
27*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_M 12
28*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_N 13
29*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_O 14
30*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_P 15
31*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_Q 16
32*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_R 17
33*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_S 18
34*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_T 19
35*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_U 20
36*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_V 21
37*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_W 22
38*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_X 23
39*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_Y 24
40*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_Z 25
41*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_AA 26
42*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_BB 27
43*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_CC 28
44*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_DD 29
45*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_EE 30
46*8946034aSSimon Glass #define TEGRA_GPIO_BANK_ID_FF 31
47*8946034aSSimon Glass 
48*8946034aSSimon Glass #define TEGRA_GPIO(bank, offset) \
49*8946034aSSimon Glass 	((TEGRA_GPIO_BANK_ID_##bank * 8) + offset)
50*8946034aSSimon Glass 
51*8946034aSSimon Glass #endif
52