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