Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * This header provides constants for binding nvidia,tegra*-gpio.
0004  *
0005  * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
0006  * provide names for this.
0007  *
0008  * The second cell contains standard flag values specified in gpio.h.
0009  */
0010 
0011 #ifndef _DT_BINDINGS_GPIO_TEGRA_GPIO_H
0012 #define _DT_BINDINGS_GPIO_TEGRA_GPIO_H
0013 
0014 #include <dt-bindings/gpio/gpio.h>
0015 
0016 #define TEGRA_GPIO_PORT_A 0
0017 #define TEGRA_GPIO_PORT_B 1
0018 #define TEGRA_GPIO_PORT_C 2
0019 #define TEGRA_GPIO_PORT_D 3
0020 #define TEGRA_GPIO_PORT_E 4
0021 #define TEGRA_GPIO_PORT_F 5
0022 #define TEGRA_GPIO_PORT_G 6
0023 #define TEGRA_GPIO_PORT_H 7
0024 #define TEGRA_GPIO_PORT_I 8
0025 #define TEGRA_GPIO_PORT_J 9
0026 #define TEGRA_GPIO_PORT_K 10
0027 #define TEGRA_GPIO_PORT_L 11
0028 #define TEGRA_GPIO_PORT_M 12
0029 #define TEGRA_GPIO_PORT_N 13
0030 #define TEGRA_GPIO_PORT_O 14
0031 #define TEGRA_GPIO_PORT_P 15
0032 #define TEGRA_GPIO_PORT_Q 16
0033 #define TEGRA_GPIO_PORT_R 17
0034 #define TEGRA_GPIO_PORT_S 18
0035 #define TEGRA_GPIO_PORT_T 19
0036 #define TEGRA_GPIO_PORT_U 20
0037 #define TEGRA_GPIO_PORT_V 21
0038 #define TEGRA_GPIO_PORT_W 22
0039 #define TEGRA_GPIO_PORT_X 23
0040 #define TEGRA_GPIO_PORT_Y 24
0041 #define TEGRA_GPIO_PORT_Z 25
0042 #define TEGRA_GPIO_PORT_AA 26
0043 #define TEGRA_GPIO_PORT_BB 27
0044 #define TEGRA_GPIO_PORT_CC 28
0045 #define TEGRA_GPIO_PORT_DD 29
0046 #define TEGRA_GPIO_PORT_EE 30
0047 #define TEGRA_GPIO_PORT_FF 31
0048 
0049 #define TEGRA_GPIO(port, offset) \
0050     ((TEGRA_GPIO_PORT_##port * 8) + offset)
0051 
0052 #endif