All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery
@ 2021-01-31 15:54 Dima Azarkin
  2021-02-01  1:15   ` Fabio Estevam
  2021-03-03 12:47   ` Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Dima Azarkin @ 2021-01-31 15:54 UTC (permalink / raw)
  To: Rob Herring, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Dima Azarkin, Christian Hewitt

The i2c bus on imx6qdl-wandboard has intermittent issues where SDA can freeze
on low level at the end of transaction so the bus can no longer work. This
impacts reading of EDID data leading to incorrect TV resolution and no audio.

This scenario is improved by adding scl/sda gpios definitions to implement the
i2c bus recovery mechanism.

Signed-off-by: Dima Azarkin <azdmg@outlook.com>
---
 arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
index c070893c509e..b62a0dbb033f 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -97,15 +97,21 @@
 
 &i2c1 {
 	clock-frequency = <100000>;
-	pinctrl-names = "default";
+	pinctrl-names = "default", "gpio";
 	pinctrl-0 = <&pinctrl_i2c1>;
+	pinctrl-1 = <&pinctrl_i2c1_gpio>;
+	scl-gpios = <&gpio3 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	sda-gpios = <&gpio3 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 	status = "okay";
 };
 
 &i2c2 {
 	clock-frequency = <100000>;
-	pinctrl-names = "default";
+	pinctrl-names = "default", "gpio";
 	pinctrl-0 = <&pinctrl_i2c2>;
+	pinctrl-1 = <&pinctrl_i2c2_gpio>;
+	scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 	status = "okay";
 
 	codec: sgtl5000@a {
@@ -185,6 +191,13 @@
 			>;
 		};
 
+		pinctrl_i2c1_gpio: i2c1gpiogrp {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_D21__GPIO3_IO21		0x4001b8b0
+				MX6QDL_PAD_EIM_D28__GPIO3_IO28		0x4001b8b0
+			>;
+		};
+
 		pinctrl_i2c2: i2c2grp {
 			fsl,pins = <
 				MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
@@ -192,6 +205,13 @@
 			>;
 		};
 
+		pinctrl_i2c2_gpio: i2c2gpiogrp {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_COL3__GPIO4_IO12		0x4001b8b0
+				MX6QDL_PAD_KEY_ROW3__GPIO4_IO13		0x4001b8b0
+			>;
+		};
+
 		pinctrl_mclk: mclkgrp {
 			fsl,pins = <
 				MX6QDL_PAD_GPIO_0__CCM_CLKO1		0x130b0
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery
  2021-01-31 15:54 [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery Dima Azarkin
@ 2021-02-01  1:15   ` Fabio Estevam
  2021-03-03 12:47   ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2021-02-01  1:15 UTC (permalink / raw)
  To: Dima Azarkin
  Cc: Rob Herring, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, Christian Hewitt

On Sun, Jan 31, 2021 at 12:55 PM Dima Azarkin <azdmg@outlook.com> wrote:
>
> The i2c bus on imx6qdl-wandboard has intermittent issues where SDA can freeze
> on low level at the end of transaction so the bus can no longer work. This
> impacts reading of EDID data leading to incorrect TV resolution and no audio.
>
> This scenario is improved by adding scl/sda gpios definitions to implement the
> i2c bus recovery mechanism.
>
> Signed-off-by: Dima Azarkin <azdmg@outlook.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

* Re: [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery
@ 2021-02-01  1:15   ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2021-02-01  1:15 UTC (permalink / raw)
  To: Dima Azarkin
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Sascha Hauer, Christian Hewitt, linux-kernel, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Sun, Jan 31, 2021 at 12:55 PM Dima Azarkin <azdmg@outlook.com> wrote:
>
> The i2c bus on imx6qdl-wandboard has intermittent issues where SDA can freeze
> on low level at the end of transaction so the bus can no longer work. This
> impacts reading of EDID data leading to incorrect TV resolution and no audio.
>
> This scenario is improved by adding scl/sda gpios definitions to implement the
> i2c bus recovery mechanism.
>
> Signed-off-by: Dima Azarkin <azdmg@outlook.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery
  2021-01-31 15:54 [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery Dima Azarkin
@ 2021-03-03 12:47   ` Shawn Guo
  2021-03-03 12:47   ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2021-03-03 12:47 UTC (permalink / raw)
  To: Dima Azarkin
  Cc: Rob Herring, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, devicetree, linux-arm-kernel,
	linux-kernel, Christian Hewitt

On Sun, Jan 31, 2021 at 06:54:46PM +0300, Dima Azarkin wrote:
> The i2c bus on imx6qdl-wandboard has intermittent issues where SDA can freeze
> on low level at the end of transaction so the bus can no longer work. This
> impacts reading of EDID data leading to incorrect TV resolution and no audio.
> 
> This scenario is improved by adding scl/sda gpios definitions to implement the
> i2c bus recovery mechanism.
> 
> Signed-off-by: Dima Azarkin <azdmg@outlook.com>

Applied, thanks.

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

* Re: [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery
@ 2021-03-03 12:47   ` Shawn Guo
  0 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2021-03-03 12:47 UTC (permalink / raw)
  To: Dima Azarkin
  Cc: Rob Herring, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, devicetree, linux-arm-kernel,
	linux-kernel, Christian Hewitt

On Sun, Jan 31, 2021 at 06:54:46PM +0300, Dima Azarkin wrote:
> The i2c bus on imx6qdl-wandboard has intermittent issues where SDA can freeze
> on low level at the end of transaction so the bus can no longer work. This
> impacts reading of EDID data leading to incorrect TV resolution and no audio.
> 
> This scenario is improved by adding scl/sda gpios definitions to implement the
> i2c bus recovery mechanism.
> 
> Signed-off-by: Dima Azarkin <azdmg@outlook.com>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-03-03 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-31 15:54 [PATCH] ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery Dima Azarkin
2021-02-01  1:15 ` Fabio Estevam
2021-02-01  1:15   ` Fabio Estevam
2021-03-03 12:47 ` Shawn Guo
2021-03-03 12:47   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.