File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -141,4 +141,16 @@ config FLEXCOMM0_CLK_SRC_FRO
141
141
142
142
endchoice
143
143
144
+ choice MIPI_DPHY_CLK_SRC
145
+ prompt "Clock source for MIPI DPHY"
146
+ default MIPI_DPHY_CLK_SRC_AUX1_PLL
147
+
148
+ config MIPI_DPHY_CLK_SRC_AUX1_PLL
149
+ bool "AUX1_PLL is source of MIPI_DPHY clock"
150
+
151
+ config MIPI_DPHY_CLK_SRC_FRO
152
+ bool "FRO 192/96M is source of MIPI_DPHY clock"
153
+
154
+ endchoice
155
+
144
156
endif # SOC_SERIES_IMX_RT5XX
Original file line number Diff line number Diff line change @@ -462,12 +462,21 @@ void __weak imxrt_pre_init_display_interface(void)
462
462
* We set the divider of the PFD3 output of the SYSPLL, which has a
463
463
* fixed multiplied of 18, and use this output frequency for the DPHY.
464
464
*/
465
+
466
+ #ifdef CONFIG_MIPI_DPHY_CLK_SRC_AUX1_PLL
467
+ /* Note: AUX1 PLL clock is system pll clock * 18 / pfd.
468
+ * system pll clock is configured at 528MHz by default.
469
+ */
465
470
CLOCK_AttachClk (kAUX1_PLL_to_MIPI_DPHY_CLK );
466
471
CLOCK_InitSysPfd (kCLOCK_Pfd3 ,
467
472
((CLOCK_GetSysPllFreq () * 18ull ) /
468
473
((unsigned long long )(DT_PROP (DT_NODELABEL (mipi_dsi ), phy_clock )))));
469
474
CLOCK_SetClkDiv (kCLOCK_DivDphyClk , 1 );
470
-
475
+ #elif defined(CONFIG_MIPI_DPHY_CLK_SRC_FRO )
476
+ CLOCK_AttachClk (kFRO_DIV1_to_MIPI_DPHY_CLK );
477
+ CLOCK_SetClkDiv (kCLOCK_DivDphyClk ,
478
+ (CLK_FRO_CLK / DT_PROP (DT_NODELABEL (mipi_dsi ), phy_clock )));
479
+ #endif
471
480
/* Clear DSI control reset (Note that DPHY reset is cleared later)*/
472
481
RESET_ClearPeripheralReset (kMIPI_DSI_CTRL_RST_SHIFT_RSTn );
473
482
}
You can’t perform that action at this time.
0 commit comments