mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins
@ 2025-07-01  9:01 Bartosz Golaszewski
  2025-07-01  9:01 ` [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-07-01  9:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski

There are three platforms in the QCom DTS tree that are missing the
open-drain lookup flag in their DT nodes associated with the i2c-gpio
device whose driver enforces open-drain outputs. This causes the GPIO
core to emit warnings such as:

[    5.153550] gpio-528 (sda): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    5.166373] gpio-529 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file

Silence the warnings by adding appriopriate flags.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (3):
      arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
      arm64: dts: qcom: qrb4210-rb2: fix GPIO lookup flags for i2c SDA and SCL
      arm64: dts: qcom: sdm845-samsung-starqltechn: fix GPIO lookup flags for i2c SDA and SCL

 arch/arm64/boot/dts/qcom/qrb2210-rb1.dts                | 5 +++--
 arch/arm64/boot/dts/qcom/qrb4210-rb2.dts                | 5 +++--
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)
---
base-commit: 1343433ed38923a21425c602e92120a1f1db5f7a
change-id: 20250701-qcom-gpio-lookup-open-drain-e3443115ea24

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


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

* [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
  2025-07-01  9:01 [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
@ 2025-07-01  9:01 ` Bartosz Golaszewski
  2025-07-01 16:09   ` Alexey Klimov
  2025-07-01  9:01 ` [PATCH 2/3] arm64: dts: qcom: qrb4210-rb2: " Bartosz Golaszewski
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-07-01  9:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The I2C GPIO bus driver enforces the SDA and SCL pins as open-drain
outputs but the lookup flags in the DTS don't reflect that triggering
warnings from GPIO core. Add the appropriate flags.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index b2e0fc5501c1eefc7e037b2efd939126b483b226..277b33100ac07cb1e8477e9e51331f974b65092b 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
 #include "qcm2290.dtsi"
 #include "pm4125.dtsi"
@@ -63,8 +64,8 @@ hdmi_con: endpoint {
 	i2c2_gpio: i2c {
 		compatible = "i2c-gpio";
 
-		sda-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
-		scl-gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
+		sda-gpios = <&tlmm 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&tlmm 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 

-- 
2.48.1


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

* [PATCH 2/3] arm64: dts: qcom: qrb4210-rb2: fix GPIO lookup flags for i2c SDA and SCL
  2025-07-01  9:01 [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
  2025-07-01  9:01 ` [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL Bartosz Golaszewski
@ 2025-07-01  9:01 ` Bartosz Golaszewski
  2025-07-01 16:23   ` Alexey Klimov
  2025-07-01  9:01 ` [PATCH 3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: " Bartosz Golaszewski
  2025-07-01 11:11 ` [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Konrad Dybcio
  3 siblings, 1 reply; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-07-01  9:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The I2C GPIO bus driver enforces the SDA and SCL pins as open-drain
outputs but the lookup flags in the DTS don't reflect that triggering
warnings from GPIO core. Add the appropriate flags.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
index a37860175d2733214f1b257e84d5cb4821033242..bdf2d66e40c62596b8b024de833835a0750df35d 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
@@ -65,8 +66,8 @@ hdmi_con: endpoint {
 	i2c2_gpio: i2c {
 		compatible = "i2c-gpio";
 
-		sda-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
-		scl-gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
+		sda-gpios = <&tlmm 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&tlmm 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 

-- 
2.48.1


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

* [PATCH 3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: fix GPIO lookup flags for i2c SDA and SCL
  2025-07-01  9:01 [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
  2025-07-01  9:01 ` [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL Bartosz Golaszewski
  2025-07-01  9:01 ` [PATCH 2/3] arm64: dts: qcom: qrb4210-rb2: " Bartosz Golaszewski
@ 2025-07-01  9:01 ` Bartosz Golaszewski
  2025-07-01 11:11 ` [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Konrad Dybcio
  3 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-07-01  9:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The I2C GPIO bus driver enforces the SDA and SCL pins as open-drain
outputs but the lookup flags in the DTS don't reflect that triggering
warnings from GPIO core. Add the appropriate flags.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index d686531bf4eacae2105bbed3a9d5478b45a4b2a3..9076d8eb4d50af736d5c4de7158fbf32231f6629 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -145,8 +145,8 @@ rmtfs_mem: rmtfs-mem@fde00000 {
 
 	i2c21 {
 		compatible = "i2c-gpio";
-		sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>;
-		scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
+		sda-gpios = <&tlmm 127 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&tlmm 128 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		i2c-gpio,delay-us = <2>;
 		pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>;
 		pinctrl-names = "default";

-- 
2.48.1


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

* Re: [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins
  2025-07-01  9:01 [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2025-07-01  9:01 ` [PATCH 3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: " Bartosz Golaszewski
@ 2025-07-01 11:11 ` Konrad Dybcio
  2025-07-11  7:52   ` Bartosz Golaszewski
  3 siblings, 1 reply; 9+ messages in thread
From: Konrad Dybcio @ 2025-07-01 11:11 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski



On 01-Jul-25 11:01, Bartosz Golaszewski wrote:
> There are three platforms in the QCom DTS tree that are missing the
> open-drain lookup flag in their DT nodes associated with the i2c-gpio
> device whose driver enforces open-drain outputs. This causes the GPIO
> core to emit warnings such as:
> 
> [    5.153550] gpio-528 (sda): enforced open drain please flag it properly in DT/ACPI DSDT/board file
> [    5.166373] gpio-529 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
> 
> Silence the warnings by adding appriopriate flags.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---

For the series:

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

Konrad

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

* Re: [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
  2025-07-01  9:01 ` [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL Bartosz Golaszewski
@ 2025-07-01 16:09   ` Alexey Klimov
  2025-07-01 16:57     ` Bartosz Golaszewski
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Klimov @ 2025-07-01 16:09 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski

On Tue Jul 1, 2025 at 10:01 AM BST, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> The I2C GPIO bus driver enforces the SDA and SCL pins as open-drain
> outputs but the lookup flags in the DTS don't reflect that triggering
> warnings from GPIO core. Add the appropriate flags.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

This works on RB1, thank you!

Tested-by: Alexey Klimov <alexey.klimov@linaro.org>

This also should be:
Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
hence Cc list is not full.

Best regards,
Alexey


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

* Re: [PATCH 2/3] arm64: dts: qcom: qrb4210-rb2: fix GPIO lookup flags for i2c SDA and SCL
  2025-07-01  9:01 ` [PATCH 2/3] arm64: dts: qcom: qrb4210-rb2: " Bartosz Golaszewski
@ 2025-07-01 16:23   ` Alexey Klimov
  0 siblings, 0 replies; 9+ messages in thread
From: Alexey Klimov @ 2025-07-01 16:23 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski

On Tue Jul 1, 2025 at 10:01 AM BST, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> The I2C GPIO bus driver enforces the SDA and SCL pins as open-drain
> outputs but the lookup flags in the DTS don't reflect that triggering
> warnings from GPIO core. Add the appropriate flags.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Reported-by: Alexey Klimov <alexey.klimov@linaro.org>

> ---
>  arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
> index a37860175d2733214f1b257e84d5cb4821033242..bdf2d66e40c62596b8b024de833835a0750df35d 100644
> --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
> @@ -5,6 +5,7 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/leds/common.h>
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6asm.h>
> @@ -65,8 +66,8 @@ hdmi_con: endpoint {
>  	i2c2_gpio: i2c {
>  		compatible = "i2c-gpio";
>  
> -		sda-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
> -		scl-gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
> +		sda-gpios = <&tlmm 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&tlmm 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
>  


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

* Re: [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
  2025-07-01 16:09   ` Alexey Klimov
@ 2025-07-01 16:57     ` Bartosz Golaszewski
  0 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-07-01 16:57 UTC (permalink / raw)
  To: Alexey Klimov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	Bartosz Golaszewski

On Tue, Jul 1, 2025 at 6:09 PM Alexey Klimov <alexey.klimov@linaro.org> wrote:
>
> On Tue Jul 1, 2025 at 10:01 AM BST, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > The I2C GPIO bus driver enforces the SDA and SCL pins as open-drain
> > outputs but the lookup flags in the DTS don't reflect that triggering
> > warnings from GPIO core. Add the appropriate flags.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> This works on RB1, thank you!
>
> Tested-by: Alexey Klimov <alexey.klimov@linaro.org>
>
> This also should be:
> Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
> hence Cc list is not full.
>

Thanks, I should have added it when sending.

Bart

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

* Re: [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins
  2025-07-01 11:11 ` [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Konrad Dybcio
@ 2025-07-11  7:52   ` Bartosz Golaszewski
  0 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-07-11  7:52 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	Bartosz Golaszewski

On Tue, Jul 1, 2025 at 1:11 PM Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> wrote:
>
>
>
> On 01-Jul-25 11:01, Bartosz Golaszewski wrote:
> > There are three platforms in the QCom DTS tree that are missing the
> > open-drain lookup flag in their DT nodes associated with the i2c-gpio
> > device whose driver enforces open-drain outputs. This causes the GPIO
> > core to emit warnings such as:
> >
> > [    5.153550] gpio-528 (sda): enforced open drain please flag it properly in DT/ACPI DSDT/board file
> > [    5.166373] gpio-529 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
> >
> > Silence the warnings by adding appriopriate flags.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
>
> For the series:
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>

We're late into rc5 so gentle ping, any chance we could get this
queued for v6.17?

Bartosz

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

end of thread, other threads:[~2025-07-11  7:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-01  9:01 [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
2025-07-01  9:01 ` [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL Bartosz Golaszewski
2025-07-01 16:09   ` Alexey Klimov
2025-07-01 16:57     ` Bartosz Golaszewski
2025-07-01  9:01 ` [PATCH 2/3] arm64: dts: qcom: qrb4210-rb2: " Bartosz Golaszewski
2025-07-01 16:23   ` Alexey Klimov
2025-07-01  9:01 ` [PATCH 3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: " Bartosz Golaszewski
2025-07-01 11:11 ` [PATCH 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Konrad Dybcio
2025-07-11  7:52   ` Bartosz Golaszewski

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®