Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. */
0003 
0004 /*
0005  * This header provides constants for binding nvidia,tegra194-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_TEGRA194_GPIO_H
0014 #define _DT_BINDINGS_GPIO_TEGRA194_GPIO_H
0015 
0016 #include <dt-bindings/gpio/gpio.h>
0017 
0018 /* GPIOs implemented by main GPIO controller */
0019 #define TEGRA194_MAIN_GPIO_PORT_A 0
0020 #define TEGRA194_MAIN_GPIO_PORT_B 1
0021 #define TEGRA194_MAIN_GPIO_PORT_C 2
0022 #define TEGRA194_MAIN_GPIO_PORT_D 3
0023 #define TEGRA194_MAIN_GPIO_PORT_E 4
0024 #define TEGRA194_MAIN_GPIO_PORT_F 5
0025 #define TEGRA194_MAIN_GPIO_PORT_G 6
0026 #define TEGRA194_MAIN_GPIO_PORT_H 7
0027 #define TEGRA194_MAIN_GPIO_PORT_I 8
0028 #define TEGRA194_MAIN_GPIO_PORT_J 9
0029 #define TEGRA194_MAIN_GPIO_PORT_K 10
0030 #define TEGRA194_MAIN_GPIO_PORT_L 11
0031 #define TEGRA194_MAIN_GPIO_PORT_M 12
0032 #define TEGRA194_MAIN_GPIO_PORT_N 13
0033 #define TEGRA194_MAIN_GPIO_PORT_O 14
0034 #define TEGRA194_MAIN_GPIO_PORT_P 15
0035 #define TEGRA194_MAIN_GPIO_PORT_Q 16
0036 #define TEGRA194_MAIN_GPIO_PORT_R 17
0037 #define TEGRA194_MAIN_GPIO_PORT_S 18
0038 #define TEGRA194_MAIN_GPIO_PORT_T 19
0039 #define TEGRA194_MAIN_GPIO_PORT_U 20
0040 #define TEGRA194_MAIN_GPIO_PORT_V 21
0041 #define TEGRA194_MAIN_GPIO_PORT_W 22
0042 #define TEGRA194_MAIN_GPIO_PORT_X 23
0043 #define TEGRA194_MAIN_GPIO_PORT_Y 24
0044 #define TEGRA194_MAIN_GPIO_PORT_Z 25
0045 #define TEGRA194_MAIN_GPIO_PORT_FF 26
0046 #define TEGRA194_MAIN_GPIO_PORT_GG 27
0047 
0048 #define TEGRA194_MAIN_GPIO(port, offset) \
0049     ((TEGRA194_MAIN_GPIO_PORT_##port * 8) + offset)
0050 
0051 /* GPIOs implemented by AON GPIO controller */
0052 #define TEGRA194_AON_GPIO_PORT_AA 0
0053 #define TEGRA194_AON_GPIO_PORT_BB 1
0054 #define TEGRA194_AON_GPIO_PORT_CC 2
0055 #define TEGRA194_AON_GPIO_PORT_DD 3
0056 #define TEGRA194_AON_GPIO_PORT_EE 4
0057 
0058 #define TEGRA194_AON_GPIO(port, offset) \
0059     ((TEGRA194_AON_GPIO_PORT_##port * 8) + offset)
0060 
0061 #endif