2018-08-27 10:29:09 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
2021-08-31 18:12:24 +00:00
|
|
|
* This header provides constants for pinctrl bindings for TI's K3 SoC
|
|
|
|
* family.
|
2018-08-27 10:29:09 +00:00
|
|
|
*
|
2021-08-31 18:12:24 +00:00
|
|
|
* Copyright (C) 2018-2021 Texas Instruments Incorporated - https://www.ti.com/
|
2018-08-27 10:29:09 +00:00
|
|
|
*/
|
2021-08-31 18:12:24 +00:00
|
|
|
#ifndef _DT_BINDINGS_PINCTRL_TI_K3_H
|
|
|
|
#define _DT_BINDINGS_PINCTRL_TI_K3_H
|
|
|
|
|
|
|
|
#define PULLUDEN_SHIFT (16)
|
|
|
|
#define PULLTYPESEL_SHIFT (17)
|
|
|
|
#define RXACTIVE_SHIFT (18)
|
|
|
|
|
|
|
|
#define PULL_DISABLE (1 << PULLUDEN_SHIFT)
|
|
|
|
#define PULL_ENABLE (0 << PULLUDEN_SHIFT)
|
|
|
|
|
|
|
|
#define PULL_UP (1 << PULLTYPESEL_SHIFT | PULL_ENABLE)
|
|
|
|
#define PULL_DOWN (0 << PULLTYPESEL_SHIFT | PULL_ENABLE)
|
|
|
|
|
|
|
|
#define INPUT_EN (1 << RXACTIVE_SHIFT)
|
|
|
|
#define INPUT_DISABLE (0 << RXACTIVE_SHIFT)
|
|
|
|
|
|
|
|
/* Only these macros are expected be used directly in device tree files */
|
|
|
|
#define PIN_OUTPUT (INPUT_DISABLE | PULL_DISABLE)
|
|
|
|
#define PIN_OUTPUT_PULLUP (INPUT_DISABLE | PULL_UP)
|
|
|
|
#define PIN_OUTPUT_PULLDOWN (INPUT_DISABLE | PULL_DOWN)
|
2018-08-27 10:29:09 +00:00
|
|
|
#define PIN_INPUT (INPUT_EN | PULL_DISABLE)
|
|
|
|
#define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
|
2021-08-31 18:12:24 +00:00
|
|
|
#define PIN_INPUT_PULLDOWN (INPUT_EN | PULL_DOWN)
|
2018-08-27 10:29:09 +00:00
|
|
|
|
2019-04-29 17:56:44 +00:00
|
|
|
#define AM65X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
#define AM65X_WKUP_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
2018-08-27 10:29:09 +00:00
|
|
|
|
2019-06-13 04:59:52 +00:00
|
|
|
#define J721E_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
#define J721E_WKUP_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
|
2021-04-23 16:27:43 +00:00
|
|
|
#define AM64X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
#define AM64X_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
|
2022-01-25 15:26:39 +00:00
|
|
|
#define J721S2_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
#define J721S2_WKUP_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
|
2022-05-25 08:08:40 +00:00
|
|
|
#define AM62X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
#define AM62X_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
|
2022-11-04 00:13:51 +00:00
|
|
|
#define AM62AX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
#define AM62AX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
|
|
|
|
|
2018-08-27 10:29:09 +00:00
|
|
|
#endif
|