[PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL

Bartosz Golaszewski posted 3 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
Posted by Bartosz Golaszewski 3 months, 1 week ago
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
Re: [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
Posted by Alexey Klimov 3 months, 1 week ago
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
Re: [PATCH 1/3] arm64: dts: qcom: qrb2210-rb1: fix GPIO lookup flags for i2c SDA and SCL
Posted by Bartosz Golaszewski 3 months, 1 week ago
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