Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. */
0003 
0004 /*
0005  * This header provides constants for binding nvidia,tegra234-gpio*.
0006  *
0007  * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
0008  * provide names for this.
0009  *
0010  * The second cell contains standard flag values specified in gpio.h.
0011  */
0012 
0013 #ifndef _DT_BINDINGS_GPIO_TEGRA234_GPIO_H
0014 #define _DT_BINDINGS_GPIO_TEGRA234_GPIO_H
0015 
0016 #include <dt-bindings/gpio/gpio.h>
0017 
0018 /* GPIOs implemented by main GPIO controller */
0019 #define TEGRA234_MAIN_GPIO_PORT_A   0
0020 #define TEGRA234_MAIN_GPIO_PORT_B   1
0021 #define TEGRA234_MAIN_GPIO_PORT_C   2
0022 #define TEGRA234_MAIN_GPIO_PORT_D   3
0023 #define TEGRA234_MAIN_GPIO_PORT_E   4
0024 #define TEGRA234_MAIN_GPIO_PORT_F   5
0025 #define TEGRA234_MAIN_GPIO_PORT_G   6
0026 #define TEGRA234_MAIN_GPIO_PORT_H   7
0027 #define TEGRA234_MAIN_GPIO_PORT_I   8
0028 #define TEGRA234_MAIN_GPIO_PORT_J   9
0029 #define TEGRA234_MAIN_GPIO_PORT_K  10
0030 #define TEGRA234_MAIN_GPIO_PORT_L  11
0031 #define TEGRA234_MAIN_GPIO_PORT_M  12
0032 #define TEGRA234_MAIN_GPIO_PORT_N  13
0033 #define TEGRA234_MAIN_GPIO_PORT_P  14
0034 #define TEGRA234_MAIN_GPIO_PORT_Q  15
0035 #define TEGRA234_MAIN_GPIO_PORT_R  16
0036 #define TEGRA234_MAIN_GPIO_PORT_S  17
0037 #define TEGRA234_MAIN_GPIO_PORT_T  18
0038 #define TEGRA234_MAIN_GPIO_PORT_U  19
0039 #define TEGRA234_MAIN_GPIO_PORT_V  20
0040 #define TEGRA234_MAIN_GPIO_PORT_X  21
0041 #define TEGRA234_MAIN_GPIO_PORT_Y  22
0042 #define TEGRA234_MAIN_GPIO_PORT_Z  23
0043 #define TEGRA234_MAIN_GPIO_PORT_AC 24
0044 #define TEGRA234_MAIN_GPIO_PORT_AD 25
0045 #define TEGRA234_MAIN_GPIO_PORT_AE 26
0046 #define TEGRA234_MAIN_GPIO_PORT_AF 27
0047 #define TEGRA234_MAIN_GPIO_PORT_AG 28
0048 
0049 #define TEGRA234_MAIN_GPIO(port, offset) \
0050     ((TEGRA234_MAIN_GPIO_PORT_##port * 8) + offset)
0051 
0052 /* GPIOs implemented by AON GPIO controller */
0053 #define TEGRA234_AON_GPIO_PORT_AA 0
0054 #define TEGRA234_AON_GPIO_PORT_BB 1
0055 #define TEGRA234_AON_GPIO_PORT_CC 2
0056 #define TEGRA234_AON_GPIO_PORT_DD 3
0057 #define TEGRA234_AON_GPIO_PORT_EE 4
0058 #define TEGRA234_AON_GPIO_PORT_GG 5
0059 
0060 #define TEGRA234_AON_GPIO(port, offset) \
0061     ((TEGRA234_AON_GPIO_PORT_##port * 8) + offset)
0062 
0063 #endif