All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
       [not found] <CGME20170531110029eucas1p14bb9468f72155d88364c0aa5093ac05d@eucas1p1.samsung.com>
@ 2017-05-31 11:00 ` Marek Szyprowski
  2017-05-31 11:17   ` Hans Verkuil
  2017-05-31 19:55   ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Marek Szyprowski @ 2017-05-31 11:00 UTC (permalink / raw)
  To: linux-media, linux-samsung-soc
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Andrzej Hajda, Hans Verkuil

Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
Exynos4 SoC series, so enable support for it using the same compatible
string.

Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos5250-pinctrl.dtsi          |  7 +++++++
 arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  4 ++++
 arch/arm/boot/dts/exynos5250.dtsi                  | 13 +++++++++++++
 arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  7 +++++++
 arch/arm/boot/dts/exynos5420.dtsi                  | 13 +++++++++++++
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 ++++
 6 files changed, 48 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
index 2f6ab32b5954..1fd122db18e6 100644
--- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
@@ -589,6 +589,13 @@
 		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
 		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
 	};
+
+	hdmi_cec: hdmi-cec {
+		samsung,pins = "gpx3-6";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
 };
 
 &pinctrl_1 {
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
index 8f3a80430748..e1d293dbbe5d 100644
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
@@ -272,6 +272,10 @@
 	vdd_pll-supply = <&ldo8_reg>;
 };
 
+&hdmicec {
+	status = "okay";
+};
+
 &i2c_0 {
 	status = "okay";
 	samsung,i2c-sda-delay = <100>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 79c9c885613a..fbdc1d53a2ce 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -689,6 +689,19 @@
 			samsung,syscon-phandle = <&pmu_system_controller>;
 		};
 
+		hdmicec: cec@101B0000 {
+			compatible = "samsung,s5p-cec";
+			reg = <0x101B0000 0x200>;
+			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clock CLK_HDMI_CEC>;
+			clock-names = "hdmicec";
+			samsung,syscon-phandle = <&pmu_system_controller>;
+			hdmi-phandle = <&hdmi>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdmi_cec>;
+			status = "disabled";
+		};
+
 		mixer@14450000 {
 			compatible = "samsung,exynos5250-mixer";
 			reg = <0x14450000 0x10000>;
diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
index 3924b4fafe72..65aa0e300c23 100644
--- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
@@ -67,6 +67,13 @@
 		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
 		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
 	};
+
+	hdmi_cec: hdmi-cec {
+		samsung,pins = "gpx3-6";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+	};
 };
 
 &pinctrl_1 {
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 0db0bcf8da36..acd77b10b3df 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -624,6 +624,19 @@
 			reg = <0x145D0000 0x20>;
 		};
 
+		hdmicec: cec@101B0000 {
+			compatible = "samsung,s5p-cec";
+			reg = <0x101B0000 0x200>;
+			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clock CLK_HDMI_CEC>;
+			clock-names = "hdmicec";
+			samsung,syscon-phandle = <&pmu_system_controller>;
+			hdmi-phandle = <&hdmi>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdmi_cec>;
+			status = "disabled";
+		};
+
 		mixer: mixer@14450000 {
 			compatible = "samsung,exynos5420-mixer";
 			reg = <0x14450000 0x10000>;
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 05b9afdd6757..01d6ac99e974 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -265,6 +265,10 @@
 	vdd-supply = <&ldo6_reg>;
 };
 
+&hdmicec {
+	status = "okay";
+};
+
 &hsi2c_4 {
 	status = "okay";
 
-- 
1.9.1

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

* Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
  2017-05-31 11:00 ` [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family Marek Szyprowski
@ 2017-05-31 11:17   ` Hans Verkuil
  2017-05-31 12:04     ` Marek Szyprowski
  2017-05-31 19:55   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Verkuil @ 2017-05-31 11:17 UTC (permalink / raw)
  To: Marek Szyprowski, linux-media, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Andrzej Hajda

On 05/31/17 13:00, Marek Szyprowski wrote:
> Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
> Exynos4 SoC series, so enable support for it using the same compatible
> string.
> 
> Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.

Thanks!

Do you know if the CEC block is always on for these devices or only if there
is a hotplug signal? That was a problem with the exynos4 odroid.

I have made a patch (not posted yet) to signal this in the device tree and
added a CEC capability to signal this to the user.

This capability will be added to 4.13 (see my patch 'cec: add CEC_CAP_NEEDS_HPD'
from May 25th) since the DisplayPort CEC tunneling feature needs it as well.

It's easy to test: don't connect an HDMI cable and run:

cec-ctl --playback
cec-ctl -t0 --image-view-on

If this returns with a NACK error, then it is OK. If you get a kernel message
that the transmit timed out, then you need this capability since CEC is disabled
without HPD.

Regards,

	Hans

> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5250-pinctrl.dtsi          |  7 +++++++
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  4 ++++
>  arch/arm/boot/dts/exynos5250.dtsi                  | 13 +++++++++++++
>  arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  7 +++++++
>  arch/arm/boot/dts/exynos5420.dtsi                  | 13 +++++++++++++
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 ++++
>  6 files changed, 48 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> index 2f6ab32b5954..1fd122db18e6 100644
> --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> @@ -589,6 +589,13 @@
>  		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
>  		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>  	};
> +
> +	hdmi_cec: hdmi-cec {
> +		samsung,pins = "gpx3-6";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
> +		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
>  };
>  
>  &pinctrl_1 {
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> index 8f3a80430748..e1d293dbbe5d 100644
> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -272,6 +272,10 @@
>  	vdd_pll-supply = <&ldo8_reg>;
>  };
>  
> +&hdmicec {
> +	status = "okay";
> +};
> +
>  &i2c_0 {
>  	status = "okay";
>  	samsung,i2c-sda-delay = <100>;
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index 79c9c885613a..fbdc1d53a2ce 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -689,6 +689,19 @@
>  			samsung,syscon-phandle = <&pmu_system_controller>;
>  		};
>  
> +		hdmicec: cec@101B0000 {
> +			compatible = "samsung,s5p-cec";
> +			reg = <0x101B0000 0x200>;
> +			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clock CLK_HDMI_CEC>;
> +			clock-names = "hdmicec";
> +			samsung,syscon-phandle = <&pmu_system_controller>;
> +			hdmi-phandle = <&hdmi>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&hdmi_cec>;
> +			status = "disabled";
> +		};
> +
>  		mixer@14450000 {
>  			compatible = "samsung,exynos5250-mixer";
>  			reg = <0x14450000 0x10000>;
> diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
> index 3924b4fafe72..65aa0e300c23 100644
> --- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
> @@ -67,6 +67,13 @@
>  		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
>  		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
>  	};
> +
> +	hdmi_cec: hdmi-cec {
> +		samsung,pins = "gpx3-6";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
> +		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
> +	};
>  };
>  
>  &pinctrl_1 {
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 0db0bcf8da36..acd77b10b3df 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -624,6 +624,19 @@
>  			reg = <0x145D0000 0x20>;
>  		};
>  
> +		hdmicec: cec@101B0000 {
> +			compatible = "samsung,s5p-cec";
> +			reg = <0x101B0000 0x200>;
> +			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clock CLK_HDMI_CEC>;
> +			clock-names = "hdmicec";
> +			samsung,syscon-phandle = <&pmu_system_controller>;
> +			hdmi-phandle = <&hdmi>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&hdmi_cec>;
> +			status = "disabled";
> +		};
> +
>  		mixer: mixer@14450000 {
>  			compatible = "samsung,exynos5420-mixer";
>  			reg = <0x14450000 0x10000>;
> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> index 05b9afdd6757..01d6ac99e974 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> @@ -265,6 +265,10 @@
>  	vdd-supply = <&ldo6_reg>;
>  };
>  
> +&hdmicec {
> +	status = "okay";
> +};
> +
>  &hsi2c_4 {
>  	status = "okay";
>  
> 

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

* Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
  2017-05-31 11:17   ` Hans Verkuil
@ 2017-05-31 12:04     ` Marek Szyprowski
  2017-05-31 12:58       ` Hans Verkuil
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Szyprowski @ 2017-05-31 12:04 UTC (permalink / raw)
  To: Hans Verkuil, linux-media, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Andrzej Hajda

Hi Hans,

On 2017-05-31 13:17, Hans Verkuil wrote:
> On 05/31/17 13:00, Marek Szyprowski wrote:
>> Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
>> Exynos4 SoC series, so enable support for it using the same compatible
>> string.
>>
>> Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
> Thanks!
>
> Do you know if the CEC block is always on for these devices or only if there
> is a hotplug signal? That was a problem with the exynos4 odroid.

Odroid XU3 has exactly same wiring between SoC & HDMI connector (via 
IP4791CZ12
chip) as Odroid U3, so I expect the same issues.

I don't have schematic for Google Snow board, so I have no idea how it works
there.

> I have made a patch (not posted yet) to signal this in the device tree and
> added a CEC capability to signal this to the user.
>
> This capability will be added to 4.13 (see my patch 'cec: add CEC_CAP_NEEDS_HPD'
> from May 25th) since the DisplayPort CEC tunneling feature needs it as well.
>
> It's easy to test: don't connect an HDMI cable and run:
>
> cec-ctl --playback
> cec-ctl -t0 --image-view-on
>
> If this returns with a NACK error, then it is OK. If you get a kernel message
> that the transmit timed out, then you need this capability since CEC is disabled
> without HPD.

I've checked those commands, but on all tested boards (Odroid U3+, 
Odroid XU3 and
Google Snow) I get the following message:

Transmit from Unregistered to TV (255 to 0):
CEC_MSG_IMAGE_VIEW_ON (0x04)
         Sequence: 19 Tx Timestamp: 175.935s
         Tx, Error (1), Max Retries

I have never got a timeout message from the kernel. Do I need to enable 
some kind
of CEC debugs?

 > [...]

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

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

* Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
  2017-05-31 12:04     ` Marek Szyprowski
@ 2017-05-31 12:58       ` Hans Verkuil
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2017-05-31 12:58 UTC (permalink / raw)
  To: Marek Szyprowski, linux-media, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Andrzej Hajda

On 05/31/17 14:04, Marek Szyprowski wrote:
> Hi Hans,
> 
> On 2017-05-31 13:17, Hans Verkuil wrote:
>> On 05/31/17 13:00, Marek Szyprowski wrote:
>>> Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
>>> Exynos4 SoC series, so enable support for it using the same compatible
>>> string.
>>>
>>> Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
>> Thanks!
>>
>> Do you know if the CEC block is always on for these devices or only if there
>> is a hotplug signal? That was a problem with the exynos4 odroid.
> 
> Odroid XU3 has exactly same wiring between SoC & HDMI connector (via 
> IP4791CZ12
> chip) as Odroid U3, so I expect the same issues.
> 
> I don't have schematic for Google Snow board, so I have no idea how it works
> there.
> 
>> I have made a patch (not posted yet) to signal this in the device tree and
>> added a CEC capability to signal this to the user.
>>
>> This capability will be added to 4.13 (see my patch 'cec: add CEC_CAP_NEEDS_HPD'
>> from May 25th) since the DisplayPort CEC tunneling feature needs it as well.
>>
>> It's easy to test: don't connect an HDMI cable and run:
>>
>> cec-ctl --playback
>> cec-ctl -t0 --image-view-on
>>
>> If this returns with a NACK error, then it is OK. If you get a kernel message
>> that the transmit timed out, then you need this capability since CEC is disabled
>> without HPD.
> 
> I've checked those commands, but on all tested boards (Odroid U3+, 
> Odroid XU3 and
> Google Snow) I get the following message:
> 
> Transmit from Unregistered to TV (255 to 0):
> CEC_MSG_IMAGE_VIEW_ON (0x04)
>          Sequence: 19 Tx Timestamp: 175.935s
>          Tx, Error (1), Max Retries
> 
> I have never got a timeout message from the kernel. Do I need to enable 
> some kind
> of CEC debugs?

Ah, that's right. CEC works, but the level shifter drops the CEC signal
when there is no HPD. So this is actually quite hard to test.

The easiest is to get a Pulse-Eight USB CEC adapter since then you can
connect the odroid to the Pulse-Eight without connecting that to a TV
in turn. Sending a CEC command would show up with the Pulse-Eight if CEC
works without HPD.

Regards,

	Hans

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

* Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
  2017-05-31 11:00 ` [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family Marek Szyprowski
  2017-05-31 11:17   ` Hans Verkuil
@ 2017-05-31 19:55   ` Krzysztof Kozlowski
  2017-06-01  6:19     ` Marek Szyprowski
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-05-31 19:55 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-media, linux-samsung-soc, Bartlomiej Zolnierkiewicz,
	Andrzej Hajda, Hans Verkuil

On Wed, May 31, 2017 at 01:00:17PM +0200, Marek Szyprowski wrote:
> Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
> Exynos4 SoC series, so enable support for it using the same compatible
> string.
> 
> Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5250-pinctrl.dtsi          |  7 +++++++
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  4 ++++
>  arch/arm/boot/dts/exynos5250.dtsi                  | 13 +++++++++++++
>  arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  7 +++++++
>  arch/arm/boot/dts/exynos5420.dtsi                  | 13 +++++++++++++
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 ++++
>  6 files changed, 48 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> index 2f6ab32b5954..1fd122db18e6 100644
> --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> @@ -589,6 +589,13 @@
>  		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
>  		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>  	};
> +
> +	hdmi_cec: hdmi-cec {
> +		samsung,pins = "gpx3-6";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
> +		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
>  };
>  
>  &pinctrl_1 {
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> index 8f3a80430748..e1d293dbbe5d 100644
> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -272,6 +272,10 @@
>  	vdd_pll-supply = <&ldo8_reg>;
>  };
>  
> +&hdmicec {
> +	status = "okay";
> +};
> +
>  &i2c_0 {
>  	status = "okay";
>  	samsung,i2c-sda-delay = <100>;
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index 79c9c885613a..fbdc1d53a2ce 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -689,6 +689,19 @@
>  			samsung,syscon-phandle = <&pmu_system_controller>;
>  		};
>  
> +		hdmicec: cec@101B0000 {
> +			compatible = "samsung,s5p-cec";
> +			reg = <0x101B0000 0x200>;
> +			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clock CLK_HDMI_CEC>;
> +			clock-names = "hdmicec";
> +			samsung,syscon-phandle = <&pmu_system_controller>;
> +			hdmi-phandle = <&hdmi>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&hdmi_cec>;
> +			status = "disabled";
> +		};

What about Exynos5410? Is it applicable there as well? If yes, then this
could be added to exynos5.dtsi... although then clocks and pinctrl
should remain in SoC-specific DTSI. We're following such pattern in many
places but I am not sure if this more readable.

Beside that, looks fine to me.

Best regards,
Krzysztof

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

* Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
  2017-05-31 19:55   ` Krzysztof Kozlowski
@ 2017-06-01  6:19     ` Marek Szyprowski
  2017-06-02 15:19       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Szyprowski @ 2017-06-01  6:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-media, linux-samsung-soc, Bartlomiej Zolnierkiewicz,
	Andrzej Hajda, Hans Verkuil

Hi Krzysztof,

On 2017-05-31 21:55, Krzysztof Kozlowski wrote:
> On Wed, May 31, 2017 at 01:00:17PM +0200, Marek Szyprowski wrote:
>> Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
>> Exynos4 SoC series, so enable support for it using the same compatible
>> string.
>>
>> Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>   arch/arm/boot/dts/exynos5250-pinctrl.dtsi          |  7 +++++++
>>   arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  4 ++++
>>   arch/arm/boot/dts/exynos5250.dtsi                  | 13 +++++++++++++
>>   arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  7 +++++++
>>   arch/arm/boot/dts/exynos5420.dtsi                  | 13 +++++++++++++
>>   arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 ++++
>>   6 files changed, 48 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
>> index 2f6ab32b5954..1fd122db18e6 100644
>> --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
>> @@ -589,6 +589,13 @@
>>   		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
>>   		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>>   	};
>> +
>> +	hdmi_cec: hdmi-cec {
>> +		samsung,pins = "gpx3-6";
>> +		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
>> +		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
>> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>> +	};
>>   };
>>   
>>   &pinctrl_1 {
>> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
>> index 8f3a80430748..e1d293dbbe5d 100644
>> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
>> @@ -272,6 +272,10 @@
>>   	vdd_pll-supply = <&ldo8_reg>;
>>   };
>>   
>> +&hdmicec {
>> +	status = "okay";
>> +};
>> +
>>   &i2c_0 {
>>   	status = "okay";
>>   	samsung,i2c-sda-delay = <100>;
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>> index 79c9c885613a..fbdc1d53a2ce 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -689,6 +689,19 @@
>>   			samsung,syscon-phandle = <&pmu_system_controller>;
>>   		};
>>   
>> +		hdmicec: cec@101B0000 {
>> +			compatible = "samsung,s5p-cec";
>> +			reg = <0x101B0000 0x200>;
>> +			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
>> +			clocks = <&clock CLK_HDMI_CEC>;
>> +			clock-names = "hdmicec";
>> +			samsung,syscon-phandle = <&pmu_system_controller>;
>> +			hdmi-phandle = <&hdmi>;
>> +			pinctrl-names = "default";
>> +			pinctrl-0 = <&hdmi_cec>;
>> +			status = "disabled";
>> +		};
> What about Exynos5410? Is it applicable there as well? If yes, then this
> could be added to exynos5.dtsi... although then clocks and pinctrl
> should remain in SoC-specific DTSI. We're following such pattern in many
> places but I am not sure if this more readable.

Exynos5410 has the same HW module, but as for now, it doesn't have 
support for
HDMI due to missing a few pieces (mainly clocks definitions). I'm not sure
if it makes sense to add only HDMICEC without HDMI itself. Maybe later, when
multimedia support is added to Exynos5410, this can be integrated to
exynos5.dtsi.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

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

* Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family
  2017-06-01  6:19     ` Marek Szyprowski
@ 2017-06-02 15:19       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-02 15:19 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-media, linux-samsung-soc, Bartlomiej Zolnierkiewicz,
	Andrzej Hajda, Hans Verkuil

On Thu, Jun 01, 2017 at 08:19:23AM +0200, Marek Szyprowski wrote:
> Hi Krzysztof,
> 
> On 2017-05-31 21:55, Krzysztof Kozlowski wrote:
> > On Wed, May 31, 2017 at 01:00:17PM +0200, Marek Szyprowski wrote:
> > > Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
> > > Exynos4 SoC series, so enable support for it using the same compatible
> > > string.
> > > 
> > > Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
> > > 
> > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > > ---
> > >   arch/arm/boot/dts/exynos5250-pinctrl.dtsi          |  7 +++++++
> > >   arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  4 ++++
> > >   arch/arm/boot/dts/exynos5250.dtsi                  | 13 +++++++++++++
> > >   arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  7 +++++++
> > >   arch/arm/boot/dts/exynos5420.dtsi                  | 13 +++++++++++++
> > >   arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 ++++
> > >   6 files changed, 48 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> > > index 2f6ab32b5954..1fd122db18e6 100644
> > > --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> > > @@ -589,6 +589,13 @@
> > >   		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
> > >   		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> > >   	};
> > > +
> > > +	hdmi_cec: hdmi-cec {
> > > +		samsung,pins = "gpx3-6";
> > > +		samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
> > > +		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
> > > +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> > > +	};
> > >   };
> > >   &pinctrl_1 {
> > > diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> > > index 8f3a80430748..e1d293dbbe5d 100644
> > > --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> > > @@ -272,6 +272,10 @@
> > >   	vdd_pll-supply = <&ldo8_reg>;
> > >   };
> > > +&hdmicec {
> > > +	status = "okay";
> > > +};
> > > +
> > >   &i2c_0 {
> > >   	status = "okay";
> > >   	samsung,i2c-sda-delay = <100>;
> > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> > > index 79c9c885613a..fbdc1d53a2ce 100644
> > > --- a/arch/arm/boot/dts/exynos5250.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5250.dtsi
> > > @@ -689,6 +689,19 @@
> > >   			samsung,syscon-phandle = <&pmu_system_controller>;
> > >   		};
> > > +		hdmicec: cec@101B0000 {
> > > +			compatible = "samsung,s5p-cec";
> > > +			reg = <0x101B0000 0x200>;
> > > +			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
> > > +			clocks = <&clock CLK_HDMI_CEC>;
> > > +			clock-names = "hdmicec";
> > > +			samsung,syscon-phandle = <&pmu_system_controller>;
> > > +			hdmi-phandle = <&hdmi>;
> > > +			pinctrl-names = "default";
> > > +			pinctrl-0 = <&hdmi_cec>;
> > > +			status = "disabled";
> > > +		};
> > What about Exynos5410? Is it applicable there as well? If yes, then this
> > could be added to exynos5.dtsi... although then clocks and pinctrl
> > should remain in SoC-specific DTSI. We're following such pattern in many
> > places but I am not sure if this more readable.
> 
> Exynos5410 has the same HW module, but as for now, it doesn't have support
> for
> HDMI due to missing a few pieces (mainly clocks definitions). I'm not sure
> if it makes sense to add only HDMICEC without HDMI itself. Maybe later, when
> multimedia support is added to Exynos5410, this can be integrated to
> exynos5.dtsi.

Sounds fair, applied. Thanks!

Best regards,
Krzysztof

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

end of thread, other threads:[~2017-06-02 15:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170531110029eucas1p14bb9468f72155d88364c0aa5093ac05d@eucas1p1.samsung.com>
2017-05-31 11:00 ` [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family Marek Szyprowski
2017-05-31 11:17   ` Hans Verkuil
2017-05-31 12:04     ` Marek Szyprowski
2017-05-31 12:58       ` Hans Verkuil
2017-05-31 19:55   ` Krzysztof Kozlowski
2017-06-01  6:19     ` Marek Szyprowski
2017-06-02 15:19       ` 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.