Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery

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>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Dima Azarkin and committed by
Shawn Guo
efd9d241 36034ae5

+22 -2
+22 -2
arch/arm/boot/dts/imx6qdl-wandboard.dtsi
··· 97 97 98 98 &i2c1 { 99 99 clock-frequency = <100000>; 100 - pinctrl-names = "default"; 100 + pinctrl-names = "default", "gpio"; 101 101 pinctrl-0 = <&pinctrl_i2c1>; 102 + pinctrl-1 = <&pinctrl_i2c1_gpio>; 103 + scl-gpios = <&gpio3 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 104 + sda-gpios = <&gpio3 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 102 105 status = "okay"; 103 106 }; 104 107 105 108 &i2c2 { 106 109 clock-frequency = <100000>; 107 - pinctrl-names = "default"; 110 + pinctrl-names = "default", "gpio"; 108 111 pinctrl-0 = <&pinctrl_i2c2>; 112 + pinctrl-1 = <&pinctrl_i2c2_gpio>; 113 + scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 114 + sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 109 115 status = "okay"; 110 116 111 117 codec: sgtl5000@a { ··· 191 185 >; 192 186 }; 193 187 188 + pinctrl_i2c1_gpio: i2c1gpiogrp { 189 + fsl,pins = < 190 + MX6QDL_PAD_EIM_D21__GPIO3_IO21 0x4001b8b0 191 + MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x4001b8b0 192 + >; 193 + }; 194 + 194 195 pinctrl_i2c2: i2c2grp { 195 196 fsl,pins = < 196 197 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 197 198 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 199 + >; 200 + }; 201 + 202 + pinctrl_i2c2_gpio: i2c2gpiogrp { 203 + fsl,pins = < 204 + MX6QDL_PAD_KEY_COL3__GPIO4_IO12 0x4001b8b0 205 + MX6QDL_PAD_KEY_ROW3__GPIO4_IO13 0x4001b8b0 198 206 >; 199 207 }; 200 208