linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload
@ 2017-10-20 10:07 Hans Verkuil
  2017-10-20 10:07 ` [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288 Hans Verkuil
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Hans Verkuil @ 2017-10-20 10:07 UTC (permalink / raw)
  To: linux-media; +Cc: linux-rockchip, Heiko Stuebner

From: Hans Verkuil <hans.verkuil@cisco.com>

This patch series sits on top of these two patch series:

https://lkml.org/lkml/2017/10/13/971
https://lkml.org/lkml/2017/10/14/161

The first adds support for the cec clk in dw-hdmi, the second adds an
iomux-route for the CEC pin on the rk3288.

This patch series defines the cec clk for the rk3288, enables the
first HDMI output on the Firefly Reload. The second output isn't working,
I don't have enough knowledge to enable it. But I can test any patches
adding support for it!

The third patch defines the two possible CEC pins and the last selects
the correct pin for the Firefly Reload.

Likely the same thing can be done for the 'regular' Firefly, but I don't
have the hardware to test.

Regards,

	Hans


Hans Verkuil (4):
  arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288
  arm: dts: rockchip: enable the first hdmi output
  arm: dts: rockchip: define the two possible CEC pins
  arm: dts: rockchip: select which CEC pin is used for the Firefly
    Reload

 arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi |  2 ++
 arch/arm/boot/dts/rk3288-firefly-reload.dts       | 11 +++++++++++
 arch/arm/boot/dts/rk3288.dtsi                     | 12 ++++++++++--
 3 files changed, 23 insertions(+), 2 deletions(-)

-- 
2.14.1

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

* [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288
  2017-10-20 10:07 [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload Hans Verkuil
@ 2017-10-20 10:07 ` Hans Verkuil
  2017-10-21 19:29   ` Heiko Stuebner
  2017-10-20 10:07 ` [PATCH 2/4] arm: dts: rockchip: enable the first hdmi output Hans Verkuil
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Hans Verkuil @ 2017-10-20 10:07 UTC (permalink / raw)
  To: linux-media; +Cc: linux-rockchip, Heiko Stuebner, Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The dw-hdmi block needs the cec clk for the rk3288. Add it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 arch/arm/boot/dts/rk3288.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 356ed1e62452..a48352aa1591 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1124,8 +1124,8 @@
 		reg-io-width = <4>;
 		rockchip,grf = <&grf>;
 		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru  PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;
-		clock-names = "iahb", "isfr";
+		clocks = <&cru  PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
+		clock-names = "iahb", "isfr", "cec";
 		power-domains = <&power RK3288_PD_VIO>;
 		status = "disabled";
 
-- 
2.14.1

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

* [PATCH 2/4] arm: dts: rockchip: enable the first hdmi output
  2017-10-20 10:07 [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload Hans Verkuil
  2017-10-20 10:07 ` [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288 Hans Verkuil
@ 2017-10-20 10:07 ` Hans Verkuil
  2017-10-21 20:06   ` Heiko Stuebner
  2017-10-20 10:07 ` [PATCH 3/4] arm: dts: rockchip: define the two possible CEC pins Hans Verkuil
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Hans Verkuil @ 2017-10-20 10:07 UTC (permalink / raw)
  To: linux-media; +Cc: linux-rockchip, Heiko Stuebner, Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The vdd10_lcd and vcc18_lcd regulators need to be enabled for HDMI output
to work, so add 'regulator-always-on', just as is done in rk3288-firefly.dtsi.

Also enable i2c5 and the hdmi block.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi | 2 ++
 arch/arm/boot/dts/rk3288-firefly-reload.dts       | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi b/arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi
index 5f05815f47e0..5f1e336dbaac 100644
--- a/arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi
@@ -184,6 +184,7 @@
 				regulator-name = "vdd10_lcd";
 				regulator-min-microvolt = <1000000>;
 				regulator-max-microvolt = <1000000>;
+				regulator-always-on;
 			};
 
 			vcca_18: REG7  {
@@ -223,6 +224,7 @@
 				regulator-name = "vcc18_lcd";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
 			};
 		};
 	};
diff --git a/arch/arm/boot/dts/rk3288-firefly-reload.dts b/arch/arm/boot/dts/rk3288-firefly-reload.dts
index 7da0947ababb..859938d8832e 100644
--- a/arch/arm/boot/dts/rk3288-firefly-reload.dts
+++ b/arch/arm/boot/dts/rk3288-firefly-reload.dts
@@ -226,6 +226,11 @@
 	};
 };
 
+&hdmi {
+	ddc-i2c-bus = <&i2c5>;
+	status = "okay";
+};
+
 &i2c0 {
 	hym8563: hym8563@51 {
 		compatible = "haoyu,hym8563";
@@ -255,6 +260,10 @@
 	};
 };
 
+&i2c5 {
+	status = "okay";
+};
+
 &i2s {
 	status = "okay";
 };
-- 
2.14.1

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

* [PATCH 3/4] arm: dts: rockchip: define the two possible CEC pins
  2017-10-20 10:07 [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload Hans Verkuil
  2017-10-20 10:07 ` [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288 Hans Verkuil
  2017-10-20 10:07 ` [PATCH 2/4] arm: dts: rockchip: enable the first hdmi output Hans Verkuil
@ 2017-10-20 10:07 ` Hans Verkuil
  2017-10-21 19:36   ` Heiko Stuebner
  2017-10-20 10:07 ` [PATCH 4/4] arm: dts: rockchip: select which CEC pin is used for the Firefly Reload Hans Verkuil
  2017-10-22  7:40 ` [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on " Hans Verkuil
  4 siblings, 1 reply; 10+ messages in thread
From: Hans Verkuil @ 2017-10-20 10:07 UTC (permalink / raw)
  To: linux-media; +Cc: linux-rockchip, Heiko Stuebner, Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The CEC line can be routed to two possible pins. Define those pins.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 arch/arm/boot/dts/rk3288.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index a48352aa1591..2421913bc1fd 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1431,6 +1431,14 @@
 				rockchip,pins = <7 19 RK_FUNC_2 &pcfg_pull_none>,
 						<7 20 RK_FUNC_2 &pcfg_pull_none>;
 			};
+
+			hdmi_cec_c0: hdmi-cec-c0 {
+				rockchip,pins = <7 RK_PC0 RK_FUNC_2 &pcfg_pull_none>;
+			};
+
+			hdmi_cec_c7: hdmi-cec-c7 {
+				rockchip,pins = <7 RK_PC7 RK_FUNC_4 &pcfg_pull_none>;
+			};
 		};
 
 		pcfg_pull_up: pcfg-pull-up {
-- 
2.14.1

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

* [PATCH 4/4] arm: dts: rockchip: select which CEC pin is used for the Firefly Reload
  2017-10-20 10:07 [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload Hans Verkuil
                   ` (2 preceding siblings ...)
  2017-10-20 10:07 ` [PATCH 3/4] arm: dts: rockchip: define the two possible CEC pins Hans Verkuil
@ 2017-10-20 10:07 ` Hans Verkuil
  2017-10-21 20:07   ` Heiko Stuebner
  2017-10-22  7:40 ` [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on " Hans Verkuil
  4 siblings, 1 reply; 10+ messages in thread
From: Hans Verkuil @ 2017-10-20 10:07 UTC (permalink / raw)
  To: linux-media; +Cc: linux-rockchip, Heiko Stuebner, Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The Firefly Reload uses PC7.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 arch/arm/boot/dts/rk3288-firefly-reload.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly-reload.dts b/arch/arm/boot/dts/rk3288-firefly-reload.dts
index 859938d8832e..eab176e3dfc3 100644
--- a/arch/arm/boot/dts/rk3288-firefly-reload.dts
+++ b/arch/arm/boot/dts/rk3288-firefly-reload.dts
@@ -228,6 +228,8 @@
 
 &hdmi {
 	ddc-i2c-bus = <&i2c5>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&hdmi_cec_c0>;
 	status = "okay";
 };
 
-- 
2.14.1

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

* Re: [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288
  2017-10-20 10:07 ` [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288 Hans Verkuil
@ 2017-10-21 19:29   ` Heiko Stuebner
  0 siblings, 0 replies; 10+ messages in thread
From: Heiko Stuebner @ 2017-10-21 19:29 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-rockchip, Hans Verkuil

Am Freitag, 20. Oktober 2017, 12:07:31 CEST schrieb Hans Verkuil:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The dw-hdmi block needs the cec clk for the rk3288. Add it.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

applied for 4.15, after s/arm:/ARM:/ in the subject


Thanks
Heiko

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

* Re: [PATCH 3/4] arm: dts: rockchip: define the two possible CEC pins
  2017-10-20 10:07 ` [PATCH 3/4] arm: dts: rockchip: define the two possible CEC pins Hans Verkuil
@ 2017-10-21 19:36   ` Heiko Stuebner
  0 siblings, 0 replies; 10+ messages in thread
From: Heiko Stuebner @ 2017-10-21 19:36 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-rockchip, Hans Verkuil

Am Freitag, 20. Oktober 2017, 12:07:33 CEST schrieb Hans Verkuil:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The CEC line can be routed to two possible pins. Define those pins.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

applied for 4.15, after massaging the subject a bit and moving
hdmi-cec above the hdmi-ddc subnode (alphabetical ordering)


Thanks
Heiko

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

* Re: [PATCH 2/4] arm: dts: rockchip: enable the first hdmi output
  2017-10-20 10:07 ` [PATCH 2/4] arm: dts: rockchip: enable the first hdmi output Hans Verkuil
@ 2017-10-21 20:06   ` Heiko Stuebner
  0 siblings, 0 replies; 10+ messages in thread
From: Heiko Stuebner @ 2017-10-21 20:06 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-rockchip, Hans Verkuil

Am Freitag, 20. Oktober 2017, 12:07:32 CEST schrieb Hans Verkuil:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The vdd10_lcd and vcc18_lcd regulators need to be enabled for HDMI output
> to work, so add 'regulator-always-on', just as is done in rk3288-firefly.dtsi.
> 
> Also enable i2c5 and the hdmi block.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

applied for 4.15, after adapting the subject and moving it
to position 3 in the series.


Heiko

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

* Re: [PATCH 4/4] arm: dts: rockchip: select which CEC pin is used for the Firefly Reload
  2017-10-20 10:07 ` [PATCH 4/4] arm: dts: rockchip: select which CEC pin is used for the Firefly Reload Hans Verkuil
@ 2017-10-21 20:07   ` Heiko Stuebner
  0 siblings, 0 replies; 10+ messages in thread
From: Heiko Stuebner @ 2017-10-21 20:07 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-rockchip, Hans Verkuil

Am Freitag, 20. Oktober 2017, 12:07:34 CEST schrieb Hans Verkuil:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The Firefly Reload uses PC7.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Tested-by: Hans Verkuil <hans.verkuil@cisco.com>

folded into "[PATCH 2/4] arm: dts: rockchip: enable the first hdmi output"


Heiko

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

* Re: [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload
  2017-10-20 10:07 [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload Hans Verkuil
                   ` (3 preceding siblings ...)
  2017-10-20 10:07 ` [PATCH 4/4] arm: dts: rockchip: select which CEC pin is used for the Firefly Reload Hans Verkuil
@ 2017-10-22  7:40 ` Hans Verkuil
  4 siblings, 0 replies; 10+ messages in thread
From: Hans Verkuil @ 2017-10-22  7:40 UTC (permalink / raw)
  To: linux-media; +Cc: linux-rockchip, Heiko Stuebner

Hi Heiko,

On 20/10/17 12:07, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> This patch series sits on top of these two patch series:
> 
> https://lkml.org/lkml/2017/10/13/971
> https://lkml.org/lkml/2017/10/14/161
> 
> The first adds support for the cec clk in dw-hdmi, the second adds an
> iomux-route for the CEC pin on the rk3288.
> 
> This patch series defines the cec clk for the rk3288, enables the
> first HDMI output on the Firefly Reload. The second output isn't working,
> I don't have enough knowledge to enable it. But I can test any patches
> adding support for it!
> 
> The third patch defines the two possible CEC pins and the last selects
> the correct pin for the Firefly Reload.
> 
> Likely the same thing can be done for the 'regular' Firefly, but I don't
> have the hardware to test.

My Firefly Reload thanks you for merging this series! :-)

Regards,

	Hans

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

end of thread, other threads:[~2017-10-22  7:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20 10:07 [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on Firefly Reload Hans Verkuil
2017-10-20 10:07 ` [PATCH 1/4] arm: dts: rockchip: add the cec clk for dw-hdmi on rk3288 Hans Verkuil
2017-10-21 19:29   ` Heiko Stuebner
2017-10-20 10:07 ` [PATCH 2/4] arm: dts: rockchip: enable the first hdmi output Hans Verkuil
2017-10-21 20:06   ` Heiko Stuebner
2017-10-20 10:07 ` [PATCH 3/4] arm: dts: rockchip: define the two possible CEC pins Hans Verkuil
2017-10-21 19:36   ` Heiko Stuebner
2017-10-20 10:07 ` [PATCH 4/4] arm: dts: rockchip: select which CEC pin is used for the Firefly Reload Hans Verkuil
2017-10-21 20:07   ` Heiko Stuebner
2017-10-22  7:40 ` [PATCH 0/4] arm: dts: rockchip: enable HDMI+CEC on " Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).