Florian Vaussard | 3f2d165 | 2013-06-03 16:12:24 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This header provides constants specific to AM33XX pinctrl bindings. |
| 3 | */ |
| 4 | |
Florian Vaussard | ac25da7 | 2013-06-11 16:50:50 +0200 | [diff] [blame] | 5 | #ifndef _DT_BINDINGS_PINCTRL_AM33XX_H |
| 6 | #define _DT_BINDINGS_PINCTRL_AM33XX_H |
| 7 | |
Ian Campbell | c5f167d | 2013-07-03 09:44:50 +0100 | [diff] [blame] | 8 | #include <dt-bindings/pinctrl/omap.h> |
Florian Vaussard | 3f2d165 | 2013-06-03 16:12:24 +0200 | [diff] [blame] | 9 | |
| 10 | /* am33xx specific mux bit defines */ |
| 11 | #undef PULL_ENA |
| 12 | #undef INPUT_EN |
| 13 | |
| 14 | #define PULL_DISABLE (1 << 3) |
| 15 | #define INPUT_EN (1 << 5) |
Dave Gerlach | 424e0f0 | 2015-02-27 19:10:26 -0600 | [diff] [blame] | 16 | #define SLEWCTRL_SLOW (1 << 6) |
| 17 | #define SLEWCTRL_FAST 0 |
Florian Vaussard | 3f2d165 | 2013-06-03 16:12:24 +0200 | [diff] [blame] | 18 | |
| 19 | /* update macro depending on INPUT_EN and PULL_ENA */ |
| 20 | #undef PIN_OUTPUT |
| 21 | #undef PIN_OUTPUT_PULLUP |
| 22 | #undef PIN_OUTPUT_PULLDOWN |
| 23 | #undef PIN_INPUT |
| 24 | #undef PIN_INPUT_PULLUP |
| 25 | #undef PIN_INPUT_PULLDOWN |
| 26 | |
| 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 | |
| 34 | /* undef non-existing modes */ |
| 35 | #undef PIN_OFF_NONE |
| 36 | #undef PIN_OFF_OUTPUT_HIGH |
| 37 | #undef PIN_OFF_OUTPUT_LOW |
| 38 | #undef PIN_OFF_INPUT_PULLUP |
| 39 | #undef PIN_OFF_INPUT_PULLDOWN |
| 40 | #undef PIN_OFF_WAKEUPENABLE |
| 41 | |
Florian Vaussard | ac25da7 | 2013-06-11 16:50:50 +0200 | [diff] [blame] | 42 | #endif |
| 43 | |