* [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC [not found] <CGME20180726101245eucas1p16d84c77490d9eb81300f38c2f3fb34a5@eucas1p1.samsung.com> @ 2018-07-26 10:12 ` Andrzej Hajda [not found] ` <CGME20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd@eucas1p1.samsung.com> 2018-07-26 10:23 ` [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Krzysztof Kozlowski 0 siblings, 2 replies; 12+ messages in thread From: Andrzej Hajda @ 2018-07-26 10:12 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: devicetree, linux-samsung-soc, Bartlomiej Zolnierkiewicz, dri-devel, Marek Szyprowski HDMI-DDC for unknown reasons doesn't work with Exynos I2C controllers. Fortunately i2c-gpio comes to the rescue. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 24 +++++++++++++++-------- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 ++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 816d89d4cefd..591023391f7d 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -211,7 +211,7 @@ &hdmi { status = "okay"; - ddc = <&i2c_2>; + ddc = <&i2c_ddc>; hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; vdd_osc-supply = <&ldo10_reg>; vdd_pll-supply = <&ldo8_reg>; @@ -513,13 +513,6 @@ }; }; -&i2c_2 { - status = "okay"; - /* used by HDMI DDC */ - samsung,i2c-sda-delay = <100>; - samsung,i2c-max-bus-freq = <66000>; -}; - &i2c_3 { status = "okay"; @@ -608,3 +601,18 @@ status = "okay"; samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; }; + +&soc { + i2c_ddc: i2c-gpio { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_gpio_bus>; + status = "okay"; + compatible = "i2c-gpio"; + gpios = <&gpa0 6 0 /* sda */ + &gpa0 7 0 /* scl */ + >; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; +}; diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi index 6ff6dea29d44..b25d520393b8 100644 --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi @@ -225,6 +225,12 @@ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; }; + i2c2_gpio_bus: i2c2-gpio-bus { + samsung,pins = "gpa0-6", "gpa0-7"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; + }; + uart2_data: uart2-data { samsung,pins = "gpa1-0", "gpa1-1"; samsung,pin-function = <EXYNOS_PIN_FUNC_2>; -- 2.18.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <CGME20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd@eucas1p1.samsung.com>]
* [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling [not found] ` <CGME20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd@eucas1p1.samsung.com> @ 2018-07-26 10:12 ` Andrzej Hajda 2018-07-26 10:44 ` Krzysztof Kozlowski 2018-08-29 18:58 ` Krzysztof Kozlowski 0 siblings, 2 replies; 12+ messages in thread From: Andrzej Hajda @ 2018-07-26 10:12 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: devicetree, linux-samsung-soc, Bartlomiej Zolnierkiewicz, dri-devel, Marek Szyprowski HDMI-HPD was set active low, moreover by default pincontrol chip sets pull-down on the pin. As a result HDMI driver assumes TV is always connected regardless of actual state. The patch fixes it. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 4 +++- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 591023391f7d..26bae5157177 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -210,9 +210,11 @@ }; &hdmi { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_hpd>; status = "okay"; ddc = <&i2c_ddc>; - hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; + hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>; vdd_osc-supply = <&ldo10_reg>; vdd_pll-supply = <&ldo8_reg>; vdd-supply = <&ldo8_reg>; diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi index b25d520393b8..d31a68672bfa 100644 --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi @@ -599,6 +599,11 @@ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; }; + + hdmi_hpd: hdmi-hpd { + samsung,pins = "gpx3-7"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; }; &pinctrl_1 { -- 2.18.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling 2018-07-26 10:12 ` [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling Andrzej Hajda @ 2018-07-26 10:44 ` Krzysztof Kozlowski 2018-07-26 11:50 ` Andrzej Hajda 2018-08-29 18:58 ` Krzysztof Kozlowski 1 sibling, 1 reply; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-07-26 10:44 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26 July 2018 at 12:12, Andrzej Hajda <a.hajda@samsung.com> wrote: > HDMI-HPD was set active low, moreover by default pincontrol > chip sets pull-down on the pin. As a result HDMI driver > assumes TV is always connected regardless of actual state. > The patch fixes it. > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > arch/arm/boot/dts/exynos5250-arndale.dts | 4 +++- > arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 5 +++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts > index 591023391f7d..26bae5157177 100644 > --- a/arch/arm/boot/dts/exynos5250-arndale.dts > +++ b/arch/arm/boot/dts/exynos5250-arndale.dts > @@ -210,9 +210,11 @@ > }; > > &hdmi { > + pinctrl-names = "default"; > + pinctrl-0 = <&hdmi_hpd>; > status = "okay"; > ddc = <&i2c_ddc>; > - hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; > + hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>; The gpx3-7 (HDMI-HPD) has external pull up to... so maybe it should be active low? How can it go high if it is already high? I am not sure if this matters because the driver ignores the flags and responds on both falling and rising edge. Best regards, Krzysztof > vdd_osc-supply = <&ldo10_reg>; > vdd_pll-supply = <&ldo8_reg>; > vdd-supply = <&ldo8_reg>; > diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi > index b25d520393b8..d31a68672bfa 100644 > --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi > +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi > @@ -599,6 +599,11 @@ > samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > }; > + > + hdmi_hpd: hdmi-hpd { > + samsung,pins = "gpx3-7"; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > }; > > &pinctrl_1 { > -- > 2.18.0 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling 2018-07-26 10:44 ` Krzysztof Kozlowski @ 2018-07-26 11:50 ` Andrzej Hajda 2018-07-26 11:55 ` Krzysztof Kozlowski 0 siblings, 1 reply; 12+ messages in thread From: Andrzej Hajda @ 2018-07-26 11:50 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26.07.2018 12:44, Krzysztof Kozlowski wrote: > On 26 July 2018 at 12:12, Andrzej Hajda <a.hajda@samsung.com> wrote: >> HDMI-HPD was set active low, moreover by default pincontrol >> chip sets pull-down on the pin. As a result HDMI driver >> assumes TV is always connected regardless of actual state. >> The patch fixes it. >> >> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> >> --- >> arch/arm/boot/dts/exynos5250-arndale.dts | 4 +++- >> arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 5 +++++ >> 2 files changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts >> index 591023391f7d..26bae5157177 100644 >> --- a/arch/arm/boot/dts/exynos5250-arndale.dts >> +++ b/arch/arm/boot/dts/exynos5250-arndale.dts >> @@ -210,9 +210,11 @@ >> }; >> >> &hdmi { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&hdmi_hpd>; >> status = "okay"; >> ddc = <&i2c_ddc>; >> - hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; >> + hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>; > The gpx3-7 (HDMI-HPD) has external pull up to... so maybe it should be > active low? How can it go high if it is already high? > I am not sure if this matters because the driver ignores the flags and > responds on both falling and rising edge. HDMI specification says HPD is active high! Arndale schematics are quite misleading - pull-up resistors near level shifter are marked as not-connected :) so there are no pull-ups. And there is pull-down resistor on right side of the level shifter. And finally with this patch it works as expected, without it it works sometimes. Regards Andrzej > > Best regards, > Krzysztof > >> vdd_osc-supply = <&ldo10_reg>; >> vdd_pll-supply = <&ldo8_reg>; >> vdd-supply = <&ldo8_reg>; >> diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi >> index b25d520393b8..d31a68672bfa 100644 >> --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi >> +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi >> @@ -599,6 +599,11 @@ >> samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; >> samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; >> }; >> + >> + hdmi_hpd: hdmi-hpd { >> + samsung,pins = "gpx3-7"; >> + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; >> + }; >> }; >> >> &pinctrl_1 { >> -- >> 2.18.0 >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling 2018-07-26 11:50 ` Andrzej Hajda @ 2018-07-26 11:55 ` Krzysztof Kozlowski 0 siblings, 0 replies; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-07-26 11:55 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26 July 2018 at 13:50, Andrzej Hajda <a.hajda@samsung.com> wrote: > On 26.07.2018 12:44, Krzysztof Kozlowski wrote: >> On 26 July 2018 at 12:12, Andrzej Hajda <a.hajda@samsung.com> wrote: >>> HDMI-HPD was set active low, moreover by default pincontrol >>> chip sets pull-down on the pin. As a result HDMI driver >>> assumes TV is always connected regardless of actual state. >>> The patch fixes it. >>> >>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> >>> --- >>> arch/arm/boot/dts/exynos5250-arndale.dts | 4 +++- >>> arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 5 +++++ >>> 2 files changed, 8 insertions(+), 1 deletion(-) >>> >>> diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts >>> index 591023391f7d..26bae5157177 100644 >>> --- a/arch/arm/boot/dts/exynos5250-arndale.dts >>> +++ b/arch/arm/boot/dts/exynos5250-arndale.dts >>> @@ -210,9 +210,11 @@ >>> }; >>> >>> &hdmi { >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&hdmi_hpd>; >>> status = "okay"; >>> ddc = <&i2c_ddc>; >>> - hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; >>> + hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>; >> The gpx3-7 (HDMI-HPD) has external pull up to... so maybe it should be >> active low? How can it go high if it is already high? >> I am not sure if this matters because the driver ignores the flags and >> responds on both falling and rising edge. > > HDMI specification says HPD is active high! > Arndale schematics are quite misleading - pull-up resistors near level > shifter are marked as not-connected :) so there are no pull-ups. > And there is pull-down resistor on right side of the level shifter. Ah, I was looking at schematics and looking and looking and still did not see "NC"... My mistake. > And finally with this patch it works as expected, without it it works > sometimes. Everything is good. I already sent last pull request so this will go after merge window, for v4.20 (or whatever number it will be). Best regards, Krzysztof _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling 2018-07-26 10:12 ` [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling Andrzej Hajda 2018-07-26 10:44 ` Krzysztof Kozlowski @ 2018-08-29 18:58 ` Krzysztof Kozlowski 1 sibling, 0 replies; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-08-29 18:58 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On Thu, Jul 26, 2018 at 12:12:28PM +0200, Andrzej Hajda wrote: > HDMI-HPD was set active low, moreover by default pincontrol > chip sets pull-down on the pin. As a result HDMI driver > assumes TV is always connected regardless of actual state. > The patch fixes it. > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > arch/arm/boot/dts/exynos5250-arndale.dts | 4 +++- > arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 5 +++++ Thanks, applied. Best regards, Krzysztof _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC 2018-07-26 10:12 ` [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Andrzej Hajda [not found] ` <CGME20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd@eucas1p1.samsung.com> @ 2018-07-26 10:23 ` Krzysztof Kozlowski 2018-07-26 11:04 ` Andrzej Hajda 1 sibling, 1 reply; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-07-26 10:23 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26 July 2018 at 12:12, Andrzej Hajda <a.hajda@samsung.com> wrote: > HDMI-DDC for unknown reasons doesn't work with Exynos I2C > controllers. Fortunately i2c-gpio comes to the rescue. Wait... what? The I2C controller on SoC (or its driver) is buggy in some way and we need to use these pins as GPIO to run i2c-gpio driver there? It looks like workaround not a proper solution... Best regards, Krzysztof > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > arch/arm/boot/dts/exynos5250-arndale.dts | 24 +++++++++++++++-------- > arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 ++++++ > 2 files changed, 22 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts > index 816d89d4cefd..591023391f7d 100644 > --- a/arch/arm/boot/dts/exynos5250-arndale.dts > +++ b/arch/arm/boot/dts/exynos5250-arndale.dts > @@ -211,7 +211,7 @@ > > &hdmi { > status = "okay"; > - ddc = <&i2c_2>; > + ddc = <&i2c_ddc>; > hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; > vdd_osc-supply = <&ldo10_reg>; > vdd_pll-supply = <&ldo8_reg>; > @@ -513,13 +513,6 @@ > }; > }; > > -&i2c_2 { > - status = "okay"; > - /* used by HDMI DDC */ > - samsung,i2c-sda-delay = <100>; > - samsung,i2c-max-bus-freq = <66000>; > -}; > - > &i2c_3 { > status = "okay"; > > @@ -608,3 +601,18 @@ > status = "okay"; > samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; > }; > + > +&soc { > + i2c_ddc: i2c-gpio { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c2_gpio_bus>; > + status = "okay"; > + compatible = "i2c-gpio"; > + gpios = <&gpa0 6 0 /* sda */ > + &gpa0 7 0 /* scl */ > + >; > + i2c-gpio,delay-us = <2>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > +}; > diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi > index 6ff6dea29d44..b25d520393b8 100644 > --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi > +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi > @@ -225,6 +225,12 @@ > samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > }; > > + i2c2_gpio_bus: i2c2-gpio-bus { > + samsung,pins = "gpa0-6", "gpa0-7"; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > + }; > + > uart2_data: uart2-data { > samsung,pins = "gpa1-0", "gpa1-1"; > samsung,pin-function = <EXYNOS_PIN_FUNC_2>; > -- > 2.18.0 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC 2018-07-26 10:23 ` [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Krzysztof Kozlowski @ 2018-07-26 11:04 ` Andrzej Hajda 2018-07-26 11:51 ` Krzysztof Kozlowski 0 siblings, 1 reply; 12+ messages in thread From: Andrzej Hajda @ 2018-07-26 11:04 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26.07.2018 12:23, Krzysztof Kozlowski wrote: > On 26 July 2018 at 12:12, Andrzej Hajda <a.hajda@samsung.com> wrote: >> HDMI-DDC for unknown reasons doesn't work with Exynos I2C >> controllers. Fortunately i2c-gpio comes to the rescue. > Wait... what? The I2C controller on SoC (or its driver) is buggy in > some way and we need to use these pins as GPIO to run i2c-gpio driver > there? It looks like workaround not a proper solution... But at least working one :) Better solutions are welcome. This seems to be not uncommon issue, if you for example look into odroid vendor kernel you can even find hardcoded EDIDs :) Regards Andrzej > > Best regards, > Krzysztof > >> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> >> --- >> arch/arm/boot/dts/exynos5250-arndale.dts | 24 +++++++++++++++-------- >> arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 ++++++ >> 2 files changed, 22 insertions(+), 8 deletions(-) >> >> diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts >> index 816d89d4cefd..591023391f7d 100644 >> --- a/arch/arm/boot/dts/exynos5250-arndale.dts >> +++ b/arch/arm/boot/dts/exynos5250-arndale.dts >> @@ -211,7 +211,7 @@ >> >> &hdmi { >> status = "okay"; >> - ddc = <&i2c_2>; >> + ddc = <&i2c_ddc>; >> hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; >> vdd_osc-supply = <&ldo10_reg>; >> vdd_pll-supply = <&ldo8_reg>; >> @@ -513,13 +513,6 @@ >> }; >> }; >> >> -&i2c_2 { >> - status = "okay"; >> - /* used by HDMI DDC */ >> - samsung,i2c-sda-delay = <100>; >> - samsung,i2c-max-bus-freq = <66000>; >> -}; >> - >> &i2c_3 { >> status = "okay"; >> >> @@ -608,3 +601,18 @@ >> status = "okay"; >> samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; >> }; >> + >> +&soc { >> + i2c_ddc: i2c-gpio { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&i2c2_gpio_bus>; >> + status = "okay"; >> + compatible = "i2c-gpio"; >> + gpios = <&gpa0 6 0 /* sda */ >> + &gpa0 7 0 /* scl */ >> + >; >> + i2c-gpio,delay-us = <2>; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + }; >> +}; >> diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi >> index 6ff6dea29d44..b25d520393b8 100644 >> --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi >> +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi >> @@ -225,6 +225,12 @@ >> samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; >> }; >> >> + i2c2_gpio_bus: i2c2-gpio-bus { >> + samsung,pins = "gpa0-6", "gpa0-7"; >> + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; >> + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; >> + }; >> + >> uart2_data: uart2-data { >> samsung,pins = "gpa1-0", "gpa1-1"; >> samsung,pin-function = <EXYNOS_PIN_FUNC_2>; >> -- >> 2.18.0 >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC 2018-07-26 11:04 ` Andrzej Hajda @ 2018-07-26 11:51 ` Krzysztof Kozlowski [not found] ` <CGME20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c@eucas1p2.samsung.com> 0 siblings, 1 reply; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-07-26 11:51 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26 July 2018 at 13:04, Andrzej Hajda <a.hajda@samsung.com> wrote: > On 26.07.2018 12:23, Krzysztof Kozlowski wrote: >> On 26 July 2018 at 12:12, Andrzej Hajda <a.hajda@samsung.com> wrote: >>> HDMI-DDC for unknown reasons doesn't work with Exynos I2C >>> controllers. Fortunately i2c-gpio comes to the rescue. >> Wait... what? The I2C controller on SoC (or its driver) is buggy in >> some way and we need to use these pins as GPIO to run i2c-gpio driver >> there? It looks like workaround not a proper solution... > > But at least working one :) Better solutions are welcome. > This seems to be not uncommon issue, if you for example look into odroid > vendor kernel you can even find hardcoded EDIDs :) I am not sure whether hardkernel's tree is a good argument. They took vendor's tree and apply whatever patches/fixes are needed to bring it up. They do not have time to look for correct (the "best") fixes. They choose whatever is working now. Better solution would be to spend months and fix the driver. :) Can you at least mention next to i2c-gpio node that it replaces i2c_2 because of this? Best regards, Krzysztof _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <CGME20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c@eucas1p2.samsung.com>]
* [PATCH v2 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC [not found] ` <CGME20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c@eucas1p2.samsung.com> @ 2018-07-26 13:22 ` Andrzej Hajda 2018-07-26 13:47 ` Krzysztof Kozlowski 2018-08-29 18:57 ` Krzysztof Kozlowski 0 siblings, 2 replies; 12+ messages in thread From: Andrzej Hajda @ 2018-07-26 13:22 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: devicetree, linux-samsung-soc, Bartlomiej Zolnierkiewicz, dri-devel, Marek Szyprowski HDMI-DDC for unknown reasons doesn't work with Exynos I2C controllers. Fortunately i2c-gpio comes to the rescue. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 28 ++++++++++++++++------- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 +++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 816d89d4cefd..e7a9b9aa85f1 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -211,7 +211,7 @@ &hdmi { status = "okay"; - ddc = <&i2c_2>; + ddc = <&i2c_ddc>; hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; vdd_osc-supply = <&ldo10_reg>; vdd_pll-supply = <&ldo8_reg>; @@ -513,13 +513,6 @@ }; }; -&i2c_2 { - status = "okay"; - /* used by HDMI DDC */ - samsung,i2c-sda-delay = <100>; - samsung,i2c-max-bus-freq = <66000>; -}; - &i2c_3 { status = "okay"; @@ -608,3 +601,22 @@ status = "okay"; samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; }; + +&soc { + /* + * For unknown reasons HDMI-DDC does not work with Exynos I2C + * controllers. Lets use software I2C over GPIO pins as a workaround. + */ + i2c_ddc: i2c-gpio { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_gpio_bus>; + status = "okay"; + compatible = "i2c-gpio"; + gpios = <&gpa0 6 0 /* sda */ + &gpa0 7 0 /* scl */ + >; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; +}; diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi index 6ff6dea29d44..b25d520393b8 100644 --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi @@ -225,6 +225,12 @@ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; }; + i2c2_gpio_bus: i2c2-gpio-bus { + samsung,pins = "gpa0-6", "gpa0-7"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; + }; + uart2_data: uart2-data { samsung,pins = "gpa1-0", "gpa1-1"; samsung,pin-function = <EXYNOS_PIN_FUNC_2>; -- 2.18.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC 2018-07-26 13:22 ` [PATCH v2 " Andrzej Hajda @ 2018-07-26 13:47 ` Krzysztof Kozlowski 2018-08-29 18:57 ` Krzysztof Kozlowski 1 sibling, 0 replies; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-07-26 13:47 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On 26 July 2018 at 15:22, Andrzej Hajda <a.hajda@samsung.com> wrote: > HDMI-DDC for unknown reasons doesn't work with Exynos I2C > controllers. Fortunately i2c-gpio comes to the rescue. > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > arch/arm/boot/dts/exynos5250-arndale.dts | 28 ++++++++++++++++------- > arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 +++++ > 2 files changed, 26 insertions(+), 8 deletions(-) > Thanks, looks good. I'll take it after merge window. Best regards, Krzysztof _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC 2018-07-26 13:22 ` [PATCH v2 " Andrzej Hajda 2018-07-26 13:47 ` Krzysztof Kozlowski @ 2018-08-29 18:57 ` Krzysztof Kozlowski 1 sibling, 0 replies; 12+ messages in thread From: Krzysztof Kozlowski @ 2018-08-29 18:57 UTC (permalink / raw) To: Andrzej Hajda Cc: linux-samsung-soc, devicetree, Marek Szyprowski, dri-devel, Bartlomiej Zolnierkiewicz On Thu, Jul 26, 2018 at 03:22:09PM +0200, Andrzej Hajda wrote: > HDMI-DDC for unknown reasons doesn't work with Exynos I2C > controllers. Fortunately i2c-gpio comes to the rescue. > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > arch/arm/boot/dts/exynos5250-arndale.dts | 28 ++++++++++++++++------- > arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 6 +++++ > 2 files changed, 26 insertions(+), 8 deletions(-) Thanks, applied. Best regards, Krzysztof _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-08-29 18:58 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20180726101245eucas1p16d84c77490d9eb81300f38c2f3fb34a5@eucas1p1.samsung.com> 2018-07-26 10:12 ` [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Andrzej Hajda [not found] ` <CGME20180726101248eucas1p14ede2f90176b93f0bfde1808b494abbd@eucas1p1.samsung.com> 2018-07-26 10:12 ` [PATCH 2/2] ARM: dts: exynos: arndale: fix HDMI-HPD line handling Andrzej Hajda 2018-07-26 10:44 ` Krzysztof Kozlowski 2018-07-26 11:50 ` Andrzej Hajda 2018-07-26 11:55 ` Krzysztof Kozlowski 2018-08-29 18:58 ` Krzysztof Kozlowski 2018-07-26 10:23 ` [PATCH 1/2] ARM: dts: exynos: arndale: use i2c-gpio for HDMI-DDC Krzysztof Kozlowski 2018-07-26 11:04 ` Andrzej Hajda 2018-07-26 11:51 ` Krzysztof Kozlowski [not found] ` <CGME20180726132213eucas1p221b5ec5eb4a5e9c9d2ff1d76c7b26b2c@eucas1p2.samsung.com> 2018-07-26 13:22 ` [PATCH v2 " Andrzej Hajda 2018-07-26 13:47 ` Krzysztof Kozlowski 2018-08-29 18:57 ` Krzysztof Kozlowski
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.