mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Tero Kristo <kristo@kernel.org>,
	Vaishnav Achath <vaishnav.a@ti.com>,
	Jared McArthur <j-mcarthur@ti.com>, Bryan Brattlof <bb@ti.com>,
	Dhruva Gole <d-gole@ti.com>, Nishanth Menon <nm@ti.com>
Subject: [PATCH V2 1/3] arm64: dts: ti: k3-pinctrl: Define a generic GPIO MUX Mode
Date: Thu, 27 Jun 2024 11:25:37 -0500	[thread overview]
Message-ID: <20240627162539.691223-2-nm@ti.com> (raw)
In-Reply-To: <20240627162539.691223-1-nm@ti.com>

Introduce a GPIO mux mode macro for easier readability. All K3 devices
use mux mode 7 to switch to GPIO mux and this allows the gpio-ranges to
be defined for pinctrl-single clearly.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
Changes since V1:
 - Mux definition PIN_GPIO_RANGE_IOPAD instead of PIN_GPIO_MUX_MODE
 - Added documentation as well to clarify the usage.

V1: https://lore.kernel.org/linux-arm-kernel/20240618173123.2592074-2-nm@ti.com/

 arch/arm64/boot/dts/ti/k3-pinctrl.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-pinctrl.h b/arch/arm64/boot/dts/ti/k3-pinctrl.h
index 4cd2df467d0b..22b8d73cfd32 100644
--- a/arch/arm64/boot/dts/ti/k3-pinctrl.h
+++ b/arch/arm64/boot/dts/ti/k3-pinctrl.h
@@ -38,6 +38,9 @@
 #define PIN_DEBOUNCE_CONF5	(5 << DEBOUNCE_SHIFT)
 #define PIN_DEBOUNCE_CONF6	(6 << DEBOUNCE_SHIFT)
 
+/* Default mux configuration for gpio-ranges to use with pinctrl */
+#define PIN_GPIO_RANGE_IOPAD	(PIN_INPUT | 7)
+
 #define AM62AX_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM62AX_MCU_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
 
-- 
2.43.0


  reply	other threads:[~2024-06-27 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 16:25 [PATCH V2 0/3] arm64: dts: ti: k3-am62p/j722s: Add gpio-ranges properties Nishanth Menon
2024-06-27 16:25 ` Nishanth Menon [this message]
2024-06-27 16:25 ` [PATCH V2 2/3] arm64: dts: ti: k3-am62p: " Nishanth Menon
2024-06-27 16:25 ` [PATCH V2 3/3] arm64: dts: ti: k3-j722s: " Nishanth Menon
2024-07-03  4:35 ` [PATCH V2 0/3] arm64: dts: ti: k3-am62p/j722s: " Vignesh Raghavendra

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=20240627162539.691223-2-nm@ti.com \
    --to=nm@ti.com \
    --cc=bb@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=d-gole@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-mcarthur@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=vaishnav.a@ti.com \
    --cc=vigneshr@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

all inboxes | Powered by JetHome®