blob: ce0cd38f56e4f834b50dbfba7e9ba553607becf7 [file] [log] [blame]
Lokesh Vutla76a36492018-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 *
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
Lokesh Vutla76a36492018-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 Dannenbergbfdf4982019-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 Vutla76a36492018-08-27 15:59:09 +053037
Lokesh Vutlac73ac2a2019-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
Lokesh Vutla76a36492018-08-27 15:59:09 +053041#endif