From: Vignesh R <vigneshr@ti.com>
To: Tero Kristo <t-kristo@ti.com>, Rob Herring <robh+dt@kernel.org>
Cc: Nishanth Menon <nm@ti.com>, Mark Rutland <mark.rutland@arm.com>,
Vignesh R <vigneshr@ti.com>,
devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] dt-bindings: pinctrl: k3-am6: Introduce pinmux definitions
Date: Thu, 8 Nov 2018 16:56:46 +0530 [thread overview]
Message-ID: <20181108112647.7205-2-vigneshr@ti.com> (raw)
In-Reply-To: <20181108112647.7205-1-vigneshr@ti.com>
From: Tero Kristo <t-kristo@ti.com>
The dt-bindings header for TI K3-AM6 SoCs define a set of macros for
defining pinmux configs in human readable form, instead of raw-coded
hex values.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
---
MAINTAINERS | 1 +
include/dt-bindings/pinctrl/k3-am6.h | 49 ++++++++++++++++++++++++++++
2 files changed, 50 insertions(+)
create mode 100644 include/dt-bindings/pinctrl/k3-am6.h
diff --git a/MAINTAINERS b/MAINTAINERS
index fb58c64dda49..7fd59955fd21 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2204,6 +2204,7 @@ S: Supported
F: Documentation/devicetree/bindings/arm/ti/k3.txt
F: arch/arm64/boot/dts/ti/Makefile
F: arch/arm64/boot/dts/ti/k3-*
+F: include/dt-bindings/pinctrl/k3-am6.h
ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE
M: Santosh Shilimkar <ssantosh@kernel.org>
diff --git a/include/dt-bindings/pinctrl/k3-am6.h b/include/dt-bindings/pinctrl/k3-am6.h
new file mode 100644
index 000000000000..42e22ee57600
--- /dev/null
+++ b/include/dt-bindings/pinctrl/k3-am6.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This header provides constants for TI K3-AM6 pinctrl bindings.
+ *
+ * Copyright (C) 2018 Texas Instruments
+ */
+#ifndef _DT_BINDINGS_PINCTRL_TI_K3_AM6_H
+#define _DT_BINDINGS_PINCTRL_TI_K3_AM6_H
+
+/* K3 mux mode options for each pin. See TRM for options */
+#define MUX_MODE0 0
+#define MUX_MODE1 1
+#define MUX_MODE2 2
+#define MUX_MODE3 3
+#define MUX_MODE4 4
+#define MUX_MODE5 5
+#define MUX_MODE6 6
+#define MUX_MODE7 7
+#define MUX_MODE15 15
+
+#define PULL_DISABLE (1 << 16)
+#define PULL_UP (1 << 17)
+#define INPUT_EN (1 << 18)
+#define SLEWCTRL_200MHZ 0
+#define SLEWCTRL_150MHZ (1 << 19)
+#define SLEWCTRL_100MHZ (2 << 19)
+#define SLEWCTRL_50MHZ (3 << 19)
+#define TX_DIS (1 << 21)
+#define ISO_OVR (1 << 22)
+#define ISO_BYPASS (1 << 23)
+#define DS_EN (1 << 24)
+#define DS_INPUT (1 << 25)
+#define DS_FORCE_OUT_HIGH (1 << 26)
+#define DS_PULL_UP_DOWN_EN 0
+#define DS_PULL_UP_DOWN_DIS (1 << 27)
+#define DS_PULL_UP_SEL (1 << 28)
+#define WAKEUP_ENABLE (1 << 29)
+
+#define PIN_OUTPUT (PULL_DISABLE)
+#define PIN_OUTPUT_PULLUP (PULL_UP)
+#define PIN_OUTPUT_PULLDOWN 0
+#define PIN_INPUT (INPUT_EN | PULL_DISABLE)
+#define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
+#define PIN_INPUT_PULLDOWN (INPUT_EN)
+
+#define AM65X_IOPAD(pa, val) (((pa) & 0x1fff)) (val)
+#define AM65X_WKUP_IOPAD(pa, val) (((pa) & 0x1fff)) (val)
+
+#endif
--
2.19.1
next prev parent reply other threads:[~2018-11-08 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 11:26 [PATCH 0/2] AM654: Add pinmux support Vignesh R
2018-11-08 11:26 ` Vignesh R [this message]
2018-11-08 13:45 ` [PATCH 1/2] dt-bindings: pinctrl: k3-am6: Introduce pinmux definitions Nishanth Menon
2018-11-09 8:50 ` Vignesh R
2018-11-09 9:00 ` Nishanth Menon
2018-11-08 11:26 ` [PATCH 2/2] arm64: dts: ti: k3-am65: Add pinctrl regions Vignesh R
2018-11-08 13:47 ` Nishanth Menon
2018-11-08 15:13 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181108112647.7205-2-vigneshr@ti.com \
--to=vigneshr@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=t-kristo@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).