blob: e6cb1d0540e60f06954c2a7225d9630a8daac20f [file] [log] [blame]
Lokesh Vutla853f7f52018-08-27 15:59:09 +05301/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * This header provides constants for TI K3-AM65 pinctrl bindings.
4 *
Dave Gerlachdd418862021-04-23 11:27:43 -05005 * Copyright (C) 2018-2021 Texas Instruments
Lokesh Vutla853f7f52018-08-27 15:59:09 +05306 */
7#ifndef _DT_BINDINGS_PINCTRL_TI_K3_AM65_H
8#define _DT_BINDINGS_PINCTRL_TI_K3_AM65_H
9
Lokesh Vutla853f7f52018-08-27 15:59:09 +053010#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
Andreas Dannenberg7202af92019-04-29 12:56:44 -050035#define AM65X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
36#define AM65X_WKUP_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
Lokesh Vutla853f7f52018-08-27 15:59:09 +053037
Lokesh Vutla382f1dd2019-06-13 10:29:52 +053038#define J721E_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
39#define J721E_WKUP_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
40
Dave Gerlachdd418862021-04-23 11:27:43 -050041#define AM64X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
42#define AM64X_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
43
Lokesh Vutla853f7f52018-08-27 15:59:09 +053044#endif