Skip to contentSkip to conversation

arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz

PATCH Applied Marek Vasut 3 participants 3 messages Oct 17, 2024 – Oct 22, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz

The LVDS panel on this device uses 72.4 MHz pixel clock, set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB serializer and LCDIFv3 scanout engine can reach accurate pixel clock of exactly 72.4 MHz.

Without this patch, the Video PLL1 frequency is the default set in imx8mp.dtsi which is 1039.5 MHz, which divides down to inaccurate pixel clock of 74.25 MHz which works for this particular panel by sheer chance.

Stop taking that chance and set correct accurate pixel clock frequency instead.

Fixes 326d86e197fc ("arm64: dts: imx8mp-phyboard-pollux-rdk: add etml panel support")

---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Isaac Scott <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Liu Ying <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Yannic Moog <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Note: I do not have the board, but Isaac reported they tested it successfully.
TB would be nice.

---
 .../dts/freescale/imx8mp-phyboard-pollux-rdk.dts     | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +12 -0
index 50debe821c421..9c102acb8052c 100644
@@ -218,6 +218,18 @@ ldb_lvds_ch1: endpoint {
 	};
 };
 
+&media_blk_ctrl {
+	/*
+	 * The LVDS panel on this device uses 72.4 MHz pixel clock,
+	 * set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB
+	 * serializer and LCDIFv3 scanout engine can reach accurate
+	 * pixel clock of exactly 72.4 MHz.
+	 */
+	assigned-clock-rates = <500000000>, <200000000>,
+			       <0>, <0>, <500000000>,
+			       <506800000>;
+};
+
 &snvs_pwrkey {
 	status = "okay";
 };
Signature · 1 line
2.45.2
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · Marek Vasut

The LVDS panel on this device uses 72.4 MHz pixel clock, set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB serializer and LCDIFv3 scanout engine can reach accurate pixel clock of exactly 72.4 MHz.

Without this patch, the Video PLL1 frequency is the default set in imx8mp.dtsi which is 1039.5 MHz, which divides down to inaccurate pixel clock of 74.25 MHz which works for this particular panel by sheer chance.

Quoted 5 lines

Stop taking that chance and set correct accurate pixel clock frequency instead.

Fixes 326d86e197fc ("arm64: dts: imx8mp-phyboard-pollux-rdk: add etml panel support")
Quoted 46 lines

---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Isaac Scott <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Liu Ying <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Yannic Moog <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Note: I do not have the board, but Isaac reported they tested it successfully. TB would be nice.
---
 .../dts/freescale/imx8mp-phyboard-pollux-rdk.dts     | 12 ++++++++++++

 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +0 -0
index 50debe821c421..9c102acb8052c 100644
@@ -218,6 +218,18 @@ ldb_lvds_ch1: endpoint {
  	};
  };


+&media_blk_ctrl {

arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +11 -0
+	/*
+	 * The LVDS panel on this device uses 72.4 MHz pixel clock,
+	 * set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB
+	 * serializer and LCDIFv3 scanout engine can reach accurate
+	 * pixel clock of exactly 72.4 MHz.
+	 */
+	assigned-clock-rates = <500000000>, <200000000>,
+			       <0>, <0>, <500000000>,
+			       <506800000>;
+};
+

 &snvs_pwrkey {
  status = "okay";
 };

Applied
#2 lore raw
In reply to Marek Vasut
Quoted 8 lines · Marek Vasut

The LVDS panel on this device uses 72.4 MHz pixel clock, set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB serializer and LCDIFv3 scanout engine can reach accurate pixel clock of exactly 72.4 MHz.

Without this patch, the Video PLL1 frequency is the default set in imx8mp.dtsi which is 1039.5 MHz, which divides down to inaccurate pixel clock of 74.25 MHz which works for this particular panel by sheer chance.

Quoted 5 lines

Stop taking that chance and set correct accurate pixel clock frequency instead.

Fixes 326d86e197fc ("arm64: dts: imx8mp-phyboard-pollux-rdk: add etml panel support")

Applied, thanks!