From: Christian Gmeiner <[email protected]>

The panel is driven by LCDIF through the NWL MIPI-DSI host and a
SN65DSI86 eDP bridge. LCDIF underflows at 1920x1080. The picture shows
horizontal streaks and the underflow flag in LCDIF_CTRL1 is set several
times per second, even when idle.

DCSS does not have this problem. Connect it to the MIPI-DSI host and
leave LCDIF disabled.

Use IMX8MQ_CLK_DC_PIXEL as pixel clock, with the video PLL at four
times the panel pixel clock. The DCSS binding only allows three
assigned-clocks, so the PLL setup is in the MIPI-DSI node.

Signed-off-by: Christian Gmeiner <[email protected]>
---
 .../boot/dts/freescale/imx8mq-mnt-reform2.dts      | 52 ++++++++++++++++++++--
 1 file changed, 48 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts 
b/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts
index 3ae3824be027..31c7428f0386 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts
@@ -171,17 +171,61 @@ edp_bridge_out: endpoint {
        };
 };
 
-&lcdif {
-       assigned-clocks = <&clk IMX8MQ_CLK_LCDIF_PIXEL>;
-       assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_800M>;
-       /delete-property/assigned-clock-rates;
+&dcss {
+       clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>,
+                <&clk IMX8MQ_CLK_DISP_AXI_ROOT>,
+                <&clk IMX8MQ_CLK_DISP_RTRM_ROOT>,
+                <&clk IMX8MQ_CLK_DC_PIXEL>,
+                <&clk IMX8MQ_CLK_DISP_DTRC>;
+       assigned-clocks = <&clk IMX8MQ_CLK_DISP_AXI>,
+                         <&clk IMX8MQ_CLK_DISP_RTRM>,
+                         <&clk IMX8MQ_VIDEO_PLL1_REF_SEL>;
+       assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_800M>,
+                                <&clk IMX8MQ_SYS1_PLL_800M>,
+                                <&clk IMX8MQ_CLK_25M>;
        status = "okay";
+
+       port {
+               dcss_dsi_out: endpoint {
+                       remote-endpoint = <&mipi_dsi_dcss_in>;
+               };
+       };
+};
+
+&lcdif {
+       /delete-node/ port;
 };
 
 &mipi_dsi {
+       /*
+        * DCSS takes the pixel clock from the video PLL. The PLL runs at four
+        * times the 138.78 MHz panel pixel clock.
+        */
+       assigned-clocks = <&clk IMX8MQ_CLK_DSI_AHB>,
+                         <&clk IMX8MQ_CLK_DSI_CORE>,
+                         <&clk IMX8MQ_CLK_DSI_IPG_DIV>,
+                         <&clk IMX8MQ_VIDEO_PLL1_BYPASS>,
+                         <&clk IMX8MQ_CLK_DC_PIXEL>,
+                         <&clk IMX8MQ_VIDEO_PLL1>;
+       assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>,
+                                <&clk IMX8MQ_SYS1_PLL_266M>,
+                                <0>,
+                                <&clk IMX8MQ_VIDEO_PLL1>,
+                                <&clk IMX8MQ_VIDEO_PLL1_OUT>;
+       assigned-clock-rates = <80000000>, <266000000>, <20000000>, <0>, <0>,
+                              <555120000>;
        status = "okay";
 
        ports {
+               port@0 {
+                       /delete-node/ endpoint@0;
+
+                       mipi_dsi_dcss_in: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&dcss_dsi_out>;
+                       };
+               };
+
                port@1 {
                        reg = <1>;
 

-- 
2.56.0

Reply via email to