mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO
@ 2026-07-19 13:35 Hans Ulli Kroll
  2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Hans Ulli Kroll @ 2026-07-19 13:35 UTC (permalink / raw)
  To: Linus Walleij, Bjorn Andersson
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Hans Ulli Kroll

The qcom pinctrl core supports marking functions that represent GPIO mode
via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
GPIO requests for pins that are muxed to the GPIO function.

ipq806x still describes its gpio function with QCA_PIN_FUNCTION(gpio),
so it is not treated as a GPIO pin function. As a result, GPIO consumers
can still conflict with pinctrl states that select the "gpio" function.

This allows ipq806x to keep the GPIO-related and PCIe-related pin configuration
in DTS without tripping over strict pinmux ownership checks.

Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function
  2026-07-19 13:35 [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Hans Ulli Kroll
@ 2026-07-19 13:35 ` Hans Ulli Kroll
  2026-07-20  8:29   ` Konrad Dybcio
                     ` (2 more replies)
  2026-07-19 13:36 ` [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset " Hans Ulli Kroll
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 11+ messages in thread
From: Hans Ulli Kroll @ 2026-07-19 13:35 UTC (permalink / raw)
  To: Linus Walleij, Bjorn Andersson
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Hans Ulli Kroll

The qcom pinctrl core supports marking functions that represent GPIO mode
via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
GPIO requests for pins that are muxed to the GPIO function.

Add a IPQ_GPIO_PIN_FUNCTION() helper and use it for the ipq806x gpio
function, matching how the msm-based qcom drivers handle this.

This allows ipq806x to keep the GPIO-related configuration in DTS
without tripping over strict pinmux ownership
checks.

Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>
---
 drivers/pinctrl/qcom/pinctrl-ipq8064.c | 2 +-
 drivers/pinctrl/qcom/pinctrl-msm.h     | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8064.c b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
index 78d320d56be6d..e1c3c213559f9 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
@@ -480,7 +480,7 @@ static const char * const ps_hold_groups[] = {
 };
 
 static const struct pinfunction ipq8064_functions[] = {
-	IPQ_PIN_FUNCTION(gpio),
+	IPQ_GPIO_PIN_FUNCTION(gpio),
 	IPQ_PIN_FUNCTION(mdio),
 	IPQ_PIN_FUNCTION(ssbi),
 	IPQ_PIN_FUNCTION(spmi),
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.h b/drivers/pinctrl/qcom/pinctrl-msm.h
index 4fbff61de6bb3..b94ba1a4177ed 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.h
+++ b/drivers/pinctrl/qcom/pinctrl-msm.h
@@ -24,6 +24,11 @@ struct pinctrl_pin_desc;
 					fname##_groups,		\
 					ARRAY_SIZE(fname##_groups))
 
+#define IPQ_GPIO_PIN_FUNCTION(fname)					\
+	[IPQ_MUX_##fname] = PINCTRL_GPIO_PINFUNCTION(#fname,		\
+					fname##_groups,		\
+					ARRAY_SIZE(fname##_groups))
+
 #define MSM_PIN_FUNCTION(fname) 				\
 	[msm_mux_##fname] = PINCTRL_PINFUNCTION(#fname,		\
 					fname##_groups,		\
-- 
2.55.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset as a GPIO pin function
  2026-07-19 13:35 [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Hans Ulli Kroll
  2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
@ 2026-07-19 13:36 ` Hans Ulli Kroll
  2026-07-20  8:28   ` Konrad Dybcio
                     ` (2 more replies)
  2026-07-25  9:20 ` [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Linus Walleij
  2026-07-28  9:11 ` Bartosz Golaszewski
  3 siblings, 3 replies; 11+ messages in thread
From: Hans Ulli Kroll @ 2026-07-19 13:36 UTC (permalink / raw)
  To: Linus Walleij, Bjorn Andersson
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Hans Ulli Kroll

The qcom pinctrl core supports marking functions that represent GPIO mode
via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
GPIO requests for pins that are muxed to the GPIO function.

Mark PCIe reset as GPIO pin function

This allows ipq806x to keep the PCIe-reset related configuration in DTS
without tripping over strict pinmux ownership checks.

Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>
---
 drivers/pinctrl/qcom/pinctrl-ipq8064.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8064.c b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
index e1c3c213559f9..0a50486337d31 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
@@ -507,19 +507,19 @@ static const struct pinfunction ipq8064_functions[] = {
 	IPQ_PIN_FUNCTION(usb2_hsic),
 	IPQ_PIN_FUNCTION(rgmii2),
 	IPQ_PIN_FUNCTION(sata),
-	IPQ_PIN_FUNCTION(pcie1_rst),
+	IPQ_GPIO_PIN_FUNCTION(pcie1_rst),
 	IPQ_PIN_FUNCTION(pcie1_prsnt),
 	IPQ_PIN_FUNCTION(pcie1_pwren_n),
 	IPQ_PIN_FUNCTION(pcie1_pwren),
 	IPQ_PIN_FUNCTION(pcie1_pwrflt),
 	IPQ_PIN_FUNCTION(pcie1_clk_req),
-	IPQ_PIN_FUNCTION(pcie2_rst),
+	IPQ_GPIO_PIN_FUNCTION(pcie2_rst),
 	IPQ_PIN_FUNCTION(pcie2_prsnt),
 	IPQ_PIN_FUNCTION(pcie2_pwren_n),
 	IPQ_PIN_FUNCTION(pcie2_pwren),
 	IPQ_PIN_FUNCTION(pcie2_pwrflt),
 	IPQ_PIN_FUNCTION(pcie2_clk_req),
-	IPQ_PIN_FUNCTION(pcie3_rst),
+	IPQ_GPIO_PIN_FUNCTION(pcie3_rst),
 	IPQ_PIN_FUNCTION(pcie3_prsnt),
 	IPQ_PIN_FUNCTION(pcie3_pwren_n),
 	IPQ_PIN_FUNCTION(pcie3_pwren),
-- 
2.55.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset as a GPIO pin function
  2026-07-19 13:36 ` [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset " Hans Ulli Kroll
@ 2026-07-20  8:28   ` Konrad Dybcio
  2026-07-22 13:22   ` Dmitry Baryshkov
  2026-07-25  9:42   ` Linus Walleij
  2 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2026-07-20  8:28 UTC (permalink / raw)
  To: Hans Ulli Kroll, Linus Walleij, Bjorn Andersson
  Cc: linux-arm-msm, linux-gpio, linux-kernel

On 7/19/26 3:36 PM, Hans Ulli Kroll wrote:
> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
> 
> Mark PCIe reset as GPIO pin function
> 
> This allows ipq806x to keep the PCIe-reset related configuration in DTS
> without tripping over strict pinmux ownership checks.

Could you expand on what the issue is? We haven't seen this being
necessary on other platforms

Konrad

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function
  2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
@ 2026-07-20  8:29   ` Konrad Dybcio
  2026-07-22 13:22   ` Dmitry Baryshkov
  2026-07-25  9:42   ` Linus Walleij
  2 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2026-07-20  8:29 UTC (permalink / raw)
  To: Hans Ulli Kroll, Linus Walleij, Bjorn Andersson
  Cc: linux-arm-msm, linux-gpio, linux-kernel

On 7/19/26 3:35 PM, Hans Ulli Kroll wrote:
> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
> 
> Add a IPQ_GPIO_PIN_FUNCTION() helper and use it for the ipq806x gpio
> function, matching how the msm-based qcom drivers handle this.
> 
> This allows ipq806x to keep the GPIO-related configuration in DTS
> without tripping over strict pinmux ownership
> checks.
> 
> Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
> Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function
  2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
  2026-07-20  8:29   ` Konrad Dybcio
@ 2026-07-22 13:22   ` Dmitry Baryshkov
  2026-07-25  9:42   ` Linus Walleij
  2 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-07-22 13:22 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: Linus Walleij, Bjorn Andersson, linux-arm-msm, linux-gpio, linux-kernel

On Sun, Jul 19, 2026 at 03:35:59PM +0200, Hans Ulli Kroll wrote:
> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
> 
> Add a IPQ_GPIO_PIN_FUNCTION() helper and use it for the ipq806x gpio
> function, matching how the msm-based qcom drivers handle this.
> 
> This allows ipq806x to keep the GPIO-related configuration in DTS
> without tripping over strict pinmux ownership
> checks.
> 
> Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
> Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>
> ---
>  drivers/pinctrl/qcom/pinctrl-ipq8064.c | 2 +-
>  drivers/pinctrl/qcom/pinctrl-msm.h     | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset as a GPIO pin function
  2026-07-19 13:36 ` [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset " Hans Ulli Kroll
  2026-07-20  8:28   ` Konrad Dybcio
@ 2026-07-22 13:22   ` Dmitry Baryshkov
  2026-07-25  9:42   ` Linus Walleij
  2 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-07-22 13:22 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: Linus Walleij, Bjorn Andersson, linux-arm-msm, linux-gpio, linux-kernel

On Sun, Jul 19, 2026 at 03:36:00PM +0200, Hans Ulli Kroll wrote:
> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
> 
> Mark PCIe reset as GPIO pin function
> 
> This allows ipq806x to keep the PCIe-reset related configuration in DTS
> without tripping over strict pinmux ownership checks.
> 
> Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
> Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>
> ---
>  drivers/pinctrl/qcom/pinctrl-ipq8064.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO
  2026-07-19 13:35 [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Hans Ulli Kroll
  2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
  2026-07-19 13:36 ` [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset " Hans Ulli Kroll
@ 2026-07-25  9:20 ` Linus Walleij
  2026-07-28  9:11 ` Bartosz Golaszewski
  3 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-07-25  9:20 UTC (permalink / raw)
  To: Hans Ulli Kroll, Bartosz Golaszewski
  Cc: Bjorn Andersson, linux-arm-msm, linux-gpio, linux-kernel

On Sun, Jul 19, 2026 at 3:48 PM Hans Ulli Kroll <linux@ulli-kroll.de> wrote:

> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
>
> ipq806x still describes its gpio function with QCA_PIN_FUNCTION(gpio),
> so it is not treated as a GPIO pin function. As a result, GPIO consumers
> can still conflict with pinctrl states that select the "gpio" function.
>
> This allows ipq806x to keep the GPIO-related and PCIe-related pin configuration
> in DTS without tripping over strict pinmux ownership checks.
>
> Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
> Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>

This need to be relayed to Bartosz as qualcomm pinctrl maintainer!

FWIW:
Acked-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function
  2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
  2026-07-20  8:29   ` Konrad Dybcio
  2026-07-22 13:22   ` Dmitry Baryshkov
@ 2026-07-25  9:42   ` Linus Walleij
  2 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-07-25  9:42 UTC (permalink / raw)
  To: Hans Ulli Kroll; +Cc: Bjorn Andersson, linux-arm-msm, linux-gpio, linux-kernel

On Sun, Jul 19, 2026 at 3:48 PM Hans Ulli Kroll <linux@ulli-kroll.de> wrote:

> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
>
> Add a IPQ_GPIO_PIN_FUNCTION() helper and use it for the ipq806x gpio
> function, matching how the msm-based qcom drivers handle this.
>
> This allows ipq806x to keep the GPIO-related configuration in DTS
> without tripping over strict pinmux ownership
> checks.
>
> Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
> Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>

This patch -> Bartosz
Acked-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset as a GPIO pin function
  2026-07-19 13:36 ` [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset " Hans Ulli Kroll
  2026-07-20  8:28   ` Konrad Dybcio
  2026-07-22 13:22   ` Dmitry Baryshkov
@ 2026-07-25  9:42   ` Linus Walleij
  2 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-07-25  9:42 UTC (permalink / raw)
  To: Hans Ulli Kroll; +Cc: Bjorn Andersson, linux-arm-msm, linux-gpio, linux-kernel

On Sun, Jul 19, 2026 at 3:48 PM Hans Ulli Kroll <linux@ulli-kroll.de> wrote:

> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
>
> Mark PCIe reset as GPIO pin function
>
> This allows ipq806x to keep the PCIe-reset related configuration in DTS
> without tripping over strict pinmux ownership checks.
>
> Fixes: cc85cb96e2e4 ("pinctrl: qcom: make the pinmuxing strict")
> Signed-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>

This patch -> Bartosz
Acked-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO
  2026-07-19 13:35 [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Hans Ulli Kroll
                   ` (2 preceding siblings ...)
  2026-07-25  9:20 ` [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Linus Walleij
@ 2026-07-28  9:11 ` Bartosz Golaszewski
  3 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2026-07-28  9:11 UTC (permalink / raw)
  To: Linus Walleij, Bjorn Andersson, Hans Ulli Kroll
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-gpio, linux-kernel


On Sun, 19 Jul 2026 15:35:58 +0200, Hans Ulli Kroll wrote:
> The qcom pinctrl core supports marking functions that represent GPIO mode
> via PINCTRL_GPIO_PINFUNCTION(), so that strict pinmuxing does not reject
> GPIO requests for pins that are muxed to the GPIO function.
> 
> ipq806x still describes its gpio function with QCA_PIN_FUNCTION(gpio),
> so it is not treated as a GPIO pin function. As a result, GPIO consumers
> can still conflict with pinctrl states that select the "gpio" function.
> 
> [...]

Applied, thanks!

[1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function
      https://git.kernel.org/brgl/c/687f39faccba29ab26de965411db37e849af8ec2
[2/2] pinctrl: qcom: ipq806x: mark pci reset as a GPIO pin function
      https://git.kernel.org/brgl/c/fd46760956509f580f7d3d25db4de10e7c6f949b

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-28  9:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-19 13:35 [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Hans Ulli Kroll
2026-07-19 13:35 ` [PATCH 1/2] pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function Hans Ulli Kroll
2026-07-20  8:29   ` Konrad Dybcio
2026-07-22 13:22   ` Dmitry Baryshkov
2026-07-25  9:42   ` Linus Walleij
2026-07-19 13:36 ` [PATCH 2/2] pinctrl: qcom: ipq806x: mark pci reset " Hans Ulli Kroll
2026-07-20  8:28   ` Konrad Dybcio
2026-07-22 13:22   ` Dmitry Baryshkov
2026-07-25  9:42   ` Linus Walleij
2026-07-25  9:20 ` [PATCH 0/2] pinctrl: qcom: ipq806x: mark gpio and pcie-reset as GPIO Linus Walleij
2026-07-28  9:11 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome