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