dm814x.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * This header provides constants specific to DM814X pinctrl bindings.
  3. */
  4. #ifndef _DT_BINDINGS_PINCTRL_DM814X_H
  5. #define _DT_BINDINGS_PINCTRL_DM814X_H
  6. #include <dt-bindings/pinctrl/omap.h>
  7. #undef INPUT_EN
  8. #undef PULL_UP
  9. #undef PULL_ENA
  10. /*
  11. * Note that dm814x silicon revision 2.1 and older require input enabled
  12. * (bit 18 set) for all 3.3V I/Os to avoid cumulative hardware damage. For
  13. * more info, see errata advisory 2.1.87. We leave bit 18 out of
  14. * function-mask in dm814x.h and rely on the bootloader for it.
  15. */
  16. #define INPUT_EN (1 << 18)
  17. #define PULL_UP (1 << 17)
  18. #define PULL_DISABLE (1 << 16)
  19. /* update macro depending on INPUT_EN and PULL_ENA */
  20. #undef PIN_OUTPUT
  21. #undef PIN_OUTPUT_PULLUP
  22. #undef PIN_OUTPUT_PULLDOWN
  23. #undef PIN_INPUT
  24. #undef PIN_INPUT_PULLUP
  25. #undef PIN_INPUT_PULLDOWN
  26. #define PIN_OUTPUT (PULL_DISABLE)
  27. #define PIN_OUTPUT_PULLUP (PULL_UP)
  28. #define PIN_OUTPUT_PULLDOWN 0
  29. #define PIN_INPUT (INPUT_EN | PULL_DISABLE)
  30. #define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
  31. #define PIN_INPUT_PULLDOWN (INPUT_EN)
  32. /* undef non-existing modes */
  33. #undef PIN_OFF_NONE
  34. #undef PIN_OFF_OUTPUT_HIGH
  35. #undef PIN_OFF_OUTPUT_LOW
  36. #undef PIN_OFF_INPUT_PULLUP
  37. #undef PIN_OFF_INPUT_PULLDOWN
  38. #undef PIN_OFF_WAKEUPENABLE
  39. #endif