1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0 */ 2074a1fddSStephen Warren /* 3074a1fddSStephen Warren * Copyright (c) 2016, NVIDIA CORPORATION. 4074a1fddSStephen Warren * 5074a1fddSStephen Warren * This header provides constants for binding nvidia,tegra186-gpio*. 6074a1fddSStephen Warren * 7074a1fddSStephen Warren * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below 8074a1fddSStephen Warren * provide names for this. 9074a1fddSStephen Warren * 10074a1fddSStephen Warren * The second cell contains standard flag values specified in gpio.h. 11074a1fddSStephen Warren */ 12074a1fddSStephen Warren 13074a1fddSStephen Warren #ifndef _DT_BINDINGS_GPIO_TEGRA186_GPIO_H 14074a1fddSStephen Warren #define _DT_BINDINGS_GPIO_TEGRA186_GPIO_H 15074a1fddSStephen Warren 16074a1fddSStephen Warren #include <dt-bindings/gpio/gpio.h> 17074a1fddSStephen Warren 18074a1fddSStephen Warren /* GPIOs implemented by main GPIO controller */ 19074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_A 0 20074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_B 1 21074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_C 2 22074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_D 3 23074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_E 4 24074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_F 5 25074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_G 6 26074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_H 7 27074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_I 8 28074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_J 9 29074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_K 10 30074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_L 11 31074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_M 12 32074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_N 13 33074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_O 14 34074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_P 15 35074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_Q 16 36074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_R 17 37074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_T 18 38074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_X 19 39074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_Y 20 40074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_BB 21 41074a1fddSStephen Warren #define TEGRA_MAIN_GPIO_PORT_CC 22 42074a1fddSStephen Warren 43074a1fddSStephen Warren #define TEGRA_MAIN_GPIO(port, offset) \ 44074a1fddSStephen Warren ((TEGRA_MAIN_GPIO_PORT_##port * 8) + offset) 45074a1fddSStephen Warren 46074a1fddSStephen Warren /* GPIOs implemented by AON GPIO controller */ 47074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_S 0 48074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_U 1 49074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_V 2 50074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_W 3 51074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_Z 4 52074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_AA 5 53074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_EE 6 54074a1fddSStephen Warren #define TEGRA_AON_GPIO_PORT_FF 7 55074a1fddSStephen Warren 56074a1fddSStephen Warren #define TEGRA_AON_GPIO(port, offset) \ 57074a1fddSStephen Warren ((TEGRA_AON_GPIO_PORT_##port * 8) + offset) 58074a1fddSStephen Warren 59074a1fddSStephen Warren #endif 60