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