[v6,6/6] arm64: dts: rockchip: rk3399: Define the rockchip Video Decoder node
diff mbox series

Message ID 20200220163016.21708-7-ezequiel@collabora.com
State New
Headers show
Series
  • media: rockchip: Add the rkvdec driver
Related show

Commit Message

Ezequiel Garcia Feb. 20, 2020, 4:30 p.m. UTC
From: Boris Brezillon <boris.brezillon@collabora.com>

RK3399 has a Video decoder, define the node in the dtsi. We also add
the missing power-domain in mmu node and enable the block.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

Johan Jonker Feb. 26, 2020, 12:24 p.m. UTC | #1
Hi Boris,

Dtsi nodes are sort on address.
The vdec node is now inserted between:

vdec_mmu: iommu       @ff660480
vdec    : video-codec @ff660000
iep_mmu : iommu       @ff670800

This should be:

vpu_mmu : iommu       @ff650800
vdec    : video-codec @ff660000
vdec_mmu: iommu       @ff660480



> From: Boris Brezillon <boris.brezillon at collabora.com>
> 
> RK3399 has a Video decoder, define the node in the dtsi. We also add
> the missing power-domain in mmu node and enable the block.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 33cc21fcf4c1..a07f857df12f 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -1285,8 +1285,20 @@ vdec_mmu: iommu at ff660480 {
>  		interrupt-names = "vdec_mmu";
>  		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
>  		clock-names = "aclk", "iface";
> +		power-domains = <&power RK3399_PD_VDU>;
>  		#iommu-cells = <0>;
> -		status = "disabled";
> +	};
> +
> +	vdec: video-codec at ff660000 {
> +		compatible = "rockchip,rk3399-vdec";
> +		reg = <0x0 0xff660000 0x0 0x400>;
> +		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
> +		interrupt-names = "vdpu";
> +		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
> +			 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
> +		clock-names = "axi", "ahb", "cabac", "core";
> +		power-domains = <&power RK3399_PD_VDU>;
> +		iommus = <&vdec_mmu>;
>  	};
>  
>  	iep_mmu: iommu at ff670800 {
> -- 
> 2.25.0
Heiko Stuebner Feb. 26, 2020, 1:21 p.m. UTC | #2
Am Mittwoch, 26. Februar 2020, 13:24:53 CET schrieb Johan Jonker:
> Hi Boris,
> 
> Dtsi nodes are sort on address.
> The vdec node is now inserted between:
> 
> vdec_mmu: iommu       @ff660480
> vdec    : video-codec @ff660000
> iep_mmu : iommu       @ff670800
> 
> This should be:
> 
> vpu_mmu : iommu       @ff650800
> vdec    : video-codec @ff660000
> vdec_mmu: iommu       @ff660480
> 

Simple things like this I can (and do) fix when applying.

The interesting question would be, did patches 1-5 get applied yet?
As I only remember seing Hans' mail from v5, but didn't get any
applied mail for v6 so far.


Heiko

> > From: Boris Brezillon <boris.brezillon at collabora.com>
> > 
> > RK3399 has a Video decoder, define the node in the dtsi. We also add
> > the missing power-domain in mmu node and enable the block.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
> > Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
> > ---
> >  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > index 33cc21fcf4c1..a07f857df12f 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > @@ -1285,8 +1285,20 @@ vdec_mmu: iommu at ff660480 {
> >  		interrupt-names = "vdec_mmu";
> >  		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
> >  		clock-names = "aclk", "iface";
> > +		power-domains = <&power RK3399_PD_VDU>;
> >  		#iommu-cells = <0>;
> > -		status = "disabled";
> > +	};
> > +
> > +	vdec: video-codec at ff660000 {
> > +		compatible = "rockchip,rk3399-vdec";
> > +		reg = <0x0 0xff660000 0x0 0x400>;
> > +		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
> > +		interrupt-names = "vdpu";
> > +		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
> > +			 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
> > +		clock-names = "axi", "ahb", "cabac", "core";
> > +		power-domains = <&power RK3399_PD_VDU>;
> > +		iommus = <&vdec_mmu>;
> >  	};
> >  
> >  	iep_mmu: iommu at ff670800 {
> 
> 
> 
>
Ezequiel Garcia Feb. 26, 2020, 5:22 p.m. UTC | #3
Hi Heiko, Johan,

Thanks for pointing this out.

On Wed, 2020-02-26 at 14:21 +0100, Heiko Stuebner wrote:
> Am Mittwoch, 26. Februar 2020, 13:24:53 CET schrieb Johan Jonker:
> > Hi Boris,
> > 
> > Dtsi nodes are sort on address.
> > The vdec node is now inserted between:
> > 
> > vdec_mmu: iommu       @ff660480
> > vdec    : video-codec @ff660000
> > iep_mmu : iommu       @ff670800
> > 
> > This should be:
> > 
> > vpu_mmu : iommu       @ff650800
> > vdec    : video-codec @ff660000
> > vdec_mmu: iommu       @ff660480
> > 
> 
> Simple things like this I can (and do) fix when applying.
> 
> The interesting question would be, did patches 1-5 get applied yet?
> As I only remember seing Hans' mail from v5, but didn't get any
> applied mail for v6 so far.
> 

Hans sent a pull request to include rkvdec driver in v5.7:

https://lore.kernel.org/linux-media/d4cc12b2-3d24-95db-102b-e5091c067e76@xs4all.nl/T/#t

It doesn't include the devicetree changes though,
which I just noticed.

Would you be so kind to pick this patch and sort the node?

Thanks!
Ezequiel

> 
> Heiko
> 
> > > From: Boris Brezillon <boris.brezillon at collabora.com>
> > > 
> > > RK3399 has a Video decoder, define the node in the dtsi. We also add
> > > the missing power-domain in mmu node and enable the block.
> > > 
> > > Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
> > > Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
> > > ---
> > >  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +++++++++++++-
> > >  1 file changed, 13 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > > index 33cc21fcf4c1..a07f857df12f 100644
> > > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > > @@ -1285,8 +1285,20 @@ vdec_mmu: iommu at ff660480 {
> > >  		interrupt-names = "vdec_mmu";
> > >  		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
> > >  		clock-names = "aclk", "iface";
> > > +		power-domains = <&power RK3399_PD_VDU>;
> > >  		#iommu-cells = <0>;
> > > -		status = "disabled";
> > > +	};
> > > +
> > > +	vdec: video-codec at ff660000 {
> > > +		compatible = "rockchip,rk3399-vdec";
> > > +		reg = <0x0 0xff660000 0x0 0x400>;
> > > +		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
> > > +		interrupt-names = "vdpu";
> > > +		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
> > > +			 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
> > > +		clock-names = "axi", "ahb", "cabac", "core";
> > > +		power-domains = <&power RK3399_PD_VDU>;
> > > +		iommus = <&vdec_mmu>;
> > >  	};
> > >  
> > >  	iep_mmu: iommu at ff670800 {
> > 
> > 
> > 
> 
> 
>
Heiko Stuebner March 1, 2020, 12:14 a.m. UTC | #4
Am Mittwoch, 26. Februar 2020, 18:22:11 CET schrieb Ezequiel Garcia:
> Hi Heiko, Johan,
> 
> Thanks for pointing this out.
> 
> On Wed, 2020-02-26 at 14:21 +0100, Heiko Stuebner wrote:
> > Am Mittwoch, 26. Februar 2020, 13:24:53 CET schrieb Johan Jonker:
> > > Hi Boris,
> > > 
> > > Dtsi nodes are sort on address.
> > > The vdec node is now inserted between:
> > > 
> > > vdec_mmu: iommu       @ff660480
> > > vdec    : video-codec @ff660000
> > > iep_mmu : iommu       @ff670800
> > > 
> > > This should be:
> > > 
> > > vpu_mmu : iommu       @ff650800
> > > vdec    : video-codec @ff660000
> > > vdec_mmu: iommu       @ff660480
> > > 
> > 
> > Simple things like this I can (and do) fix when applying.
> > 
> > The interesting question would be, did patches 1-5 get applied yet?
> > As I only remember seing Hans' mail from v5, but didn't get any
> > applied mail for v6 so far.
> > 
> 
> Hans sent a pull request to include rkvdec driver in v5.7:
> 
> https://lore.kernel.org/linux-media/d4cc12b2-3d24-95db-102b-e5091c067e76@xs4all.nl/T/#t
> 
> It doesn't include the devicetree changes though,
> which I just noticed.
> 
> Would you be so kind to pick this patch and sort the node?

so far that pull you linked hasn't gone through it seems

And I also cannot see the driver patches in [0] yet, so I'll give this
some more days before applying.

Heiko

[0] https://git.linuxtv.org/media_tree.git/log/

> > > > From: Boris Brezillon <boris.brezillon at collabora.com>
> > > > 
> > > > RK3399 has a Video decoder, define the node in the dtsi. We also add
> > > > the missing power-domain in mmu node and enable the block.
> > > > 
> > > > Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
> > > > Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
> > > > ---
> > > >  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +++++++++++++-
> > > >  1 file changed, 13 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > > > index 33cc21fcf4c1..a07f857df12f 100644
> > > > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > > > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> > > > @@ -1285,8 +1285,20 @@ vdec_mmu: iommu at ff660480 {
> > > >  		interrupt-names = "vdec_mmu";
> > > >  		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
> > > >  		clock-names = "aclk", "iface";
> > > > +		power-domains = <&power RK3399_PD_VDU>;
> > > >  		#iommu-cells = <0>;
> > > > -		status = "disabled";
> > > > +	};
> > > > +
> > > > +	vdec: video-codec at ff660000 {
> > > > +		compatible = "rockchip,rk3399-vdec";
> > > > +		reg = <0x0 0xff660000 0x0 0x400>;
> > > > +		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
> > > > +		interrupt-names = "vdpu";
> > > > +		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
> > > > +			 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
> > > > +		clock-names = "axi", "ahb", "cabac", "core";
> > > > +		power-domains = <&power RK3399_PD_VDU>;
> > > > +		iommus = <&vdec_mmu>;
> > > >  	};
> > > >  
> > > >  	iep_mmu: iommu at ff670800 {
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
>

Patch
diff mbox series

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33cc21fcf4c1..a07f857df12f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1285,8 +1285,20 @@  vdec_mmu: iommu@ff660480 {
 		interrupt-names = "vdec_mmu";
 		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
 		clock-names = "aclk", "iface";
+		power-domains = <&power RK3399_PD_VDU>;
 		#iommu-cells = <0>;
-		status = "disabled";
+	};
+
+	vdec: video-codec@ff660000 {
+		compatible = "rockchip,rk3399-vdec";
+		reg = <0x0 0xff660000 0x0 0x400>;
+		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
+		interrupt-names = "vdpu";
+		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
+			 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
+		clock-names = "axi", "ahb", "cabac", "core";
+		power-domains = <&power RK3399_PD_VDU>;
+		iommus = <&vdec_mmu>;
 	};
 
 	iep_mmu: iommu@ff670800 {