gpio.h 1.2 KB

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