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