From e4509155523acb09c900aae58cee663a024d42ff Mon Sep 17 00:00:00 2001 From: Yu Dukai <646689853@qq.com> Date: Fri, 23 Oct 2026 20:54:51 +0800 Subject: [PATCH 1/4] drm/panel: waveshare-dsi-v2: Update Waveshare 8-DSI-TOUCH-A timing On the Compute Module 4, the Waveshare 8-DSI-TOUCH-A panel lights up correctly on DSI0 but fails to light up on DSI1 with the current timing. Update the display timing accordingly so that the panel also works on DSI1: widen the horizontal sync pulse from 20 to 30 pixels and raise the pixel clock from 70 MHz to 71 MHz. The new timing totals 890x1326 pixels, which gives a refresh rate of about 60.2 Hz. Signed-off-by: Yu Dukai <646689853@qq.com> --- drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c index c6cc003a35337..9bf093d30b164 100644 --- a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c @@ -2080,11 +2080,11 @@ static const struct drm_display_mode ws_panel_8_8_a_mode = { }; static const struct drm_display_mode ws_panel_8_a_mode = { - .clock = 70000, + .clock = 71000, .hdisplay = 800, .hsync_start = 800 + 40, - .hsync_end = 800 + 40 + 20, - .htotal = 800 + 40 + 20 + 20, + .hsync_end = 800 + 40 + 30, + .htotal = 800 + 40 + 30 + 20, .vdisplay = 1280, .vsync_start = 1280 + 30, .vsync_end = 1280 + 30 + 12, From 24bb82d1d0deef48a11d36ca249c3e8ef85465d7 Mon Sep 17 00:00:00 2001 From: Yu Dukai <646689853@qq.com> Date: Fri, 23 Oct 2026 20:54:58 +0800 Subject: [PATCH 2/4] drm/panel: waveshare-dsi-v2: Update Waveshare 5-DSI-TOUCH-A timing On the Compute Module 4, the Waveshare 5-DSI-TOUCH-A panel lights up correctly on DSI0 but fails to light up on DSI1 with the current timing. Update the display timing accordingly so that the panel also works on DSI1: widen the horizontal sync pulse from 20 to 30 pixels. The resulting 810x1324 pixel timing already reaches the required refresh rate at the existing 70 MHz pixel clock, so the clock is left unchanged. Signed-off-by: Yu Dukai <646689853@qq.com> --- drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c index 9bf093d30b164..eda2c65751983 100644 --- a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c @@ -2153,8 +2153,8 @@ static const struct drm_display_mode ws_panel_5_a_mode = { .clock = 70000, .hdisplay = 720, .hsync_start = 720 + 40, - .hsync_end = 720 + 40 + 20, - .htotal = 720 + 40 + 20 + 20, + .hsync_end = 720 + 40 + 30, + .htotal = 720 + 40 + 30 + 20, .vdisplay = 1280, .vsync_start = 1280 + 30, .vsync_end = 1280 + 30 + 10, From f11bb4c675e7df8d88e51cc8834e15dd5692582f Mon Sep 17 00:00:00 2001 From: Yu Dukai <646689853@qq.com> Date: Fri, 23 Oct 2026 21:00:35 +0800 Subject: [PATCH 3/4] drm/panel: waveshare-dsi-v2: Add 5-DSI-TOUCH-A-V2 and 5-DSI-TOUCH-B Add the display mode and initialization sequence for the Waveshare 5.0-DSI-TOUCH-A-V2 and 5.0-DSI-TOUCH-B panels. The two products use the same 720x1280 display panel and differ only in the touch cover glass, so they share a single panel description: two MIPI DSI lanes, a 70 MHz pixel clock and the minimal sleep-out/display-on sequence. Signed-off-by: Yu Dukai <646689853@qq.com> --- .../gpu/drm/panel/panel-waveshare-dsi-v2.c | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c index eda2c65751983..c4ed83becccf4 100644 --- a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c @@ -1565,6 +1565,14 @@ static const struct panel_init_cmd ws_panel_5_a_init[] = { {}, }; +static const struct panel_init_cmd ws_panel_5_b_init[] = { + _INIT_DCS_CMD(0x11), + _INIT_DELAY_CMD(120), + _INIT_DCS_CMD(0x29), + _INIT_DELAY_CMD(30), + {}, +}; + static const struct panel_init_cmd ws_panel_4_3_a_init[] = { _INIT_DCS_CMD(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), _INIT_DCS_CMD(0xEF, 0x08), @@ -2163,6 +2171,20 @@ static const struct drm_display_mode ws_panel_5_a_mode = { .height_mm = 110, }; +static const struct drm_display_mode ws_panel_5_b_mode = { + .clock = 70000, + .hdisplay = 720, + .hsync_start = 720 + 80, + .hsync_end = 720 + 80 + 10, + .htotal = 720 + 80 + 10 + 30, + .vdisplay = 1280, + .vsync_start = 1280 + 6, + .vsync_end = 1280 + 6 + 6, + .vtotal = 1280 + 6 + 6 + 12, + .width_mm = 62, + .height_mm = 110, +}; + static const struct drm_display_mode ws_panel_4_3_a_mode = { .clock = 30000, .hdisplay = 480, @@ -2507,6 +2529,15 @@ static const struct ws_panel_desc ws_panel_5_inch_a_desc = { .format = MIPI_DSI_FMT_RGB888, }; +static const struct ws_panel_desc ws_panel_5_inch_b_desc = { + .init = ws_panel_5_b_init, + .mode = &ws_panel_5_b_mode, + .mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | + MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS, + .lanes = 2, + .format = MIPI_DSI_FMT_RGB888, +}; + static const struct ws_panel_desc ws_panel_4_3_inch_a_desc = { .init = ws_panel_4_3_a_init, .mode = &ws_panel_4_3_a_mode, @@ -2572,6 +2603,9 @@ static const struct of_device_id ws_panel_of_match[] = { { .compatible = "waveshare,5.5-dsi-touch-a", &ws_panel_5_5_inch_a_desc }, { .compatible = "waveshare,5.0-dsi-touch-a", &ws_panel_5_inch_a_desc }, + { .compatible = "waveshare,5.0-dsi-touch-a-v2", + &ws_panel_5_inch_b_desc }, + { .compatible = "waveshare,5.0-dsi-touch-b", &ws_panel_5_inch_b_desc }, { .compatible = "waveshare,4.3-dsi-touch-a", &ws_panel_4_3_inch_a_desc }, { .compatible = "waveshare,4.0-dsi-touch-a", &ws_panel_4_inch_a_desc }, { .compatible = "waveshare,4.0-dsi-touch-c", &ws_panel_4_inch_c_desc }, From 05477c2bedb4bf0af745f8412ba73a39ced049e2 Mon Sep 17 00:00:00 2001 From: Yu Dukai <646689853@qq.com> Date: Fri, 23 Oct 2026 21:00:35 +0800 Subject: [PATCH 4/4] ARM: dts: overlays: waveshare-panel-v2: Add 5-DSI-TOUCH-A-V2 and B Add overlay options for the Waveshare 5.0-DSI-TOUCH-A-V2 and 5.0-DSI-TOUCH-B panels. The 5_0_inch_a_v2 and 5_0_inch_b options select the two-lane 720x1280 panel. The two products use the same display panel and differ only in the touch cover glass, so both options point at the same panel description. Signed-off-by: Yu Dukai <646689853@qq.com> --- arch/arm/boot/dts/overlays/README | 2 ++ .../dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index ffa95efe74d62..9f7578b8a9e83 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -6290,6 +6290,8 @@ Params: 3_4_inch_c 3.4" 800x800 2lane 4_0_inch_c 4.0" 720x720 2lane 4_3_inch_a 4.3" 480x800 2lane 5_0_inch_a 5.0" 720x1280 2lane + 5_0_inch_a_v2 5.0" A V2 720x1280 2lane + 5_0_inch_b 5.0" B 720x1280 2lane 5_5_inch_a 5.5" 720x1280 2lane 6_25_inch_a 6.25" 720x1560 2lane 7_0_inch_a 7.0" A 720x1280 2lane diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts index 7f3efd5d81b0a..5fcddb4da4a26 100644 --- a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts +++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts @@ -83,6 +83,8 @@ 4_0_inch_c = <&dsi_panel>, "compatible=waveshare,4.0-dsi-touch-c"; 4_3_inch_a = <&dsi_panel>, "compatible=waveshare,4.3-dsi-touch-a"; 5_0_inch_a = <&dsi_panel>, "compatible=waveshare,5.0-dsi-touch-a"; + 5_0_inch_a_v2 = <&dsi_panel>, "compatible=waveshare,5.0-dsi-touch-a-v2"; + 5_0_inch_b = <&dsi_panel>, "compatible=waveshare,5.0-dsi-touch-b"; 5_5_inch_a = <&dsi_panel>, "compatible=waveshare,5.5-dsi-touch-a"; 6_25_inch_a = <&dsi_panel>, "compatible=waveshare,6.25-dsi-touch-a", <&touch>, "compatible=sitronix,st7123",