gpio.h 941 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2011, Google Inc. All rights reserved.
  3. * Portions Copyright 2011-2012 NVIDIA Corporation
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _TEGRA20_GPIO_H_
  8. #define _TEGRA20_GPIO_H_
  9. /*
  10. * The Tegra 2x GPIO controller has 224 GPIOs arranged in 7 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 7 /* 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. };
  27. struct gpio_ctlr {
  28. struct gpio_ctlr_bank gpio_bank[TEGRA_GPIO_BANKS];
  29. };
  30. #endif /* TEGRA20_GPIO_H_ */