linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins
@ 2025-08-11 15:06 Bartosz Golaszewski
  2025-08-11 15:06 ` [PATCH RESEND 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; 5+ messages in thread
From: Bartosz Golaszewski @ 2025-08-11 15:06 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski,
	Alexey Klimov, Konrad Dybcio

Resending rebased on top of v6.17-rc1 as this missed the previous merge
window.

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: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250701-qcom-gpio-lookup-open-drain-e3443115ea24

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


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

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

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.

Tested-by: Alexey Klimov <alexey.klimov@linaro.org>
Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 related	[flat|nested] 5+ messages in thread

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

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.

Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 related	[flat|nested] 5+ messages in thread

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

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.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 related	[flat|nested] 5+ messages in thread

* Re: [PATCH RESEND 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins
  2025-08-11 15:06 [PATCH RESEND 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2025-08-11 15:06 ` [PATCH RESEND 3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: " Bartosz Golaszewski
@ 2025-08-11 18:40 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2025-08-11 18:40 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bartosz Golaszewski
  Cc: linux-arm-msm, devicetree, linux-kernel, Bartosz Golaszewski,
	Alexey Klimov, Konrad Dybcio


On Mon, 11 Aug 2025 17:06:47 +0200, Bartosz Golaszewski wrote:
> Resending rebased on top of v6.17-rc1 as this missed the previous merge
> window.
> 
> 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:
> 
> [...]

Applied, thanks!

[1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
      commit: b2659ddbc2999e8b56edbcd12251b3e469bd0bca
[2/3] arm64: dts: qcom: qrb4210-rb2: fix GPIO lookup flags for i2c SDA and SCL
      commit: f07f492773b70efe01f9966703fef658b428f17b
[3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: fix GPIO lookup flags for i2c SDA and SCL
      commit: 25197809e78c5ff521353acce00406cc2b4bbc16

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2025-08-11 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 15:06 [PATCH RESEND 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bartosz Golaszewski
2025-08-11 15:06 ` [PATCH RESEND 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL Bartosz Golaszewski
2025-08-11 15:06 ` [PATCH RESEND 2/3] arm64: dts: qcom: qrb4210-rb2: " Bartosz Golaszewski
2025-08-11 15:06 ` [PATCH RESEND 3/3] arm64: dts: qcom: sdm845-samsung-starqltechn: " Bartosz Golaszewski
2025-08-11 18:40 ` [PATCH RESEND 0/3] arm64: dts: qcom: fix GPIO lookup flags for i2c-gpio SDA and SCL pins Bjorn Andersson

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).