dm814x.h 1.2 KB

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