gpio.h 1.2 KB

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