linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] hdmi on rk3229
@ 2019-06-14 16:54 Heiko Stuebner
  2019-06-14 16:54 ` [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock Heiko Stuebner
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 16:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, sboyd, Heiko Stuebner

The hdmiphy needs its clock reparented to the actual hdmiphy-pll
that gets generated in the hdmiphy itself.

This incorporates adapted versions of Justin's original patches
and also the needed clock adaptions to make it possible to
reparent the hdmiphy clock.

Heiko Stuebner (2):
  clk: rockchip: add clock id for hdmi_phy special clock
  clk: rockchip: export HDMIPHY clock

Justin Swartz (2):
  ARM: dts: rockchip: add display nodes for rk322x
  ARM: dts: rockchip: fix vop iommu-cells on rk322x

 arch/arm/boot/dts/rk322x.dtsi          | 85 +++++++++++++++++++++++++-
 drivers/clk/rockchip/clk-rk3228.c      |  2 +-
 include/dt-bindings/clock/rk3228-cru.h |  1 +
 3 files changed, 86 insertions(+), 2 deletions(-)

-- 
2.20.1


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

* [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock
  2019-06-14 16:54 [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
@ 2019-06-14 16:54 ` Heiko Stuebner
  2019-06-14 20:38   ` Justin Swartz
  2019-06-14 16:54 ` [PATCH 2/4] clk: rockchip: export HDMIPHY clock Heiko Stuebner
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 16:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, sboyd, Heiko Stuebner

Add the needed clock id to enable clock settings from devicetree.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 include/dt-bindings/clock/rk3228-cru.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/clock/rk3228-cru.h b/include/dt-bindings/clock/rk3228-cru.h
index 3b245e3df8da..de550ea56eeb 100644
--- a/include/dt-bindings/clock/rk3228-cru.h
+++ b/include/dt-bindings/clock/rk3228-cru.h
@@ -64,6 +64,7 @@
 #define SCLK_WIFI		141
 #define SCLK_OTGPHY0		142
 #define SCLK_OTGPHY1		143
+#define SCLK_HDMI_PHY		144
 
 /* dclk gates */
 #define DCLK_VOP		190
-- 
2.20.1


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

* [PATCH 2/4] clk: rockchip: export HDMIPHY clock
  2019-06-14 16:54 [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
  2019-06-14 16:54 ` [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock Heiko Stuebner
@ 2019-06-14 16:54 ` Heiko Stuebner
  2019-06-14 20:38   ` Justin Swartz
  2019-06-14 16:54 ` [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x Heiko Stuebner
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 16:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, sboyd, Heiko Stuebner

Export the hdmiphy clock mux via the newly added clock-id.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/clk/rockchip/clk-rk3228.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
index 1c5267d134ee..d17cfb7a3ff4 100644
--- a/drivers/clk/rockchip/clk-rk3228.c
+++ b/drivers/clk/rockchip/clk-rk3228.c
@@ -247,7 +247,7 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
 			RK2928_CLKGATE_CON(4), 0, GFLAGS),
 
 	/* PD_MISC */
-	MUX(0, "hdmiphy", mux_hdmiphy_p, CLK_SET_RATE_PARENT,
+	MUX(SCLK_HDMI_PHY, "hdmiphy", mux_hdmiphy_p, CLK_SET_RATE_PARENT,
 			RK2928_MISC_CON, 13, 1, MFLAGS),
 	MUX(0, "usb480m_phy", mux_usb480m_phy_p, CLK_SET_RATE_PARENT,
 			RK2928_MISC_CON, 14, 1, MFLAGS),
-- 
2.20.1


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

* [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x
  2019-06-14 16:54 [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
  2019-06-14 16:54 ` [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock Heiko Stuebner
  2019-06-14 16:54 ` [PATCH 2/4] clk: rockchip: export HDMIPHY clock Heiko Stuebner
@ 2019-06-14 16:54 ` Heiko Stuebner
  2019-06-14 17:45   ` Stephen Boyd
  2019-06-14 16:54 ` [PATCH 4/4] ARM: dts: rockchip: fix vop iommu-cells on rk322x Heiko Stuebner
  2019-06-27 10:40 ` [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
  4 siblings, 1 reply; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 16:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, sboyd, Heiko Stuebner

From: Justin Swartz <justin.swartz@risingedge.co.za>

Add display_subsystem, hdmi_phy, vop, and hdmi device nodes plus
a few hdmi pinctrl entries to allow for HDMI output.

Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
[added assigned-clock settings for hdmiphy output]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/boot/dts/rk322x.dtsi | 83 +++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index da102fff96a2..148f9b5157ea 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -143,6 +143,11 @@
 		#clock-cells = <0>;
 	};
 
+	display_subsystem: display-subsystem {
+		compatible = "rockchip,display-subsystem";
+		ports = <&vop_out>;
+	};
+
 	i2s1: i2s1@100b0000 {
 		compatible = "rockchip,rk3228-i2s", "rockchip,rk3066-i2s";
 		reg = <0x100b0000 0x4000>;
@@ -529,6 +534,17 @@
 		status = "disabled";
 	};
 
+	hdmi_phy: hdmi-phy@12030000 {
+		compatible = "rockchip,rk3228-hdmi-phy";
+		reg = <0x12030000 0x10000>;
+		clocks = <&cru PCLK_HDMI_PHY>, <&xin24m>, <&cru DCLK_HDMI_PHY>;
+		clock-names = "sysclk", "refoclk", "refpclk";
+		#clock-cells = <0>;
+		clock-output-names = "hdmiphy_phy";
+		#phy-cells = <0>;
+		status = "disabled";
+	};
+
 	gpu: gpu@20000000 {
 		compatible = "rockchip,rk3228-mali", "arm,mali-400";
 		reg = <0x20000000 0x10000>;
@@ -572,6 +588,28 @@
 		status = "disabled";
 	};
 
+	vop: vop@20050000 {
+		compatible = "rockchip,rk3228-vop";
+		reg = <0x20050000 0x1ffc>;
+		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru ACLK_VOP>, <&cru DCLK_VOP>, <&cru HCLK_VOP>;
+		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+		resets = <&cru SRST_VOP_A>, <&cru SRST_VOP_H>, <&cru SRST_VOP_D>;
+		reset-names = "axi", "ahb", "dclk";
+		iommus = <&vop_mmu>;
+		status = "disabled";
+
+		vop_out: port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			vop_out_hdmi: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&hdmi_in_vop>;
+			};
+		};
+	};
+
 	vop_mmu: iommu@20053f00 {
 		compatible = "rockchip,iommu";
 		reg = <0x20053f00 0x100>;
@@ -594,6 +632,36 @@
 		status = "disabled";
 	};
 
+	hdmi: hdmi@200a0000 {
+		compatible = "rockchip,rk3228-dw-hdmi";
+		reg = <0x200a0000 0x20000>;
+		reg-io-width = <4>;
+		interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+		assigned-clocks = <&cru SCLK_HDMI_PHY>;
+		assigned-clock-parents = <&hdmi_phy>;
+		clocks = <&cru SCLK_HDMI_HDCP>, <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_CEC>;
+		clock-names = "isfr", "iahb", "cec";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmii2c_xfer &hdmi_hpd &hdmi_cec>;
+		resets = <&cru SRST_HDMI_P>;
+		reset-names = "hdmi";
+		phys = <&hdmi_phy>;
+		phy-names = "hdmi";
+		rockchip,grf = <&grf>;
+		status = "disabled";
+
+		ports {
+			hdmi_in: port {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				hdmi_in_vop: endpoint@0 {
+					reg = <0>;
+					remote-endpoint = <&vop_out_hdmi>;
+				};
+			};
+		};
+	};
+
 	sdmmc: dwmmc@30000000 {
 		compatible = "rockchip,rk3228-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x30000000 0x4000>;
@@ -922,6 +990,21 @@
 			};
 		};
 
+		hdmi {
+			hdmi_hpd: hdmi-hpd {
+				rockchip,pins = <0 RK_PB7 1 &pcfg_pull_down>;
+			};
+
+			hdmii2c_xfer: hdmii2c-xfer {
+				rockchip,pins = <0 RK_PA6 2 &pcfg_pull_none>,
+						<0 RK_PA7 2 &pcfg_pull_none>;
+			};
+
+			hdmi_cec: hdmi-cec {
+				rockchip,pins = <0 RK_PC4 1 &pcfg_pull_none>;
+			};
+		};
+
 		i2c0 {
 			i2c0_xfer: i2c0-xfer {
 				rockchip,pins = <0 RK_PA0 1 &pcfg_pull_none>,
-- 
2.20.1


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

* [PATCH 4/4] ARM: dts: rockchip: fix vop iommu-cells on rk322x
  2019-06-14 16:54 [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
                   ` (2 preceding siblings ...)
  2019-06-14 16:54 ` [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x Heiko Stuebner
@ 2019-06-14 16:54 ` Heiko Stuebner
  2019-06-27 10:40 ` [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
  4 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 16:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, sboyd, Heiko Stuebner

From: Justin Swartz <justin.swartz@risingedge.co.za>

iommu-cells obviously needs to start with a "#".

Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/boot/dts/rk322x.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 148f9b5157ea..340ed6ccb08f 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -617,7 +617,7 @@
 		interrupt-names = "vop_mmu";
 		clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
 		clock-names = "aclk", "iface";
-		iommu-cells = <0>;
+		#iommu-cells = <0>;
 		status = "disabled";
 	};
 
-- 
2.20.1


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

* Re: [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x
  2019-06-14 16:54 ` [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x Heiko Stuebner
@ 2019-06-14 17:45   ` Stephen Boyd
  2019-06-14 18:32     ` Justin Swartz
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Boyd @ 2019-06-14 17:45 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, Heiko Stuebner

Quoting Heiko Stuebner (2019-06-14 09:54:53)
> From: Justin Swartz <justin.swartz@risingedge.co.za>
> 
> Add display_subsystem, hdmi_phy, vop, and hdmi device nodes plus
> a few hdmi pinctrl entries to allow for HDMI output.
> 
> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
> [added assigned-clock settings for hdmiphy output]
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  arch/arm/boot/dts/rk322x.dtsi | 83 +++++++++++++++++++++++++++++++++++
>  1 file changed, 83 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
> index da102fff96a2..148f9b5157ea 100644
> --- a/arch/arm/boot/dts/rk322x.dtsi
> +++ b/arch/arm/boot/dts/rk322x.dtsi
> @@ -143,6 +143,11 @@
>                 #clock-cells = <0>;
>         };
>  
> +       display_subsystem: display-subsystem {
> +               compatible = "rockchip,display-subsystem";
> +               ports = <&vop_out>;
> +       };
> +

What is this? It doesn't have a reg property so it looks like a virtual
device. Why is it in DT?


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

* Re: [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x
  2019-06-14 17:45   ` Stephen Boyd
@ 2019-06-14 18:32     ` Justin Swartz
  2019-06-14 19:33       ` Heiko Stuebner
  0 siblings, 1 reply; 13+ messages in thread
From: Justin Swartz @ 2019-06-14 18:32 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Heiko Stuebner, linux-rockchip, linux-arm-kernel, linux-kernel,
	linux-clk, mturquette

Hi Stephen,

On 2019-06-14 19:45, Stephen Boyd wrote:

>> diff --git a/arch/arm/boot/dts/rk322x.dtsi 
>> b/arch/arm/boot/dts/rk322x.dtsi
>> index da102fff96a2..148f9b5157ea 100644
>> --- a/arch/arm/boot/dts/rk322x.dtsi
>> +++ b/arch/arm/boot/dts/rk322x.dtsi
>> @@ -143,6 +143,11 @@
>> #clock-cells = <0>;
>> };
>> 
>> +       display_subsystem: display-subsystem {
>> +               compatible = "rockchip,display-subsystem";
>> +               ports = <&vop_out>;
>> +       };
>> +
> 
> What is this? It doesn't have a reg property so it looks like a virtual
> device. Why is it in DT?

This is a virtual device.

I assumed it would be acceptable to it find in a device tree due to 
binding documentation, 
"Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt, 
which states:

<quote>
The Rockchip DRM master device is a virtual device needed to list all
vop devices or other display interface nodes that comprise the
graphics subsystem.
</quote>

Without the "display_subsystem" device node, the HDMI PHY and 
rockchipdrmfb frame buffer device are not initialized.

Perhaps I should have included this in my commit message? :)

Regards
Justin

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

* Re: [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x
  2019-06-14 18:32     ` Justin Swartz
@ 2019-06-14 19:33       ` Heiko Stuebner
  2019-06-14 20:36         ` Stephen Boyd
  0 siblings, 1 reply; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 19:33 UTC (permalink / raw)
  To: Justin Swartz
  Cc: Stephen Boyd, linux-rockchip, linux-arm-kernel, linux-kernel,
	linux-clk, mturquette

Am Freitag, 14. Juni 2019, 20:32:35 CEST schrieb Justin Swartz:
> On 2019-06-14 19:45, Stephen Boyd wrote:
> >> diff --git a/arch/arm/boot/dts/rk322x.dtsi 
> >> b/arch/arm/boot/dts/rk322x.dtsi
> >> index da102fff96a2..148f9b5157ea 100644
> >> --- a/arch/arm/boot/dts/rk322x.dtsi
> >> +++ b/arch/arm/boot/dts/rk322x.dtsi
> >> @@ -143,6 +143,11 @@
> >> #clock-cells = <0>;
> >> };
> >> 
> >> +       display_subsystem: display-subsystem {
> >> +               compatible = "rockchip,display-subsystem";
> >> +               ports = <&vop_out>;
> >> +       };
> >> +
> > 
> > What is this? It doesn't have a reg property so it looks like a virtual
> > device. Why is it in DT?
> 
> This is a virtual device.
> 
> I assumed it would be acceptable to it find in a device tree due to 
> binding documentation, 
> "Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt, 
> which states:
> 
> <quote>
> The Rockchip DRM master device is a virtual device needed to list all
> vop devices or other display interface nodes that comprise the
> graphics subsystem.
> </quote>
> 
> Without the "display_subsystem" device node, the HDMI PHY and 
> rockchipdrmfb frame buffer device are not initialized.
> 
> Perhaps I should have included this in my commit message? :)

As Justin said, that is very much common as the root of the components
that make up the drm device and pretty much common in a lot of devicetrees
for the last 5 years and longer ;-) .

Also gpio-keys also don't have a reg property ;-) .

Heiko 



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

* Re: [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x
  2019-06-14 19:33       ` Heiko Stuebner
@ 2019-06-14 20:36         ` Stephen Boyd
  2019-06-14 23:05           ` Heiko Stuebner
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Boyd @ 2019-06-14 20:36 UTC (permalink / raw)
  To: Heiko Stuebner, Justin Swartz
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel, linux-clk, mturquette

Quoting Heiko Stuebner (2019-06-14 12:33:12)
> Am Freitag, 14. Juni 2019, 20:32:35 CEST schrieb Justin Swartz:
> > On 2019-06-14 19:45, Stephen Boyd wrote:
> > >> diff --git a/arch/arm/boot/dts/rk322x.dtsi 
> > >> b/arch/arm/boot/dts/rk322x.dtsi
> > >> index da102fff96a2..148f9b5157ea 100644
> > >> --- a/arch/arm/boot/dts/rk322x.dtsi
> > >> +++ b/arch/arm/boot/dts/rk322x.dtsi
> > >> @@ -143,6 +143,11 @@
> > >> #clock-cells = <0>;
> > >> };
> > >> 
> > >> +       display_subsystem: display-subsystem {
> > >> +               compatible = "rockchip,display-subsystem";
> > >> +               ports = <&vop_out>;
> > >> +       };
> > >> +
> > > 
> > > What is this? It doesn't have a reg property so it looks like a virtual
> > > device. Why is it in DT?
> > 
> > This is a virtual device.
> > 
> > I assumed it would be acceptable to it find in a device tree due to 
> > binding documentation, 
> > "Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt, 
> > which states:
> > 
> > <quote>
> > The Rockchip DRM master device is a virtual device needed to list all
> > vop devices or other display interface nodes that comprise the
> > graphics subsystem.
> > </quote>
> > 
> > Without the "display_subsystem" device node, the HDMI PHY and 
> > rockchipdrmfb frame buffer device are not initialized.
> > 
> > Perhaps I should have included this in my commit message? :)
> 
> As Justin said, that is very much common as the root of the components
> that make up the drm device and pretty much common in a lot of devicetrees
> for the last 5 years and longer ;-) .
> 
> Also gpio-keys also don't have a reg property ;-) .
> 

Do you have a SoC node? If so, this virtual device should live in the
root, away from the nodes that have reg properties and are thus in the
SoC node.


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

* Re: [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock
  2019-06-14 16:54 ` [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock Heiko Stuebner
@ 2019-06-14 20:38   ` Justin Swartz
  0 siblings, 0 replies; 13+ messages in thread
From: Justin Swartz @ 2019-06-14 20:38 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel, linux-clk,
	mturquette, sboyd

On 2019-06-14 18:54, Heiko Stuebner wrote:

> Add the needed clock id to enable clock settings from devicetree.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> include/dt-bindings/clock/rk3228-cru.h | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/include/dt-bindings/clock/rk3228-cru.h 
> b/include/dt-bindings/clock/rk3228-cru.h
> index 3b245e3df8da..de550ea56eeb 100644
> --- a/include/dt-bindings/clock/rk3228-cru.h
> +++ b/include/dt-bindings/clock/rk3228-cru.h
> @@ -64,6 +64,7 @@
> #define SCLK_WIFI        141
> #define SCLK_OTGPHY0        142
> #define SCLK_OTGPHY1        143
> +#define SCLK_HDMI_PHY        144
> 
> /* dclk gates */
> #define DCLK_VOP        190

Tested-by: Justin Swartz <justin.swartz@risingedge.co.za>

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

* Re: [PATCH 2/4] clk: rockchip: export HDMIPHY clock
  2019-06-14 16:54 ` [PATCH 2/4] clk: rockchip: export HDMIPHY clock Heiko Stuebner
@ 2019-06-14 20:38   ` Justin Swartz
  0 siblings, 0 replies; 13+ messages in thread
From: Justin Swartz @ 2019-06-14 20:38 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel, linux-clk,
	mturquette, sboyd

On 2019-06-14 18:54, Heiko Stuebner wrote:

> Export the hdmiphy clock mux via the newly added clock-id.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> drivers/clk/rockchip/clk-rk3228.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3228.c 
> b/drivers/clk/rockchip/clk-rk3228.c
> index 1c5267d134ee..d17cfb7a3ff4 100644
> --- a/drivers/clk/rockchip/clk-rk3228.c
> +++ b/drivers/clk/rockchip/clk-rk3228.c
> @@ -247,7 +247,7 @@ static struct rockchip_clk_branch 
> rk3228_clk_branches[] __initdata = {
> RK2928_CLKGATE_CON(4), 0, GFLAGS),
> 
> /* PD_MISC */
> -    MUX(0, "hdmiphy", mux_hdmiphy_p, CLK_SET_RATE_PARENT,
> +    MUX(SCLK_HDMI_PHY, "hdmiphy", mux_hdmiphy_p, CLK_SET_RATE_PARENT,
> RK2928_MISC_CON, 13, 1, MFLAGS),
> MUX(0, "usb480m_phy", mux_usb480m_phy_p, CLK_SET_RATE_PARENT,
> RK2928_MISC_CON, 14, 1, MFLAGS),

Tested-by: Justin Swartz <justin.swartz@risingedge.co.za>

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

* Re: [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x
  2019-06-14 20:36         ` Stephen Boyd
@ 2019-06-14 23:05           ` Heiko Stuebner
  0 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-14 23:05 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Justin Swartz, linux-rockchip, linux-arm-kernel, linux-kernel,
	linux-clk, mturquette

Stephen,

Am Freitag, 14. Juni 2019, 22:36:09 CEST schrieb Stephen Boyd:
> Quoting Heiko Stuebner (2019-06-14 12:33:12)
> > Am Freitag, 14. Juni 2019, 20:32:35 CEST schrieb Justin Swartz:
> > > On 2019-06-14 19:45, Stephen Boyd wrote:
> > > >> diff --git a/arch/arm/boot/dts/rk322x.dtsi 
> > > >> b/arch/arm/boot/dts/rk322x.dtsi
> > > >> index da102fff96a2..148f9b5157ea 100644
> > > >> --- a/arch/arm/boot/dts/rk322x.dtsi
> > > >> +++ b/arch/arm/boot/dts/rk322x.dtsi
> > > >> @@ -143,6 +143,11 @@
> > > >> #clock-cells = <0>;
> > > >> };
> > > >> 
> > > >> +       display_subsystem: display-subsystem {
> > > >> +               compatible = "rockchip,display-subsystem";
> > > >> +               ports = <&vop_out>;
> > > >> +       };
> > > >> +
> > > > 
> > > > What is this? It doesn't have a reg property so it looks like a virtual
> > > > device. Why is it in DT?
> > > 
> > > This is a virtual device.
> > > 
> > > I assumed it would be acceptable to it find in a device tree due to 
> > > binding documentation, 
> > > "Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt, 
> > > which states:
> > > 
> > > <quote>
> > > The Rockchip DRM master device is a virtual device needed to list all
> > > vop devices or other display interface nodes that comprise the
> > > graphics subsystem.
> > > </quote>
> > > 
> > > Without the "display_subsystem" device node, the HDMI PHY and 
> > > rockchipdrmfb frame buffer device are not initialized.
> > > 
> > > Perhaps I should have included this in my commit message? :)
> > 
> > As Justin said, that is very much common as the root of the components
> > that make up the drm device and pretty much common in a lot of devicetrees
> > for the last 5 years and longer ;-) .
> > 
> > Also gpio-keys also don't have a reg property ;-) .
> > 
> 
> Do you have a SoC node? If so, this virtual device should live in the
> root, away from the nodes that have reg properties and are thus in the
> SoC node.

no we don't have any soc node and that display-subsystem is really the
same on _all_ currently supported Rockchip socs ... has gone through
dt-reviews numerous times for multiple socs, so I'm somewhat
confident that we're not doing something terrible wrong.

Heiko



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

* Re: [PATCH 0/4] hdmi on rk3229
  2019-06-14 16:54 [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
                   ` (3 preceding siblings ...)
  2019-06-14 16:54 ` [PATCH 4/4] ARM: dts: rockchip: fix vop iommu-cells on rk322x Heiko Stuebner
@ 2019-06-27 10:40 ` Heiko Stuebner
  4 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2019-06-27 10:40 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, justin.swartz, linux-kernel, linux-clk,
	mturquette, sboyd

Am Freitag, 14. Juni 2019, 18:54:50 CEST schrieb Heiko Stuebner:
> The hdmiphy needs its clock reparented to the actual hdmiphy-pll
> that gets generated in the hdmiphy itself.
> 
> This incorporates adapted versions of Justin's original patches
> and also the needed clock adaptions to make it possible to
> reparent the hdmiphy clock.
> 
> Heiko Stuebner (2):
>   clk: rockchip: add clock id for hdmi_phy special clock
>   clk: rockchip: export HDMIPHY clock
> 
> Justin Swartz (2):
>   ARM: dts: rockchip: add display nodes for rk322x
>   ARM: dts: rockchip: fix vop iommu-cells on rk322x

applied all 4 to relevant branches for 5.3

Cheers
Heiko



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

end of thread, other threads:[~2019-06-27 10:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 16:54 [PATCH 0/4] hdmi on rk3229 Heiko Stuebner
2019-06-14 16:54 ` [PATCH 1/4] clk: rockchip: add clock id for hdmi_phy special clock Heiko Stuebner
2019-06-14 20:38   ` Justin Swartz
2019-06-14 16:54 ` [PATCH 2/4] clk: rockchip: export HDMIPHY clock Heiko Stuebner
2019-06-14 20:38   ` Justin Swartz
2019-06-14 16:54 ` [PATCH 3/4] ARM: dts: rockchip: add display nodes for rk322x Heiko Stuebner
2019-06-14 17:45   ` Stephen Boyd
2019-06-14 18:32     ` Justin Swartz
2019-06-14 19:33       ` Heiko Stuebner
2019-06-14 20:36         ` Stephen Boyd
2019-06-14 23:05           ` Heiko Stuebner
2019-06-14 16:54 ` [PATCH 4/4] ARM: dts: rockchip: fix vop iommu-cells on rk322x Heiko Stuebner
2019-06-27 10:40 ` [PATCH 0/4] hdmi on rk3229 Heiko Stuebner

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).