1*6c43f6c8STom Warren /* 2*6c43f6c8STom Warren * (C) Copyright 2013-2015 3*6c43f6c8STom Warren * NVIDIA Corporation <www.nvidia.com> 4*6c43f6c8STom Warren * 5*6c43f6c8STom Warren * SPDX-License-Identifier: GPL-2.0+ 6*6c43f6c8STom Warren */ 7*6c43f6c8STom Warren 8*6c43f6c8STom Warren #ifndef _TEGRA210_GPIO_H_ 9*6c43f6c8STom Warren #define _TEGRA210_GPIO_H_ 10*6c43f6c8STom Warren 11*6c43f6c8STom Warren /* 12*6c43f6c8STom Warren * The Tegra210 GPIO controller has 256 GPIOS in 8 banks of 4 ports, 13*6c43f6c8STom Warren * each with 8 GPIOs. 14*6c43f6c8STom Warren */ 15*6c43f6c8STom Warren #define TEGRA_GPIO_PORTS 4 /* number of ports per bank */ 16*6c43f6c8STom Warren #define TEGRA_GPIO_BANKS 8 /* number of banks */ 17*6c43f6c8STom Warren 18*6c43f6c8STom Warren #include <asm/arch-tegra/gpio.h> 19*6c43f6c8STom Warren 20*6c43f6c8STom Warren /* GPIO Controller registers for a single bank */ 21*6c43f6c8STom Warren struct gpio_ctlr_bank { 22*6c43f6c8STom Warren uint gpio_config[TEGRA_GPIO_PORTS]; 23*6c43f6c8STom Warren uint gpio_dir_out[TEGRA_GPIO_PORTS]; 24*6c43f6c8STom Warren uint gpio_out[TEGRA_GPIO_PORTS]; 25*6c43f6c8STom Warren uint gpio_in[TEGRA_GPIO_PORTS]; 26*6c43f6c8STom Warren uint gpio_int_status[TEGRA_GPIO_PORTS]; 27*6c43f6c8STom Warren uint gpio_int_enable[TEGRA_GPIO_PORTS]; 28*6c43f6c8STom Warren uint gpio_int_level[TEGRA_GPIO_PORTS]; 29*6c43f6c8STom Warren uint gpio_int_clear[TEGRA_GPIO_PORTS]; 30*6c43f6c8STom Warren uint gpio_masked_config[TEGRA_GPIO_PORTS]; 31*6c43f6c8STom Warren uint gpio_masked_dir_out[TEGRA_GPIO_PORTS]; 32*6c43f6c8STom Warren uint gpio_masked_out[TEGRA_GPIO_PORTS]; 33*6c43f6c8STom Warren uint gpio_masked_in[TEGRA_GPIO_PORTS]; 34*6c43f6c8STom Warren uint gpio_masked_int_status[TEGRA_GPIO_PORTS]; 35*6c43f6c8STom Warren uint gpio_masked_int_enable[TEGRA_GPIO_PORTS]; 36*6c43f6c8STom Warren uint gpio_masked_int_level[TEGRA_GPIO_PORTS]; 37*6c43f6c8STom Warren uint gpio_masked_int_clear[TEGRA_GPIO_PORTS]; 38*6c43f6c8STom Warren }; 39*6c43f6c8STom Warren 40*6c43f6c8STom Warren struct gpio_ctlr { 41*6c43f6c8STom Warren struct gpio_ctlr_bank gpio_bank[TEGRA_GPIO_BANKS]; 42*6c43f6c8STom Warren }; 43*6c43f6c8STom Warren 44*6c43f6c8STom Warren #endif /* _TEGRA210_GPIO_H_ */ 45