xref: /linux/include/dt-bindings/gpio/nvidia,tegra264-gpio.h (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
1*b565717eSPrathamesh Shete /* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
2*b565717eSPrathamesh Shete /* Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. */
3*b565717eSPrathamesh Shete 
4*b565717eSPrathamesh Shete /*
5*b565717eSPrathamesh Shete  * This header provides constants for binding nvidia,tegra264-gpio*.
6*b565717eSPrathamesh Shete  *
7*b565717eSPrathamesh Shete  * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
8*b565717eSPrathamesh Shete  * provide names for this.
9*b565717eSPrathamesh Shete  *
10*b565717eSPrathamesh Shete  * The second cell contains standard flag values specified in gpio.h.
11*b565717eSPrathamesh Shete  */
12*b565717eSPrathamesh Shete 
13*b565717eSPrathamesh Shete #ifndef _DT_BINDINGS_GPIO_TEGRA264_GPIO_H
14*b565717eSPrathamesh Shete #define _DT_BINDINGS_GPIO_TEGRA264_GPIO_H
15*b565717eSPrathamesh Shete 
16*b565717eSPrathamesh Shete #include <dt-bindings/gpio/gpio.h>
17*b565717eSPrathamesh Shete 
18*b565717eSPrathamesh Shete /* GPIOs implemented by main GPIO controller */
19*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_T  0
20*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_U  1
21*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_V  2
22*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_W  3
23*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_AL 4
24*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_Y  5
25*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_Z  6
26*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_X  7
27*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_H  8
28*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_J  9
29*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_K  10
30*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_L  11
31*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_M  12
32*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_P  13
33*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_Q  14
34*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_R  15
35*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_S  16
36*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_F  17
37*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO_PORT_G  18
38*b565717eSPrathamesh Shete 
39*b565717eSPrathamesh Shete #define TEGRA264_MAIN_GPIO(port, offset) \
40*b565717eSPrathamesh Shete 	((TEGRA264_MAIN_GPIO_PORT_##port * 8) + (offset))
41*b565717eSPrathamesh Shete 
42*b565717eSPrathamesh Shete /* GPIOs implemented by AON GPIO controller */
43*b565717eSPrathamesh Shete #define TEGRA264_AON_GPIO_PORT_AA  0
44*b565717eSPrathamesh Shete #define TEGRA264_AON_GPIO_PORT_BB  1
45*b565717eSPrathamesh Shete #define TEGRA264_AON_GPIO_PORT_CC  2
46*b565717eSPrathamesh Shete #define TEGRA264_AON_GPIO_PORT_DD  3
47*b565717eSPrathamesh Shete #define TEGRA264_AON_GPIO_PORT_EE  4
48*b565717eSPrathamesh Shete 
49*b565717eSPrathamesh Shete #define TEGRA264_AON_GPIO(port, offset) \
50*b565717eSPrathamesh Shete 	((TEGRA264_AON_GPIO_PORT_##port * 8) + (offset))
51*b565717eSPrathamesh Shete 
52*b565717eSPrathamesh Shete #define TEGRA264_UPHY_GPIO_PORT_A  0
53*b565717eSPrathamesh Shete #define TEGRA264_UPHY_GPIO_PORT_B  1
54*b565717eSPrathamesh Shete #define TEGRA264_UPHY_GPIO_PORT_C  2
55*b565717eSPrathamesh Shete #define TEGRA264_UPHY_GPIO_PORT_D  3
56*b565717eSPrathamesh Shete #define TEGRA264_UPHY_GPIO_PORT_E  4
57*b565717eSPrathamesh Shete 
58*b565717eSPrathamesh Shete #define TEGRA264_UPHY_GPIO(port, offset) \
59*b565717eSPrathamesh Shete 	((TEGRA264_UPHY_GPIO_PORT_##port * 8) + (offset))
60*b565717eSPrathamesh Shete 
61*b565717eSPrathamesh Shete #endif
62