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 #define PULL_DISABLE		(1 << 16)
11 #define PULL_UP			(1 << 17)
12 #define INPUT_EN		(1 << 18)
13 #define SLEWCTRL_200MHZ		0
14 #define SLEWCTRL_150MHZ		(1 << 19)
15 #define SLEWCTRL_100MHZ		(2 << 19)
16 #define SLEWCTRL_50MHZ		(3 << 19)
17 #define TX_DIS			(1 << 21)
18 #define ISO_OVR			(1 << 22)
19 #define ISO_BYPASS		(1 << 23)
20 #define DS_EN			(1 << 24)
21 #define DS_INPUT		(1 << 25)
22 #define DS_FORCE_OUT_HIGH	(1 << 26)
23 #define DS_PULL_UP_DOWN_EN	0
24 #define DS_PULL_UP_DOWN_DIS	(1 << 27)
25 #define DS_PULL_UP_SEL		(1 << 28)
26 #define WAKEUP_ENABLE		(1 << 29)
27 
28 #define PIN_OUTPUT		(PULL_DISABLE)
29 #define PIN_OUTPUT_PULLUP	(PULL_UP)
30 #define PIN_OUTPUT_PULLDOWN	0
31 #define PIN_INPUT		(INPUT_EN | PULL_DISABLE)
32 #define PIN_INPUT_PULLUP	(INPUT_EN | PULL_UP)
33 #define PIN_INPUT_PULLDOWN	(INPUT_EN)
34 
35 #define AM65X_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
36 #define AM65X_WKUP_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
37 
38 #define J721E_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
39 #define J721E_WKUP_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
40 
41 #endif
42