Hello Everyone ,
I have a custom panel with dual LVDS support (2 × 4 lanes) 1280 × 960 @ 60 Hz with an 81 MHz pixel clock, and I am using the i.MX 8M Plus Applications Processor.
Based on the calculations for 81 MHz in dual-channel mode, I have applied the below changes.
index 9335f1713ce6..528d460aa06f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -752,7 +752,7 @@ clk: clock-controller@30380000 {
<800000000>,
<393216000>,
<361267200>,
- <1039500000>;
+ <567000000>;
};
src: reset-controller@30390000 {
@@ -1505,7 +1505,7 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
<&clk IMX8MP_VIDEO_PLL1_OUT>,
<&clk IMX8MP_VIDEO_PLL1_OUT>;
assigned-clock-rates = <500000000>, <200000000>,
- <0>, <0>, <1039500000>;
+ <0>, <0>, <567000000>;
#power-domain-cells = <1>;
};
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 6c17786ecb9f..a10d7b7b6532 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -75,6 +75,8 @@ static const struct imx_pll14xx_rate_table imx_pll1443x_tbl[] = {
PLL_1443X_RATE(49152000U, 393, 3, 6, 0x374c),
PLL_1443X_RATE(45158400U, 241, 2, 6, 0xd845),
PLL_1443X_RATE(40960000U, 109, 1, 6, 0x3a07),
+ PLL_1443X_RATE(567000000U, 189, 2, 2, 0),
};
struct imx_pll14xx_clk imx_1443x_pll = {
diff --git a/drivers/gpu/drm/imx/imx8mp-ldb.c b/drivers/gpu/drm/imx/imx8mp-ldb.c
index e3f5c5e6e842..c89ee510ec8f 100644
--- a/drivers/gpu/drm/imx/imx8mp-ldb.c
+++ b/drivers/gpu/drm/imx/imx8mp-ldb.c
@@ -190,10 +190,10 @@ imx8mp_ldb_encoder_atomic_check(struct drm_encoder *encoder,
* Due to limited video PLL frequency points on i.MX8mp,
* we do mode fixup here in case any mode is unsupported.
*/
- if (ldb->dual)
+ /*if (ldb->dual)
mode->clock = mode->clock > 100000 ? 148500 : 74250;
else
- mode->clock = 74250;
+ mode->clock = 74250;*/
return 0;
}
@@ -216,11 +216,11 @@ imx8mp_ldb_encoder_mode_valid(struct drm_encoder *encoder,
* Due to limited video PLL frequency points on i.MX8mp,
* we do mode valid check here.
*/
- if (ldb->dual && mode->clock != 74250 && mode->clock != 148500)
+ /*if (ldb->dual && mode->clock != 74250 && mode->clock != 148500)
return MODE_NOCLOCK;
if (!ldb->dual && mode->clock != 74250)
- return MODE_NOCLOCK;
+ return MODE_NOCLOCK;*/
return MODE_OK;
}
Below is the clock output from my setup.
video_pll1_ref_sel 1 1 0 24000000 0 0 50000 Y deviceless no_connection_id
video_pll1 1 1 0 567000000 0 0 50000 Y deviceless no_connection_id
video_pll1_bypass 1 1 0 567000000 0 0 50000 Y deviceless no_connection_id
video_pll1_out 2 2 0 567000000 0 0 50000 Y deviceless no_connection_id
media_ldb 1 1 0 567000000 0 0 50000 Y deviceless no_connection_id
media_ldb_root_clk 1 1 0 567000000 0 0 50000 Y ldb-display-controller ldb
deviceless no_connection_id
media_disp1_pix 0 0 0 567000000 0 0 50000 N deviceless no_connection_id
media_disp1_pix_root_clk 0 0 0 567000000 0 0 50000 N 32e80000.lcd-controller pix
However, I am experiencing flickering in the image.
I have some doubt here ,
- Does NXP hardware support an 81 MHz frequency or not?
- What is the relationship between the following clocks?
- IMX8MP_CLK_MEDIA_LDB
- IMX8MP_CLK_MEDIA_LDB_ROOT
- IMX8MP_VIDEO_PLL1_OUT
- IMX8MP_CLK_MEDIA_DISP1_PIX
- I have set 567000000 (162000 × 3500). Is my calculation correct for 81 MHz in dual-channel mode?
Could you please clarify?
@imx8mp_developer