1 1.1 jmcneill /* $NetBSD: tegra-gpio.h,v 1.1.1.2 2017/11/30 19:40:51 jmcneill Exp $ */ 2 1.1 jmcneill 3 1.1.1.2 jmcneill /* SPDX-License-Identifier: GPL-2.0 */ 4 1.1 jmcneill /* 5 1.1 jmcneill * This header provides constants for binding nvidia,tegra*-gpio. 6 1.1 jmcneill * 7 1.1 jmcneill * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below 8 1.1 jmcneill * provide names for this. 9 1.1 jmcneill * 10 1.1 jmcneill * The second cell contains standard flag values specified in gpio.h. 11 1.1 jmcneill */ 12 1.1 jmcneill 13 1.1 jmcneill #ifndef _DT_BINDINGS_GPIO_TEGRA_GPIO_H 14 1.1 jmcneill #define _DT_BINDINGS_GPIO_TEGRA_GPIO_H 15 1.1 jmcneill 16 1.1 jmcneill #include <dt-bindings/gpio/gpio.h> 17 1.1 jmcneill 18 1.1 jmcneill #define TEGRA_GPIO_PORT_A 0 19 1.1 jmcneill #define TEGRA_GPIO_PORT_B 1 20 1.1 jmcneill #define TEGRA_GPIO_PORT_C 2 21 1.1 jmcneill #define TEGRA_GPIO_PORT_D 3 22 1.1 jmcneill #define TEGRA_GPIO_PORT_E 4 23 1.1 jmcneill #define TEGRA_GPIO_PORT_F 5 24 1.1 jmcneill #define TEGRA_GPIO_PORT_G 6 25 1.1 jmcneill #define TEGRA_GPIO_PORT_H 7 26 1.1 jmcneill #define TEGRA_GPIO_PORT_I 8 27 1.1 jmcneill #define TEGRA_GPIO_PORT_J 9 28 1.1 jmcneill #define TEGRA_GPIO_PORT_K 10 29 1.1 jmcneill #define TEGRA_GPIO_PORT_L 11 30 1.1 jmcneill #define TEGRA_GPIO_PORT_M 12 31 1.1 jmcneill #define TEGRA_GPIO_PORT_N 13 32 1.1 jmcneill #define TEGRA_GPIO_PORT_O 14 33 1.1 jmcneill #define TEGRA_GPIO_PORT_P 15 34 1.1 jmcneill #define TEGRA_GPIO_PORT_Q 16 35 1.1 jmcneill #define TEGRA_GPIO_PORT_R 17 36 1.1 jmcneill #define TEGRA_GPIO_PORT_S 18 37 1.1 jmcneill #define TEGRA_GPIO_PORT_T 19 38 1.1 jmcneill #define TEGRA_GPIO_PORT_U 20 39 1.1 jmcneill #define TEGRA_GPIO_PORT_V 21 40 1.1 jmcneill #define TEGRA_GPIO_PORT_W 22 41 1.1 jmcneill #define TEGRA_GPIO_PORT_X 23 42 1.1 jmcneill #define TEGRA_GPIO_PORT_Y 24 43 1.1 jmcneill #define TEGRA_GPIO_PORT_Z 25 44 1.1 jmcneill #define TEGRA_GPIO_PORT_AA 26 45 1.1 jmcneill #define TEGRA_GPIO_PORT_BB 27 46 1.1 jmcneill #define TEGRA_GPIO_PORT_CC 28 47 1.1 jmcneill #define TEGRA_GPIO_PORT_DD 29 48 1.1 jmcneill #define TEGRA_GPIO_PORT_EE 30 49 1.1 jmcneill #define TEGRA_GPIO_PORT_FF 31 50 1.1 jmcneill 51 1.1 jmcneill #define TEGRA_GPIO(port, offset) \ 52 1.1 jmcneill ((TEGRA_GPIO_PORT_##port * 8) + offset) 53 1.1 jmcneill 54 1.1 jmcneill #endif 55