am33xx.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * This header provides constants specific to AM33XX pinctrl bindings.
  4. */
  5. #ifndef _DT_BINDINGS_PINCTRL_AM33XX_H
  6. #define _DT_BINDINGS_PINCTRL_AM33XX_H
  7. #include <dt-bindings/pinctrl/omap.h>
  8. /* am33xx specific mux bit defines */
  9. #undef PULL_ENA
  10. #undef INPUT_EN
  11. #define PULL_DISABLE (1 << 3)
  12. #define INPUT_EN (1 << 5)
  13. #define SLEWCTRL_SLOW (1 << 6)
  14. #define SLEWCTRL_FAST 0
  15. /* update macro depending on INPUT_EN and PULL_ENA */
  16. #undef PIN_OUTPUT
  17. #undef PIN_OUTPUT_PULLUP
  18. #undef PIN_OUTPUT_PULLDOWN
  19. #undef PIN_INPUT
  20. #undef PIN_INPUT_PULLUP
  21. #undef PIN_INPUT_PULLDOWN
  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. /* undef non-existing modes */
  29. #undef PIN_OFF_NONE
  30. #undef PIN_OFF_OUTPUT_HIGH
  31. #undef PIN_OFF_OUTPUT_LOW
  32. #undef PIN_OFF_INPUT_PULLUP
  33. #undef PIN_OFF_INPUT_PULLDOWN
  34. #undef PIN_OFF_WAKEUPENABLE
  35. #endif