1c66ec88fSEmmanuel Vadot /* SPDX-License-Identifier: GPL-2.0 */ 2c66ec88fSEmmanuel Vadot /* 3c66ec88fSEmmanuel Vadot * This header provides constants for binding nvidia,tegra186-gpio*. 4c66ec88fSEmmanuel Vadot * 5c66ec88fSEmmanuel Vadot * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below 6c66ec88fSEmmanuel Vadot * provide names for this. 7c66ec88fSEmmanuel Vadot * 8c66ec88fSEmmanuel Vadot * The second cell contains standard flag values specified in gpio.h. 9c66ec88fSEmmanuel Vadot */ 10c66ec88fSEmmanuel Vadot 11*5def4c47SEmmanuel Vadot #ifndef _DT_BINDINGS_GPIO_TEGRA186_GPIO_H 12*5def4c47SEmmanuel Vadot #define _DT_BINDINGS_GPIO_TEGRA186_GPIO_H 13c66ec88fSEmmanuel Vadot 14c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel Vadot /* GPIOs implemented by main GPIO controller */ 17c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_A 0 18c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_B 1 19c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_C 2 20c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_D 3 21c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_E 4 22c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_F 5 23c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_G 6 24c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_H 7 25c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_I 8 26c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_J 9 27c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_K 10 28c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_L 11 29c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_M 12 30c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_N 13 31c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_O 14 32c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_P 15 33c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_Q 16 34c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_R 17 35c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_T 18 36c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_X 19 37c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_Y 20 38c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_BB 21 39c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO_PORT_CC 22 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot #define TEGRA186_MAIN_GPIO(port, offset) \ 42c66ec88fSEmmanuel Vadot ((TEGRA186_MAIN_GPIO_PORT_##port * 8) + offset) 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadot /* GPIOs implemented by AON GPIO controller */ 45c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_S 0 46c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_U 1 47c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_V 2 48c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_W 3 49c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_Z 4 50c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_AA 5 51c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_EE 6 52c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO_PORT_FF 7 53c66ec88fSEmmanuel Vadot 54c66ec88fSEmmanuel Vadot #define TEGRA186_AON_GPIO(port, offset) \ 55c66ec88fSEmmanuel Vadot ((TEGRA186_AON_GPIO_PORT_##port * 8) + offset) 56c66ec88fSEmmanuel Vadot 57c66ec88fSEmmanuel Vadot #endif 58