Skip to contentSkip to conversation

Increase i.MX8MP VPU

PATCH Superseded Adam Ford 4 participants 14 messages May 30, 2025 – Jun 27, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

cover Increase i.MX8MP VPU

Some of the VPU clocks are under rated, even for nominal ratings. Fix the nominial VPU clocks and clock parents, then introduce the overdrive clock rates. The fluster scores don't decrease, but they do go faster.

This series was adapted from an RFC from Marco Felsch which was setup to introduce the VC8000E encoder and extacted the parts that affect the existing infrastructure.

Adam Ford (2):
arm64: dts: imx8mp-nominal: Explicitly configure nominal VPU clocks
arm64: dts: imx8mp: Configure VPU clocks for overdrive

Marco Felsch (2):
arm64: dts: imx8mp: drop gpcv2 vpu power-domains and clocks
arm64: dts: imx8mp: fix VPU_BUS clock setting

 .../boot/dts/freescale/imx8mp-nominal.dtsi    | 18 ++++++++++++++++
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     | 21 +++++++------------
 2 files changed, 25 insertions(+), 14 deletions(-)
Signature · 1 line
2.48.1
author
#1 lore raw

PATCH 1/4 arm64: dts: imx8mp: drop gpcv2 vpu power-domains and clocks

From: Marco Felsch <[email protected]>

The GPCv2 G1, G2 and VC8000E power-domain don't need to reference the VPUMIX power-domain nor their module clocks since the power and reset handling is done by the VPUMIX blkctrl driver.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 7 -------
 1 file changed, 7 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0 -7
index 948b88cf5e9d..1bf15c502280 100644
@@ -876,24 +876,17 @@ pgc_mediamix: power-domain@10 {
 
 					pgc_vpu_g1: power-domain@11 {
 						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
 						reg = <IMX8MP_POWER_DOMAIN_VPU_G1>;
-						clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
 					};
 
 					pgc_vpu_g2: power-domain@12 {
 						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
 						reg = <IMX8MP_POWER_DOMAIN_VPU_G2>;
-						clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
-
 					};
 
 					pgc_vpu_vc8000e: power-domain@13 {
 						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
 						reg = <IMX8MP_POWER_DOMAIN_VPU_VC8000E>;
-						clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
 					};
 
 					pgc_hdmimix: power-domain@14 {
Signature · 1 line
2.48.1
author
#4 lore raw

PATCH 2/4 arm64: dts: imx8mp: fix VPU_BUS clock setting

In reply to Adam Ford

From: Marco Felsch <[email protected]>

The VPU_PLL clock must be set before the VPU_BUS clock which is derived from the VPU_PLL clock else the VPU_BUS clock is 300MHz and not 600MHz.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
index 1bf15c502280..909555a5da4b 100644
@@ -2283,8 +2283,8 @@ 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>, <&clk IMX8MP_VPU_PLL>;
-			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
+			assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
 			assigned-clock-rates = <600000000>, <600000000>;
 			interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
 					<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
Signature · 1 line
2.48.1
author
#6 lore raw

PATCH 3/4 arm64: dts: imx8mp-nominal: Explicitly configure nominal VPU clocks

In reply to Adam Ford

In preparation for increasing the default VPU clocks to overdrive, configure the nominal values first to avoid running the nominal devices out of spec when imx8mp.dtsi is changed.

---
 .../boot/dts/freescale/imx8mp-nominal.dtsi     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-nominal.dtsi +18 -0
index 2ce1860b244d..f269f7a004fc 100644
@@ -89,4 +89,22 @@ &media_blk_ctrl {
 			       <1039500000>;
 };
 
+&vpu_g1 {
+	assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+	assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+	assigned-clock-rates = <600000000>;
+};
+
+&vpu_g2 {
+	assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+	assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
+	assigned-clock-rates = <500000000>;
+};
+
+&vpumix_blk_ctrl {
+	assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
+	assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
+	assigned-clock-rates = <600000000>, <600000000>;
+};
+
 /delete-node/ &{noc_opp_table/opp-1000000000};
Signature · 1 line
2.48.1
author
#9 lore raw

PATCH 4/4 arm64: dts: imx8mp: Configure VPU clocks for overdrive

In reply to Adam Ford

The defaults for this SoC are configured for overdrive mode, but the VPU clocks are currently configured for nominal mode. Increase VPU_G1_CLK_ROOT to 800MHZ from 600MHz, Increase VPU_G2_CLK_ROOT to 700MHZ from 500MHz, and Increase VPU_BUS_CLK_ROOT to 800MHz from 600MHz.

This requires adjusting the clock parents. Since there is already 800MHz clock references, move the VPU_BUS and G1 clocks to it. This frees up the VPU_PLL to be configured at 700MHz to run the G2 clock at 700MHz.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +6 -6
index 909555a5da4b..848b25c9b752 100644
@@ -2256,8 +2256,8 @@ vpu_g1: video-codec@38300000 {
 			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 = <600000000>;
+			assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
+			assigned-clock-rates = <800000000>;
 			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
 		};
 
@@ -2267,8 +2267,8 @@ vpu_g2: video-codec@38310000 {
 			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_SYS_PLL2_1000M>;
-			assigned-clock-rates = <500000000>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
 			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
 		};
 
@@ -2284,8 +2284,8 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
 				 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
 			clock-names = "g1", "g2", "vc8000e";
 			assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
-			assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
-			assigned-clock-rates = <600000000>, <600000000>;
+			assigned-clock-parents = <0>, <&clk IMX8MP_SYS_PLL1_800M>;
+			assigned-clock-rates = <700000000>, <800000000>;
 			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 · 1 line
2.48.1
#10 lore raw

Re: [PATCH 4/4] arm64: dts: imx8mp: Configure VPU clocks for overdrive

Hi Adam,

thanks for the patch.

Quoted 43 lines · Adam Ford

The defaults for this SoC are configured for overdrive mode, but the VPU clocks are currently configured for nominal mode. Increase VPU_G1_CLK_ROOT to 800MHZ from 600MHz, Increase VPU_G2_CLK_ROOT to 700MHZ from 500MHz, and Increase VPU_BUS_CLK_ROOT to 800MHz from 600MHz.

This requires adjusting the clock parents. Since there is already 800MHz clock references, move the VPU_BUS and G1 clocks to it. This frees up the VPU_PLL to be configured at 700MHz to run the G2 clock at 700MHz.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -4
index 909555a5da4b..848b25c9b752 100644
@@ -2256,8 +2256,8 @@ vpu_g1: video-codec@38300000 {
 			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 = <600000000>;
+			assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
+			assigned-clock-rates = <800000000>;
 			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
 		};
 
@@ -2267,8 +2267,8 @@ vpu_g2: video-codec@38310000 {
 			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_SYS_PLL2_1000M>;
-			assigned-clock-rates = <500000000>;
+			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+			assigned-clock-rates = <700000000>;
 			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
 		};
 

arch/arm64/boot/dts/freescale/imx8mp.dtsi vpumix_blk_ctrl: blk-ctrl@38330000 { · line 2288

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
@@ -2284,8 +2284,8 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
 				 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
 			clock-names = "g1", "g2", "vc8000e";
 			assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
-			assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
-			assigned-clock-rates = <600000000>, <600000000>;
+			assigned-clock-parents = <0>, <&clk IMX8MP_SYS_PLL1_800M>;
+			assigned-clock-rates = <700000000>, <800000000>;

I think we can drop the "assigned-clocks = <&clk IMX8MP_VPU_PLL>" part completely.

Before your patch the IMX8MP_VPU_PLL_OUT was used as clock-parent for the IMX8MP_CLK_VPU_BUS. With yout patch IMX8MP_SYS_PLL1_800M is used.

Regards,
Marco

Reviewed-by on v1 3/4
#7 lore raw

Re: [PATCH 3/4] arm64: dts: imx8mp-nominal: Explicitly configure nominal VPU clocks

In reply to Adam Ford

Hello Adam,

Quoted 3 lines · Adam Ford

In preparation for increasing the default VPU clocks to overdrive, configure the nominal values first to avoid running the nominal devices out of spec when imx8mp.dtsi is changed.

Thanks for keeping imx8mp-nominal.dtsi users in mind.

Quoted 2 lines

Cheers,
Ahmad

Quoted 31 lines
---
 .../boot/dts/freescale/imx8mp-nominal.dtsi     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-nominal.dtsi +18 -0
index 2ce1860b244d..f269f7a004fc 100644
@@ -89,4 +89,22 @@ &media_blk_ctrl {
 			       <1039500000>;
 };
 
+&vpu_g1 {
+	assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+	assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+	assigned-clock-rates = <600000000>;
+};
+
+&vpu_g2 {
+	assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+	assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
+	assigned-clock-rates = <500000000>;
+};
+
+&vpumix_blk_ctrl {
+	assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
+	assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
+	assigned-clock-rates = <600000000>, <600000000>;
+};
+
 /delete-node/ &{noc_opp_table/opp-1000000000};
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author
#11 lore raw

Re: [PATCH 4/4] arm64: dts: imx8mp: Configure VPU clocks for overdrive

In reply to Marco Felsch
Quoted 60 lines · Marco Felsch

Hi Adam,

thanks for the patch.

Quoted 43 lines · Adam Ford

The defaults for this SoC are configured for overdrive mode, but the VPU clocks are currently configured for nominal mode. Increase VPU_G1_CLK_ROOT to 800MHZ from 600MHz, Increase VPU_G2_CLK_ROOT to 700MHZ from 500MHz, and Increase VPU_BUS_CLK_ROOT to 800MHz from 600MHz.

This requires adjusting the clock parents. Since there is already 800MHz clock references, move the VPU_BUS and G1 clocks to it. This frees up the VPU_PLL to be configured at 700MHz to run the G2 clock at 700MHz.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -4
index 909555a5da4b..848b25c9b752 100644
@@ -2256,8 +2256,8 @@ vpu_g1: video-codec@38300000 {
                      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 = <600000000>;
+                     assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
+                     assigned-clock-rates = <800000000>;
                      power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
              };
 
@@ -2267,8 +2267,8 @@ vpu_g2: video-codec@38310000 {
                      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_SYS_PLL2_1000M>;
-                     assigned-clock-rates = <500000000>;
+                     assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                     assigned-clock-rates = <700000000>;
                      power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
              };
 

arch/arm64/boot/dts/freescale/imx8mp.dtsi vpumix_blk_ctrl: blk-ctrl@38330000 { · line 2288

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
@@ -2284,8 +2284,8 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
                               <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
                      clock-names = "g1", "g2", "vc8000e";
                      assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
-                     assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
-                     assigned-clock-rates = <600000000>, <600000000>;
+                     assigned-clock-parents = <0>, <&clk IMX8MP_SYS_PLL1_800M>;
+                     assigned-clock-rates = <700000000>, <800000000>;

I think we can drop the "assigned-clocks = <&clk IMX8MP_VPU_PLL>" part completely.

Quoted 2 lines

Before your patch the IMX8MP_VPU_PLL_OUT was used as clock-parent for the IMX8MP_CLK_VPU_BUS. With yout patch IMX8MP_SYS_PLL1_800M is used.

I think you're right. I'll fix that up and do a V2. I forgot to add my own s-o-b tag, so I'll fix that too. I'll try to do it this week.

adam

Quoted 3 lines

Regards,
Marco

author
#12 lore raw

Re: [PATCH 4/4] arm64: dts: imx8mp: Configure VPU clocks for overdrive

Quoted 62 lines · Adam Ford
Quoted 60 lines · Marco Felsch

Hi Adam,

thanks for the patch.

Quoted 43 lines · Adam Ford

The defaults for this SoC are configured for overdrive mode, but the VPU clocks are currently configured for nominal mode. Increase VPU_G1_CLK_ROOT to 800MHZ from 600MHz, Increase VPU_G2_CLK_ROOT to 700MHZ from 500MHz, and Increase VPU_BUS_CLK_ROOT to 800MHz from 600MHz.

This requires adjusting the clock parents. Since there is already 800MHz clock references, move the VPU_BUS and G1 clocks to it. This frees up the VPU_PLL to be configured at 700MHz to run the G2 clock at 700MHz.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -4
index 909555a5da4b..848b25c9b752 100644
@@ -2256,8 +2256,8 @@ vpu_g1: video-codec@38300000 {
                      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 = <600000000>;
+                     assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
+                     assigned-clock-rates = <800000000>;
                      power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
              };
 
@@ -2267,8 +2267,8 @@ vpu_g2: video-codec@38310000 {
                      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_SYS_PLL2_1000M>;
-                     assigned-clock-rates = <500000000>;
+                     assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                     assigned-clock-rates = <700000000>;
                      power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
              };
 

arch/arm64/boot/dts/freescale/imx8mp.dtsi vpumix_blk_ctrl: blk-ctrl@38330000 { · line 2288

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
@@ -2284,8 +2284,8 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
                               <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
                      clock-names = "g1", "g2", "vc8000e";
                      assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
-                     assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
-                     assigned-clock-rates = <600000000>, <600000000>;
+                     assigned-clock-parents = <0>, <&clk IMX8MP_SYS_PLL1_800M>;
+                     assigned-clock-rates = <700000000>, <800000000>;

I think we can drop the "assigned-clocks = <&clk IMX8MP_VPU_PLL>" part completely.

Quoted 5 lines
Quoted 2 lines

Before your patch the IMX8MP_VPU_PLL_OUT was used as clock-parent for the IMX8MP_CLK_VPU_BUS. With yout patch IMX8MP_SYS_PLL1_800M is used.

I think you're right. I'll fix that up and do a V2. I forgot to add my own s-o-b tag, so I'll fix that too. I'll try to do it this week.

Marco,

I tried removing the assigned-clock references to the IMX8MP_VPU_PLL, but i found the defaul speed was 800MHz for the PLL even when asking G2 to be 700MHz. The only way that I found to set the G2 to 700MHz was to set the VPU_PLL to 700MHz. I can do that either inside the G2 node or the vpumix_blk_ctrl node. I generally like to have the blk_ctrl do it since it controls the G1_ROOT and G2_ROOT clocks, but it doesn't seem to hurt it being inside the G2 node either. I can see the argument for having it insde the G2 node, since the G2 clock is what's requiring the VPU_PLL to be 700MHz.

Let me know your preferences, and I'll move forward accordingly.

adam

Quoted 5 lines

adam

Quoted 3 lines

Regards,
Marco

#13 lore raw

Re: [PATCH 4/4] arm64: dts: imx8mp: Configure VPU clocks for overdrive

Quoted 81 lines · Adam Ford
Quoted 62 lines · Adam Ford
Quoted 60 lines · Marco Felsch

Hi Adam,

thanks for the patch.

Quoted 43 lines · Adam Ford

The defaults for this SoC are configured for overdrive mode, but the VPU clocks are currently configured for nominal mode. Increase VPU_G1_CLK_ROOT to 800MHZ from 600MHz, Increase VPU_G2_CLK_ROOT to 700MHZ from 500MHz, and Increase VPU_BUS_CLK_ROOT to 800MHz from 600MHz.

This requires adjusting the clock parents. Since there is already 800MHz clock references, move the VPU_BUS and G1 clocks to it. This frees up the VPU_PLL to be configured at 700MHz to run the G2 clock at 700MHz.

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +4 -4
index 909555a5da4b..848b25c9b752 100644
@@ -2256,8 +2256,8 @@ vpu_g1: video-codec@38300000 {
                      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 = <600000000>;
+                     assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
+                     assigned-clock-rates = <800000000>;
                      power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
              };
 
@@ -2267,8 +2267,8 @@ vpu_g2: video-codec@38310000 {
                      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_SYS_PLL2_1000M>;
-                     assigned-clock-rates = <500000000>;
+                     assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+                     assigned-clock-rates = <700000000>;
                      power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
              };
 

arch/arm64/boot/dts/freescale/imx8mp.dtsi vpumix_blk_ctrl: blk-ctrl@38330000 { · line 2288

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
@@ -2284,8 +2284,8 @@ vpumix_blk_ctrl: blk-ctrl@38330000 {
                               <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
                      clock-names = "g1", "g2", "vc8000e";
                      assigned-clocks = <&clk IMX8MP_VPU_PLL>, <&clk IMX8MP_CLK_VPU_BUS>;
-                     assigned-clock-parents = <0>, <&clk IMX8MP_VPU_PLL_OUT>;
-                     assigned-clock-rates = <600000000>, <600000000>;
+                     assigned-clock-parents = <0>, <&clk IMX8MP_SYS_PLL1_800M>;
+                     assigned-clock-rates = <700000000>, <800000000>;

I think we can drop the "assigned-clocks = <&clk IMX8MP_VPU_PLL>" part completely.

Quoted 5 lines
Quoted 2 lines

Before your patch the IMX8MP_VPU_PLL_OUT was used as clock-parent for the IMX8MP_CLK_VPU_BUS. With yout patch IMX8MP_SYS_PLL1_800M is used.

I think you're right. I'll fix that up and do a V2. I forgot to add my own s-o-b tag, so I'll fix that too. I'll try to do it this week.

Marco,

I tried removing the assigned-clock references to the IMX8MP_VPU_PLL, but i found the defaul speed was 800MHz for the PLL even when asking G2 to be 700MHz. The only way that I found to set the G2 to 700MHz was to set the VPU_PLL to 700MHz. I can do that either inside the G2 node or the vpumix_blk_ctrl node. I generally like to have the blk_ctrl do it since it controls the G1_ROOT and G2_ROOT clocks, but it doesn't seem to hurt it being inside the G2 node either. I can see the argument for having it insde the G2 node, since the G2 clock is what's requiring the VPU_PLL to be 700MHz.

Quoted 1 line

Let me know your preferences, and I'll move forward accordingly.

Hi Adam,

thanks for testing. IMHO we should do the clock handling within the G2 node. This requires no comments because the code would be obvious else you need to comment the setup of the IMX8MP_VPU_PLL within the vpumix_blk_ctrl node because this is not obvious.

Regards,
Marco

#2 lore raw

Re: [PATCH 1/4] arm64: dts: imx8mp: drop gpcv2 vpu power-domains and clocks

In reply to Adam Ford
Quoted 7 lines · Adam Ford

From: Marco Felsch <[email protected]>

The GPCv2 G1, G2 and VC8000E power-domain don't need to reference the VPUMIX power-domain nor their module clocks since the power and reset handling is done by the VPUMIX blkctrl driver.

LGTM: Reviewed-by: Peng Fan <[email protected]>

Just curious is there any issues without this change?

Regards,
Peng

author
#3 lore raw

Re: [PATCH 1/4] arm64: dts: imx8mp: drop gpcv2 vpu power-domains and clocks

In reply to Peng Fan
Quoted 8 lines · Peng Fan
Quoted 6 lines · Adam Ford

From: Marco Felsch <[email protected]>

The GPCv2 G1, G2 and VC8000E power-domain don't need to reference the VPUMIX power-domain nor their module clocks since the power and reset handling is done by the VPUMIX blkctrl driver.

Quoted 5 lines
Quoted 1 line

LGTM: Reviewed-by: Peng Fan <[email protected]>

Just curious is there any issues without this change?

The vpumix_blk_ctrl driver handles the timing between the vpumix and the g1, g2 and vc8000 devices. From what I can tell, this is required to make it not hang on an 8MPQDL where the VPU is not present.

adam

Quoted 3 lines

Regards,
Peng