tegra256-gpio.h 788 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. */
  3. /*
  4. * This header provides constants for the nvidia,tegra256-gpio DT binding.
  5. *
  6. * The first cell in Tegra's GPIO specifier is the GPIO ID.
  7. * The macros below provide names for this.
  8. *
  9. * The second cell contains standard flag values specified in gpio.h.
  10. */
  11. #ifndef _DT_BINDINGS_GPIO_TEGRA256_GPIO_H
  12. #define _DT_BINDINGS_GPIO_TEGRA256_GPIO_H
  13. #include <dt-bindings/gpio/gpio.h>
  14. /* GPIOs implemented by main GPIO controller */
  15. #define TEGRA256_MAIN_GPIO_PORT_A 0
  16. #define TEGRA256_MAIN_GPIO_PORT_B 1
  17. #define TEGRA256_MAIN_GPIO_PORT_C 2
  18. #define TEGRA256_MAIN_GPIO_PORT_D 3
  19. #define TEGRA256_MAIN_GPIO(port, offset) \
  20. ((TEGRA256_MAIN_GPIO_PORT_##port * 8) + (offset))
  21. #endif