devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain
@ 2019-06-03 14:22 Helen Koike
  2019-06-03 14:44 ` Ezequiel Garcia
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Helen Koike @ 2019-06-03 14:22 UTC (permalink / raw)
  To: linux-rockchip
  Cc: kernel, ezequiel, laurent.pinchart, manivannan.sadhasivam,
	Helen Koike, linux-arm-kernel, Vicente Bergas, Heiko Stuebner,
	devicetree, Klaus Goger, linux-kernel, Christoph Muellner,
	Randy Li, Philipp Tomsich, Rob Herring, Tony Xie, Mark Rutland,
	Viresh Kumar, Marc Zyngier, Matthias Brugger

isp iommu requires wrapper variants of the clocks.
noc variants are always on and using the wrapper variants will activate
{A,H}CLK_ISP{0,1} due to the hierarchy.

Also add the respective power domain.

Refer:
 RK3399 TRM v1.4 Fig. 2-4 RK3399 Clock Architecture Diagram
 RK3399 TRM v1.4 Fig. 8-1 RK3399 Power Domain Partition

Signed-off-by: Helen Koike <helen.koike@collabora.com>

---
Hello,

I tested this using the isp patch set (which is not upstream
yet). Without this patch, streaming from the isp stalls.

I'm also enabling the power domain and removing the disable status,
please let me know if this should be done in a separated patch.

Thanks
Helen

 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 196ac9b78076..89594a7276f4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1706,11 +1706,11 @@
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
 		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
 		interrupt-names = "isp0_mmu";
-		clocks = <&cru ACLK_ISP0_NOC>, <&cru HCLK_ISP0_NOC>;
+		clocks = <&cru ACLK_ISP0_WRAPPER>, <&cru HCLK_ISP0_WRAPPER>;
 		clock-names = "aclk", "iface";
 		#iommu-cells = <0>;
+		power-domains = <&power RK3399_PD_ISP0>;
 		rockchip,disable-mmu-reset;
-		status = "disabled";
 	};
 
 	isp1_mmu: iommu@ff924000 {
@@ -1718,11 +1718,11 @@
 		reg = <0x0 0xff924000 0x0 0x100>, <0x0 0xff925000 0x0 0x100>;
 		interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
 		interrupt-names = "isp1_mmu";
-		clocks = <&cru ACLK_ISP1_NOC>, <&cru HCLK_ISP1_NOC>;
+		clocks = <&cru ACLK_ISP1_WRAPPER>, <&cru HCLK_ISP1_WRAPPER>;
 		clock-names = "aclk", "iface";
 		#iommu-cells = <0>;
+		power-domains = <&power RK3399_PD_ISP1>;
 		rockchip,disable-mmu-reset;
-		status = "disabled";
 	};
 
 	hdmi_sound: hdmi-sound {
-- 
2.20.1

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

* Re: [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain
  2019-06-03 14:22 [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain Helen Koike
@ 2019-06-03 14:44 ` Ezequiel Garcia
  2019-06-03 14:48 ` Manivannan Sadhasivam
  2019-06-04 13:37 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Ezequiel Garcia @ 2019-06-03 14:44 UTC (permalink / raw)
  To: Helen Koike, linux-rockchip
  Cc: kernel, laurent.pinchart, manivannan.sadhasivam, linux-arm-kernel,
	Vicente Bergas, Heiko Stuebner, devicetree, Klaus Goger,
	linux-kernel, Christoph Muellner, Randy Li, Philipp Tomsich,
	Rob Herring, Tony Xie, Mark Rutland, Viresh Kumar, Marc Zyngier,
	Matthias Brugger

On Mon, 2019-06-03 at 11:22 -0300, Helen Koike wrote:
> isp iommu requires wrapper variants of the clocks.
> noc variants are always on and using the wrapper variants will activate
> {A,H}CLK_ISP{0,1} due to the hierarchy.
> 
> Also add the respective power domain.
> 
> Refer:
>  RK3399 TRM v1.4 Fig. 2-4 RK3399 Clock Architecture Diagram
>  RK3399 TRM v1.4 Fig. 8-1 RK3399 Power Domain Partition
> 
> Signed-off-by: Helen Koike <helen.koike@collabora.com>
> 
> ---
> Hello,
> 
> I tested this using the isp patch set (which is not upstream
> yet). Without this patch, streaming from the isp stalls.
> 
> I'm also enabling the power domain and removing the disable status,
> please let me know if this should be done in a separated patch.
> 

I think you might want to put the comments about enabling power domain
and removing disable status on the commit log. It's useful information :-)

Thanks,
Eze

> Thanks
> Helen
> 
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 196ac9b78076..89594a7276f4 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -1706,11 +1706,11 @@
>  		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
>  		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
>  		interrupt-names = "isp0_mmu";
> -		clocks = <&cru ACLK_ISP0_NOC>, <&cru HCLK_ISP0_NOC>;
> +		clocks = <&cru ACLK_ISP0_WRAPPER>, <&cru HCLK_ISP0_WRAPPER>;
>  		clock-names = "aclk", "iface";
>  		#iommu-cells = <0>;
> +		power-domains = <&power RK3399_PD_ISP0>;
>  		rockchip,disable-mmu-reset;
> -		status = "disabled";
>  	};
>  
>  	isp1_mmu: iommu@ff924000 {
> @@ -1718,11 +1718,11 @@
>  		reg = <0x0 0xff924000 0x0 0x100>, <0x0 0xff925000 0x0 0x100>;
>  		interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
>  		interrupt-names = "isp1_mmu";
> -		clocks = <&cru ACLK_ISP1_NOC>, <&cru HCLK_ISP1_NOC>;
> +		clocks = <&cru ACLK_ISP1_WRAPPER>, <&cru HCLK_ISP1_WRAPPER>;
>  		clock-names = "aclk", "iface";
>  		#iommu-cells = <0>;
> +		power-domains = <&power RK3399_PD_ISP1>;
>  		rockchip,disable-mmu-reset;
> -		status = "disabled";
>  	};
>  
>  	hdmi_sound: hdmi-sound {

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

* Re: [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain
  2019-06-03 14:22 [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain Helen Koike
  2019-06-03 14:44 ` Ezequiel Garcia
@ 2019-06-03 14:48 ` Manivannan Sadhasivam
  2019-06-04 13:37 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Manivannan Sadhasivam @ 2019-06-03 14:48 UTC (permalink / raw)
  To: Helen Koike
  Cc: linux-rockchip, kernel, ezequiel, laurent.pinchart,
	linux-arm-kernel, Vicente Bergas, Heiko Stuebner, devicetree,
	Klaus Goger, linux-kernel, Christoph Muellner, Randy Li,
	Philipp Tomsich, Rob Herring, Tony Xie, Mark Rutland,
	Viresh Kumar, Marc Zyngier, Matthias Brugger

On Mon, Jun 03, 2019 at 11:22:15AM -0300, Helen Koike wrote:
> isp iommu requires wrapper variants of the clocks.
> noc variants are always on and using the wrapper variants will activate
> {A,H}CLK_ISP{0,1} due to the hierarchy.
> 
> Also add the respective power domain.
> 
> Refer:
>  RK3399 TRM v1.4 Fig. 2-4 RK3399 Clock Architecture Diagram
>  RK3399 TRM v1.4 Fig. 8-1 RK3399 Power Domain Partition
> 
> Signed-off-by: Helen Koike <helen.koike@collabora.com>

Tested on Rock960 with ISP patches.

Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> 
> ---
> Hello,
> 
> I tested this using the isp patch set (which is not upstream
> yet). Without this patch, streaming from the isp stalls.
> 
> I'm also enabling the power domain and removing the disable status,
> please let me know if this should be done in a separated patch.
> 
> Thanks
> Helen
> 
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 196ac9b78076..89594a7276f4 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -1706,11 +1706,11 @@
>  		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
>  		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
>  		interrupt-names = "isp0_mmu";
> -		clocks = <&cru ACLK_ISP0_NOC>, <&cru HCLK_ISP0_NOC>;
> +		clocks = <&cru ACLK_ISP0_WRAPPER>, <&cru HCLK_ISP0_WRAPPER>;
>  		clock-names = "aclk", "iface";
>  		#iommu-cells = <0>;
> +		power-domains = <&power RK3399_PD_ISP0>;
>  		rockchip,disable-mmu-reset;
> -		status = "disabled";
>  	};
>  
>  	isp1_mmu: iommu@ff924000 {
> @@ -1718,11 +1718,11 @@
>  		reg = <0x0 0xff924000 0x0 0x100>, <0x0 0xff925000 0x0 0x100>;
>  		interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
>  		interrupt-names = "isp1_mmu";
> -		clocks = <&cru ACLK_ISP1_NOC>, <&cru HCLK_ISP1_NOC>;
> +		clocks = <&cru ACLK_ISP1_WRAPPER>, <&cru HCLK_ISP1_WRAPPER>;
>  		clock-names = "aclk", "iface";
>  		#iommu-cells = <0>;
> +		power-domains = <&power RK3399_PD_ISP1>;
>  		rockchip,disable-mmu-reset;
> -		status = "disabled";
>  	};
>  
>  	hdmi_sound: hdmi-sound {
> -- 
> 2.20.1
> 

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

* Re: [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain
  2019-06-03 14:22 [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain Helen Koike
  2019-06-03 14:44 ` Ezequiel Garcia
  2019-06-03 14:48 ` Manivannan Sadhasivam
@ 2019-06-04 13:37 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2019-06-04 13:37 UTC (permalink / raw)
  To: Helen Koike
  Cc: linux-rockchip, kernel, ezequiel, laurent.pinchart,
	manivannan.sadhasivam, linux-arm-kernel, Vicente Bergas,
	devicetree, Klaus Goger, linux-kernel, Christoph Muellner,
	Randy Li, Philipp Tomsich, Rob Herring, Tony Xie, Mark Rutland,
	Viresh Kumar, Marc Zyngier, Matthias Brugger

Am Montag, 3. Juni 2019, 16:22:15 CEST schrieb Helen Koike:
> isp iommu requires wrapper variants of the clocks.
> noc variants are always on and using the wrapper variants will activate
> {A,H}CLK_ISP{0,1} due to the hierarchy.
> 
> Also add the respective power domain.
> 
> Refer:
>  RK3399 TRM v1.4 Fig. 2-4 RK3399 Clock Architecture Diagram
>  RK3399 TRM v1.4 Fig. 8-1 RK3399 Power Domain Partition
> 
> Signed-off-by: Helen Koike <helen.koike@collabora.com>

applied for 5.3 with the received Tested-tag and I also moved
parts of the comment into the commit message making it:

"isp iommu requires wrapper variants of the clocks.
noc variants are always on and using the wrapper variants will activate
{A,H}CLK_ISP{0,1} due to the hierarchy.

Tested using the pending isp patch set (which is not upstream
yet). Without this patch, streaming from the isp stalls.
    
Also add the respective power domain and remove the "disabled" status.
    
Refer:
 RK3399 TRM v1.4 Fig. 2-4 RK3399 Clock Architecture Diagram
 RK3399 TRM v1.4 Fig. 8-1 RK3399 Power Domain Partition"

Thanks
Heiko

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

end of thread, other threads:[~2019-06-04 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-03 14:22 [PATCH] arm64: dts: rockchip: fix isp iommu clocks and power domain Helen Koike
2019-06-03 14:44 ` Ezequiel Garcia
2019-06-03 14:48 ` Manivannan Sadhasivam
2019-06-04 13:37 ` 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).