/board/exmeritus/hww1u1a/gpios.h

https://gitlab.com/veo-labs/u-boot · C Header · 56 lines · 41 code · 6 blank · 9 comment · 0 complexity · a9bb0cf03810ab6c7f62167cff7fb930 MD5 · raw file

  1. /*
  2. * Copyright 2010 eXMeritus, A Boeing Company
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <asm/mpc85xx_gpio.h>
  7. /* Common CPU A/B GPIOs (GPIO8-GPIO15 and IRQ4-IRQ6) */
  8. #define GPIO_CPU_ID (1UL << (31 - 8))
  9. #define GPIO_BLUE_LED (1UL << (31 - 9))
  10. #define GPIO_DIMM_RESET (1UL << (31 - 10))
  11. #define GPIO_USB_RESET (1UL << (31 - 11))
  12. #define GPIO_UNUSED_12 (1UL << (31 - 12))
  13. #define GPIO_GETH0_RESET (1UL << (31 - 13))
  14. #define GPIO_RS422_RE (1UL << (31 - 14))
  15. #define GPIO_RS422_DE (1UL << (31 - 15))
  16. #define IRQ_I2CINT (1UL << (31 - 20))
  17. #define IRQ_FANINT (1UL << (31 - 21))
  18. #define IRQ_DIMM_EVENT (1UL << (31 - 22))
  19. #define GPIO_RESETS (GPIO_DIMM_RESET|GPIO_USB_RESET|GPIO_GETH0_RESET)
  20. /* CPU A GPIOS (GPIO0-GPIO7 and IRQ0-IRQ3) */
  21. #define GPIO_CPUA_UNUSED_0 (1UL << (31 - 0))
  22. #define GPIO_CPUA_CPU_READY (1UL << (31 - 1))
  23. #define GPIO_CPUA_DEBUG_LED2 (1UL << (31 - 2))
  24. #define GPIO_CPUA_DEBUG_LED1 (1UL << (31 - 3))
  25. #define GPIO_CPUA_TDIS2B (1UL << (31 - 4)) /* MAC 2 TX B */
  26. #define GPIO_CPUA_TDIS2A (1UL << (31 - 5)) /* MAC 2 TX A */
  27. #define GPIO_CPUA_TDIS1B (1UL << (31 - 6)) /* MAC 1 TX B */
  28. #define GPIO_CPUA_TDIS1A (1UL << (31 - 7)) /* MAC 1 TX A */
  29. #define IRQ_CPUA_UNUSED_0 (1UL << (31 - 16))
  30. #define IRQ_CPUA_UNUSED_1 (1UL << (31 - 17))
  31. #define IRQ_CPUA_UNUSED_2 (1UL << (31 - 18))
  32. #define IRQ_CPUA_UNUSED_3 (1UL << (31 - 19))
  33. /* CPU B GPIOS (GPIO0-GPIO7 and IRQ0-IRQ3) */
  34. #define GPIO_CPUB_RMUX_SEL1B (1UL << (31 - 0))
  35. #define GPIO_CPUB_RMUX_SEL0B (1UL << (31 - 1))
  36. #define GPIO_CPUB_RMUX_SEL1A (1UL << (31 - 2))
  37. #define GPIO_CPUB_RMUX_SEL0A (1UL << (31 - 3))
  38. #define GPIO_CPUB_UNUSED_4 (1UL << (31 - 4))
  39. #define GPIO_CPUB_CPU_READY (1UL << (31 - 5))
  40. #define GPIO_CPUB_DEBUG_LED2 (1UL << (31 - 6))
  41. #define GPIO_CPUB_DEBUG_LED1 (1UL << (31 - 7))
  42. #define IRQ_CPUB_SD_1A (1UL << (31 - 16))
  43. #define IRQ_CPUB_SD_2B (1UL << (31 - 17))
  44. #define IRQ_CPUB_SD_2A (1UL << (31 - 18))
  45. #define IRQ_CPUB_SD_1B (1UL << (31 - 19))
  46. /* If it isn't CPU A then it's CPU B */
  47. static inline unsigned int hww1u1a_is_cpu_a(void)
  48. {
  49. return !mpc85xx_gpio_get(GPIO_CPU_ID);
  50. }