Skip to contentSkip to conversation

arm64: dts: imx8mp: Add Hantro G1, G2, VC8000E DT nodes

PATCH Superseded Marek Vasut 3 participants 5 messages Dec 18, 2022

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: imx8mp: Add Hantro G1, G2, VC8000E DT nodes

Add DT nodes for the Hantro VPU found in i.MX8MP SoC.

---
Cc: Abel Vesa <[email protected]>
Cc: Adam Ford <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Ezequiel Garcia <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Markus Niebel <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
To: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 36 +++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +36 -0
index 34c2c80c47eb5..5040b3a545c32 100644
@@ -1639,6 +1639,39 @@ gpu2d: gpu@38008000 {
 			power-domains = <&pgc_gpu2d>;
 		};
 
+		vpu_g1: video-codec@38300000 {
+			compatible = "nxp,imx8mm-vpu-g1";
+			reg = <0x38300000 0x10000>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+		};
+
+		vpu_g2: video-codec@38310000 {
+			compatible = "nxp,imx8mq-vpu-g2";
+			reg = <0x38310000 0x10000>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
+		};
+
+		vpu_vc8000e: vpu_vc8000e@38320000 {
+			compatible = "nxp,imx8mp-vpu-vc8000e";
+			reg = <0x38320000 0x10000>;
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_VC8000E>;
+		};
+
 		vpumix_blk_ctrl: blk-ctrl@38330000 {
 			compatible = "fsl,imx8mp-vpu-blk-ctrl", "syscon";
 			reg = <0x38330000 0x100>;
@@ -1650,6 +1683,9 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
 				 <&clk IMX8MP_CLK_VPU_G2_ROOT>,
 				 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
 			clock-names = "g1", "g2", "vc8000e";
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
 			interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
 					<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
 					<&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;
Signature · 7 lines
2.35.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

Hi Marek,

Thank you for the patch.

Quoted 50 lines · Marek Vasut

Add DT nodes for the Hantro VPU found in i.MX8MP SoC.

---
Cc: Abel Vesa <[email protected]>
Cc: Adam Ford <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Ezequiel Garcia <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Jacky Bai <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Markus Niebel <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
To: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 36 +++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +14 -0
index 34c2c80c47eb5..5040b3a545c32 100644
@@ -1639,6 +1639,39 @@ gpu2d: gpu@38008000 {
 			power-domains = <&pgc_gpu2d>;
 		};
 
+		vpu_g1: video-codec@38300000 {
+			compatible = "nxp,imx8mm-vpu-g1";
+			reg = <0x38300000 0x10000>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+		};
+
+		vpu_g2: video-codec@38310000 {
+			compatible = "nxp,imx8mq-vpu-g2";
+			reg = <0x38310000 0x10000>;

arch/arm64/boot/dts/freescale/imx8mp.dtsi gpu2d: gpu@38008000 { · line 1665

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +10 -0
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
+		};
+
+		vpu_vc8000e: vpu_vc8000e@38320000 {
+			compatible = "nxp,imx8mp-vpu-vc8000e";

I tried to look for the patch that defined this compatible value, but couldn't find it. Same for driver support. Have they been posted somewhere ?

Quoted 22 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +12 -0
+			reg = <0x38320000 0x10000>;
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_VC8000E>;
+		};
+
 		vpumix_blk_ctrl: blk-ctrl@38330000 {
 			compatible = "fsl,imx8mp-vpu-blk-ctrl", "syscon";
 			reg = <0x38330000 0x100>;
@@ -1650,6 +1683,9 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
 				 <&clk IMX8MP_CLK_VPU_G2_ROOT>,
 				 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
 			clock-names = "g1", "g2", "vc8000e";
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
 			interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
 					<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
 					<&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

On 12/18/22 02:36, Laurent Pinchart wrote:

Hi,

[...]

Quoted 28 lines
Quoted 28 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +20 -0
index 34c2c80c47eb5..5040b3a545c32 100644
@@ -1639,6 +1639,39 @@ gpu2d: gpu@38008000 {
  			power-domains = <&pgc_gpu2d>;
  		};
 
+		vpu_g1: video-codec@38300000 {
+			compatible = "nxp,imx8mm-vpu-g1";
+			reg = <0x38300000 0x10000>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+		};
+
+		vpu_g2: video-codec@38310000 {
+			compatible = "nxp,imx8mq-vpu-g2";
+			reg = <0x38310000 0x10000>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+			assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
+			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mp.dtsi gpu2d: gpu@38008000 { · line 1665

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -0
+		};
+
+		vpu_vc8000e: vpu_vc8000e@38320000 {
+			compatible = "nxp,imx8mp-vpu-vc8000e";

I tried to look for the patch that defined this compatible value, but couldn't find it. Same for driver support. Have they been posted somewhere ?

Not the vc8000e to my knowledge, the other two are upstream.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw
Quoted 44 lines · Marek Vasut

On 12/18/22 02:36, Laurent Pinchart wrote:

Hi,

[...]

Quoted 28 lines
Quoted 28 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +20 -0
index 34c2c80c47eb5..5040b3a545c32 100644
@@ -1639,6 +1639,39 @@ gpu2d: gpu@38008000 {
                     power-domains = <&pgc_gpu2d>;
             };
 
+            vpu_g1: video-codec@38300000 {
+                    compatible = "nxp,imx8mm-vpu-g1";
+                    reg = <0x38300000 0x10000>;
+                    interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                    clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+                    assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+                    assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                    assigned-clock-rates = <700000000>;
+                    power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+            };
+
+            vpu_g2: video-codec@38310000 {
+                    compatible = "nxp,imx8mq-vpu-g2";
+                    reg = <0x38310000 0x10000>;
+                    interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                    clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+                    assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+                    assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                    assigned-clock-rates = <700000000>;
+                    power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mp.dtsi gpu2d: gpu@38008000 { · line 1665

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -0
+            };
+
+            vpu_vc8000e: vpu_vc8000e@38320000 {
+                    compatible = "nxp,imx8mp-vpu-vc8000e";

I tried to look for the patch that defined this compatible value, but couldn't find it. Same for driver support. Have they been posted somewhere ?

Quoted 1 line

Not the vc8000e to my knowledge, the other two are upstream.

For what it's worth, I'm still working on getting my imx8mp up and running with a mainline kernel, but the g1 and g2 enumerate:

[    7.039007] hantro-vpu 38300000.video-codec: registered
nxp,imx8mm-vpu-g1-dec as /dev/video0
[    7.054049] hantro-vpu 38310000.video-codec: registered

nxp,imx8mq-vpu-g2-dec as /dev/video1

I'm hoping to get a more mainline version of g-streamer to be able to do video decoding and run some fluster tests, but I want to get HDMI and DSI video working before I'll have more time to spend on the decoders.
If there isn't a driver for the vc8000e, I wonder if it wouldn't make sense to post a V2 with just the G1 and G2 decoders enabled.

adam

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw
Quoted 53 lines · Adam Ford
Quoted 44 lines · Marek Vasut

On 12/18/22 02:36, Laurent Pinchart wrote:

Hi,

[...]

Quoted 28 lines
Quoted 28 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +20 -0
index 34c2c80c47eb5..5040b3a545c32 100644
@@ -1639,6 +1639,39 @@ gpu2d: gpu@38008000 {
                      power-domains = <&pgc_gpu2d>;
              };
 
+            vpu_g1: video-codec@38300000 {
+                    compatible = "nxp,imx8mm-vpu-g1";
+                    reg = <0x38300000 0x10000>;
+                    interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                    clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+                    assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+                    assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                    assigned-clock-rates = <700000000>;
+                    power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+            };
+
+            vpu_g2: video-codec@38310000 {
+                    compatible = "nxp,imx8mq-vpu-g2";
+                    reg = <0x38310000 0x10000>;
+                    interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                    clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+                    assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+                    assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                    assigned-clock-rates = <700000000>;
+                    power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mp.dtsi gpu2d: gpu@38008000 { · line 1665

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -0
+            };
+
+            vpu_vc8000e: vpu_vc8000e@38320000 {
+                    compatible = "nxp,imx8mp-vpu-vc8000e";

I tried to look for the patch that defined this compatible value, but couldn't find it. Same for driver support. Have they been posted somewhere ?

Quoted 1 line

Not the vc8000e to my knowledge, the other two are upstream.

For what it's worth, I'm still working on getting my imx8mp up and running with a mainline kernel, but the g1 and g2 enumerate:

[    7.039007] hantro-vpu 38300000.video-codec: registered
nxp,imx8mm-vpu-g1-dec as /dev/video0
[    7.054049] hantro-vpu 38310000.video-codec: registered
Quoted 8 lines

nxp,imx8mq-vpu-g2-dec as /dev/video1

I'm hoping to get a more mainline version of g-streamer to be able to do video decoding and run some fluster tests, but I want to get HDMI and DSI video working before I'll have more time to spend on the decoders.
If there isn't a driver for the vc8000e, I wonder if it wouldn't make sense to post a V2 with just the G1 and G2 decoders enabled.

Let's do that

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel