From a99c984d617f386a1549ffcdcb7da25b14efbd7e Mon Sep 17 00:00:00 2001 From: lilijun Date: Wed, 14 Aug 2024 14:54:12 +0800 Subject: [PATCH 149/222] feat:dsi support set bus-format Changelogs: 1.dts define panel bus-format: MIPI_DSI_FMT_RGB888 MIPI_DSI_FMT_RGB666 MIPI_DSI_FMT_RGB565 Signed-off-by: lilijun --- .../dts/eswin/eswin-win2030-die0-soc.dtsi | 3 +- .../dts/eswin/eswin-win2030-die1-soc.dtsi | 2 + drivers/gpu/drm/eswin/es_mipi_dsi.c | 30 +++++++++---- drivers/gpu/drm/eswin/es_panel.c | 42 ++++++++++++------- 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/arch/riscv/boot/dts/eswin/eswin-win2030-die0-soc.dtsi b/arch/riscv/boot/dts/eswin/eswin-win2030-die0-soc.dtsi index 2a85265960a3..13a40780a619 100644 --- a/arch/riscv/boot/dts/eswin/eswin-win2030-die0-soc.dtsi +++ b/arch/riscv/boot/dts/eswin/eswin-win2030-die0-soc.dtsi @@ -1834,7 +1834,8 @@ mipi_dsi_out: endpoint { dsi_panel:dsi_panel@0 { compatible = "eswin,generic-panel"; reg = <0>; - + dsi,format = <0>; //RGB888:0, RGB666:1, RGB565:3 + dsi,lanes = <4>; port { panel_in: endpoint { remote-endpoint = <&mipi_dsi_out>; diff --git a/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi b/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi index 92cddf1e756f..be08ead18fa8 100644 --- a/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi +++ b/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi @@ -1706,6 +1706,8 @@ d1_mipi_dsi_out: endpoint { panel@1 { compatible = "eswin,generic-panel"; reg = <0>; + dsi,format = <0>; //RGB888:0, RGB666:1, RGB565:3 + dsi,lanes = <4>; port { d1_panel_in: endpoint { diff --git a/drivers/gpu/drm/eswin/es_mipi_dsi.c b/drivers/gpu/drm/eswin/es_mipi_dsi.c index 8aa3c69378f2..9f8d4c4a25b8 100644 --- a/drivers/gpu/drm/eswin/es_mipi_dsi.c +++ b/drivers/gpu/drm/eswin/es_mipi_dsi.c @@ -25,6 +25,7 @@ #include