am43xx.h 995 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * This header provides constants specific to AM43XX pinctrl bindings.
  3. */
  4. #ifndef _DT_BINDINGS_PINCTRL_AM43XX_H
  5. #define _DT_BINDINGS_PINCTRL_AM43XX_H
  6. #define MUX_MODE0 0
  7. #define MUX_MODE1 1
  8. #define MUX_MODE2 2
  9. #define MUX_MODE3 3
  10. #define MUX_MODE4 4
  11. #define MUX_MODE5 5
  12. #define MUX_MODE6 6
  13. #define MUX_MODE7 7
  14. #define MUX_MODE8 8
  15. #define PULL_DISABLE (1 << 16)
  16. #define PULL_UP (1 << 17)
  17. #define INPUT_EN (1 << 18)
  18. #define SLEWCTRL_SLOW (1 << 19)
  19. #define SLEWCTRL_FAST 0
  20. #define DS0_PULL_UP_DOWN_EN (1 << 27)
  21. #define WAKEUP_ENABLE (1 << 29)
  22. #define PIN_OUTPUT (PULL_DISABLE)
  23. #define PIN_OUTPUT_PULLUP (PULL_UP)
  24. #define PIN_OUTPUT_PULLDOWN 0
  25. #define PIN_INPUT (INPUT_EN | PULL_DISABLE)
  26. #define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
  27. #define PIN_INPUT_PULLDOWN (INPUT_EN)
  28. /*
  29. * Macro to allow using the absolute physical address instead of the
  30. * padconf registers instead of the offset from padconf base.
  31. */
  32. #define AM4372_IOPAD(pa, val) (((pa) & 0xffff) - 0x0800) (val)
  33. #endif