nvidia,tegra264-gpio.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
  2. /* Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. */
  3. /*
  4. * This header provides constants for binding nvidia,tegra264-gpio*.
  5. *
  6. * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
  7. * provide names for this.
  8. *
  9. * The second cell contains standard flag values specified in gpio.h.
  10. */
  11. #ifndef _DT_BINDINGS_GPIO_TEGRA264_GPIO_H
  12. #define _DT_BINDINGS_GPIO_TEGRA264_GPIO_H
  13. #include <dt-bindings/gpio/gpio.h>
  14. /* GPIOs implemented by main GPIO controller */
  15. #define TEGRA264_MAIN_GPIO_PORT_T 0
  16. #define TEGRA264_MAIN_GPIO_PORT_U 1
  17. #define TEGRA264_MAIN_GPIO_PORT_V 2
  18. #define TEGRA264_MAIN_GPIO_PORT_W 3
  19. #define TEGRA264_MAIN_GPIO_PORT_AL 4
  20. #define TEGRA264_MAIN_GPIO_PORT_Y 5
  21. #define TEGRA264_MAIN_GPIO_PORT_Z 6
  22. #define TEGRA264_MAIN_GPIO_PORT_X 7
  23. #define TEGRA264_MAIN_GPIO_PORT_H 8
  24. #define TEGRA264_MAIN_GPIO_PORT_J 9
  25. #define TEGRA264_MAIN_GPIO_PORT_K 10
  26. #define TEGRA264_MAIN_GPIO_PORT_L 11
  27. #define TEGRA264_MAIN_GPIO_PORT_M 12
  28. #define TEGRA264_MAIN_GPIO_PORT_P 13
  29. #define TEGRA264_MAIN_GPIO_PORT_Q 14
  30. #define TEGRA264_MAIN_GPIO_PORT_R 15
  31. #define TEGRA264_MAIN_GPIO_PORT_S 16
  32. #define TEGRA264_MAIN_GPIO_PORT_F 17
  33. #define TEGRA264_MAIN_GPIO_PORT_G 18
  34. #define TEGRA264_MAIN_GPIO(port, offset) \
  35. ((TEGRA264_MAIN_GPIO_PORT_##port * 8) + (offset))
  36. /* GPIOs implemented by AON GPIO controller */
  37. #define TEGRA264_AON_GPIO_PORT_AA 0
  38. #define TEGRA264_AON_GPIO_PORT_BB 1
  39. #define TEGRA264_AON_GPIO_PORT_CC 2
  40. #define TEGRA264_AON_GPIO_PORT_DD 3
  41. #define TEGRA264_AON_GPIO_PORT_EE 4
  42. #define TEGRA264_AON_GPIO(port, offset) \
  43. ((TEGRA264_AON_GPIO_PORT_##port * 8) + (offset))
  44. #define TEGRA264_UPHY_GPIO_PORT_A 0
  45. #define TEGRA264_UPHY_GPIO_PORT_B 1
  46. #define TEGRA264_UPHY_GPIO_PORT_C 2
  47. #define TEGRA264_UPHY_GPIO_PORT_D 3
  48. #define TEGRA264_UPHY_GPIO_PORT_E 4
  49. #define TEGRA264_UPHY_GPIO(port, offset) \
  50. ((TEGRA264_UPHY_GPIO_PORT_##port * 8) + (offset))
  51. #endif