Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Akashdeep Kaur <a-kaur@ti.com>
To: Vignesh Raghavendra <vigneshr@ti.com>, <nm@ti.com>,
	<kristo@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <sebin.francis@ti.com>, Kendall Willis <k-willis@ti.com>
Subject: Re: [PATCH] arm64: dts: ti: k3-pinctrl: Add virtual GPIO select mux macros
Date: Mon, 21 Sep 2026 12:10:08 +0530	[thread overview]
Message-ID: <7795b166-b0fc-4bc0-9dd3-f0fa8251de6d@ti.com> (raw)
In-Reply-To: <39d5525a-1276-47af-8659-70a86cda8a1b@ti.com>

Hi Vignesh,

On 18/09/26 13:57, Vignesh Raghavendra wrote:
> 
> 
> On 17/09/26 16:45, Akashdeep Kaur wrote:
>> Add virtual GPIO select mux macros to allow users to select GPIO
>> controller bank for pins. The two GPIO controller instances in the
>> MAIN domain share physical pins, and the vgpio_sel field routes each
...
>>   
>> +#define VGPIO_SEL_SHIFT         (4)
>>   #define WKUP_LVL_EN_SHIFT	(7)
>>   #define WKUP_LVL_POL_SHIFT	(8)
>>   #define DEBOUNCE_SHIFT		(11)
>> @@ -111,6 +112,9 @@
>>   #define PIN_WKUP_EN_LEVEL_HIGH		(WKUP_ENABLE | WKUP_ON_LEVEL | WKUP_LEVEL_HIGH)
>>   #define PIN_WKUP_EN			(WKUP_ENABLE | WKUP_ON_EDGE)
>>   
>> +#define PIN_VGPIO_SEL0                  (0 << VGPIO_SEL_SHIFT)
>> +#define PIN_VGPIO_SEL2                  (1 << VGPIO_SEL_SHIFT)
>> +
> 
> Unfortunately, this field has different meaning in different SoCs. Here
> is the definition from J784s4:
> 
> Note this field  is irrelevant when Muxmode is not 7.
> for MAIN GPIO
> 00 = GPIO0 or 1 depending on the specific pin (meaning if mode 7 has
> GPIO0.x then it is GPIO0 and if GPIO1.x then GPIO1)
> 01 - GPIO2 or 3 depending on the specific pin (meaning if mode 7 has
> GPIO0.x then it is GPIO2 and if GPIO1.x then GPIO3)
> 10 - GPIO4 or 5 depending on the specific pin (meaning if mode 7 has
> GPIO0.x then it is GPIO4 and if GPIO1.x then GPIO5)
> 11 - GPIO6 or 7 depending on the specific pin (meaning if mode 7 has
> GPIO0.x then it is GPIO6 and if GPIO1.x then GPIO7)
> Note this field  is irrelevant when Muxmode is not 7.
> 
> Thus, macros need to be generic or it should just open code the constant.

Thank you for the feedback and the detailed J784S4 example. You're
absolutely right that the naming was too AM62L-specific. I've addressed 
this in v2 by using generic value-based naming (PIN_VGPIO_SEL0/1/2/3) 
and adding all four values. The commit message now clarifies that the 
meaning is SoC-specific.

Thanks and Regards,
Akashdeep Kaur
> 
>>   /* Default mux configuration for gpio-ranges to use with pinctrl */
>>   #define PIN_GPIO_RANGE_IOPAD	(PIN_INPUT | 7)
>>   
> 



      reply	other threads:[~2026-09-21  6:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 11:15 [PATCH] arm64: dts: ti: k3-pinctrl: Add virtual GPIO select mux macros Akashdeep Kaur
2026-09-17 18:58 ` Kendall Willis
2026-09-18  8:27 ` Vignesh Raghavendra
2026-09-21  6:40   ` Akashdeep Kaur [this message]

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=7795b166-b0fc-4bc0-9dd3-f0fa8251de6d@ti.com \
    --to=a-kaur@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=k-willis@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=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=sebin.francis@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