Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * This header provides constants specific to DM814X pinctrl bindings.
0004  */
0005 
0006 #ifndef _DT_BINDINGS_PINCTRL_DM814X_H
0007 #define _DT_BINDINGS_PINCTRL_DM814X_H
0008 
0009 #include <dt-bindings/pinctrl/omap.h>
0010 
0011 #undef INPUT_EN
0012 #undef PULL_UP
0013 #undef PULL_ENA
0014 
0015 /*
0016  * Note that dm814x silicon revision 2.1 and older require input enabled
0017  * (bit 18 set) for all 3.3V I/Os to avoid cumulative hardware damage. For
0018  * more info, see errata advisory 2.1.87. We leave bit 18 out of
0019  * function-mask in dm814x.h and rely on the bootloader for it.
0020  */
0021 #define INPUT_EN        (1 << 18)
0022 #define PULL_UP         (1 << 17)
0023 #define PULL_DISABLE        (1 << 16)
0024 
0025 /* update macro depending on INPUT_EN and PULL_ENA */
0026 #undef PIN_OUTPUT
0027 #undef PIN_OUTPUT_PULLUP
0028 #undef PIN_OUTPUT_PULLDOWN
0029 #undef PIN_INPUT
0030 #undef PIN_INPUT_PULLUP
0031 #undef PIN_INPUT_PULLDOWN
0032 
0033 #define PIN_OUTPUT      (PULL_DISABLE)
0034 #define PIN_OUTPUT_PULLUP   (PULL_UP)
0035 #define PIN_OUTPUT_PULLDOWN 0
0036 #define PIN_INPUT       (INPUT_EN | PULL_DISABLE)
0037 #define PIN_INPUT_PULLUP    (INPUT_EN | PULL_UP)
0038 #define PIN_INPUT_PULLDOWN  (INPUT_EN)
0039 
0040 /* undef non-existing modes */
0041 #undef PIN_OFF_NONE
0042 #undef PIN_OFF_OUTPUT_HIGH
0043 #undef PIN_OFF_OUTPUT_LOW
0044 #undef PIN_OFF_INPUT_PULLUP
0045 #undef PIN_OFF_INPUT_PULLDOWN
0046 #undef PIN_OFF_WAKEUPENABLE
0047 
0048 #endif
0049