1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 26c43f6c8STom Warren /* 36c43f6c8STom Warren * (C) Copyright 2013-2015 46c43f6c8STom Warren * NVIDIA Corporation <www.nvidia.com> 56c43f6c8STom Warren */ 66c43f6c8STom Warren 76c43f6c8STom Warren #ifndef _TEGRA210_GPIO_H_ 86c43f6c8STom Warren #define _TEGRA210_GPIO_H_ 96c43f6c8STom Warren 106c43f6c8STom Warren /* 116c43f6c8STom Warren * The Tegra210 GPIO controller has 256 GPIOS in 8 banks of 4 ports, 126c43f6c8STom Warren * each with 8 GPIOs. 136c43f6c8STom Warren */ 146c43f6c8STom Warren #define TEGRA_GPIO_PORTS 4 /* number of ports per bank */ 156c43f6c8STom Warren #define TEGRA_GPIO_BANKS 8 /* number of banks */ 166c43f6c8STom Warren 176c43f6c8STom Warren #include <asm/arch-tegra/gpio.h> 186c43f6c8STom Warren 196c43f6c8STom Warren /* GPIO Controller registers for a single bank */ 206c43f6c8STom Warren struct gpio_ctlr_bank { 216c43f6c8STom Warren uint gpio_config[TEGRA_GPIO_PORTS]; 226c43f6c8STom Warren uint gpio_dir_out[TEGRA_GPIO_PORTS]; 236c43f6c8STom Warren uint gpio_out[TEGRA_GPIO_PORTS]; 246c43f6c8STom Warren uint gpio_in[TEGRA_GPIO_PORTS]; 256c43f6c8STom Warren uint gpio_int_status[TEGRA_GPIO_PORTS]; 266c43f6c8STom Warren uint gpio_int_enable[TEGRA_GPIO_PORTS]; 276c43f6c8STom Warren uint gpio_int_level[TEGRA_GPIO_PORTS]; 286c43f6c8STom Warren uint gpio_int_clear[TEGRA_GPIO_PORTS]; 296c43f6c8STom Warren uint gpio_masked_config[TEGRA_GPIO_PORTS]; 306c43f6c8STom Warren uint gpio_masked_dir_out[TEGRA_GPIO_PORTS]; 316c43f6c8STom Warren uint gpio_masked_out[TEGRA_GPIO_PORTS]; 326c43f6c8STom Warren uint gpio_masked_in[TEGRA_GPIO_PORTS]; 336c43f6c8STom Warren uint gpio_masked_int_status[TEGRA_GPIO_PORTS]; 346c43f6c8STom Warren uint gpio_masked_int_enable[TEGRA_GPIO_PORTS]; 356c43f6c8STom Warren uint gpio_masked_int_level[TEGRA_GPIO_PORTS]; 366c43f6c8STom Warren uint gpio_masked_int_clear[TEGRA_GPIO_PORTS]; 376c43f6c8STom Warren }; 386c43f6c8STom Warren 396c43f6c8STom Warren struct gpio_ctlr { 406c43f6c8STom Warren struct gpio_ctlr_bank gpio_bank[TEGRA_GPIO_BANKS]; 416c43f6c8STom Warren }; 426c43f6c8STom Warren 436c43f6c8STom Warren #endif /* _TEGRA210_GPIO_H_ */ 44