Lokesh Vutla | 76a3649 | 2018-08-27 15:59:09 +0530 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * This header provides constants for TI K3-AM65 pinctrl bindings. |
| 4 | * |
| 5 | * Copyright (C) 2018 Texas Instruments |
| 6 | */ |
| 7 | #ifndef _DT_BINDINGS_PINCTRL_TI_K3_AM65_H |
| 8 | #define _DT_BINDINGS_PINCTRL_TI_K3_AM65_H |
| 9 | |
| 10 | /* K3 mux mode options for each pin. See TRM for options */ |
| 11 | #define MUX_MODE0 0 |
| 12 | #define MUX_MODE1 1 |
| 13 | #define MUX_MODE2 2 |
| 14 | #define MUX_MODE3 3 |
| 15 | #define MUX_MODE4 4 |
| 16 | #define MUX_MODE5 5 |
| 17 | #define MUX_MODE6 6 |
| 18 | #define MUX_MODE7 7 |
| 19 | #define MUX_MODE15 15 |
| 20 | |
| 21 | #define PULL_DISABLE (1 << 16) |
| 22 | #define PULL_UP (1 << 17) |
| 23 | #define INPUT_EN (1 << 18) |
| 24 | #define SLEWCTRL_200MHZ 0 |
| 25 | #define SLEWCTRL_150MHZ (1 << 19) |
| 26 | #define SLEWCTRL_100MHZ (2 << 19) |
| 27 | #define SLEWCTRL_50MHZ (3 << 19) |
| 28 | #define TX_DIS (1 << 21) |
| 29 | #define ISO_OVR (1 << 22) |
| 30 | #define ISO_BYPASS (1 << 23) |
| 31 | #define DS_EN (1 << 24) |
| 32 | #define DS_INPUT (1 << 25) |
| 33 | #define DS_FORCE_OUT_HIGH (1 << 26) |
| 34 | #define DS_PULL_UP_DOWN_EN 0 |
| 35 | #define DS_PULL_UP_DOWN_DIS (1 << 27) |
| 36 | #define DS_PULL_UP_SEL (1 << 28) |
| 37 | #define WAKEUP_ENABLE (1 << 29) |
| 38 | |
| 39 | #define PIN_OUTPUT (PULL_DISABLE) |
| 40 | #define PIN_OUTPUT_PULLUP (PULL_UP) |
| 41 | #define PIN_OUTPUT_PULLDOWN 0 |
| 42 | #define PIN_INPUT (INPUT_EN | PULL_DISABLE) |
| 43 | #define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP) |
| 44 | #define PIN_INPUT_PULLDOWN (INPUT_EN) |
| 45 | |
| 46 | #define AM65X_IOPAD(pa, val) (((pa) & 0x1fff)) (val) |
| 47 | #define AM65X_WKUP_IOPAD(pa, val) (((pa) & 0x1fff)) (val) |
| 48 | |
| 49 | #endif |