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", diff --git a/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c index c6cc003a35337..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), @@ -2080,11 +2088,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, @@ -2153,8 +2161,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, @@ -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 },