From 50da59d237df59b38c5e3c375b3df8fabbda1069 Mon Sep 17 00:00:00 2001 From: Eng33 Date: Fri, 8 Mar 2024 18:36:37 +0800 Subject: [PATCH 1286/1295] Driver:add waveshare 4inch dsi lcd (C) driver Signed-off-by: Eng33 --- drivers/gpu/drm/panel/panel-waveshare-dsi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- a/drivers/gpu/drm/panel/panel-waveshare-dsi.c +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi.c @@ -138,6 +138,18 @@ static const struct drm_display_mode ws_ .vtotal = 1480 + 60 + 60 + 60, }; +static const struct drm_display_mode ws_panel_4_mode = { + .clock = 50000, + .hdisplay = 720, + .hsync_start = 720 + 32, + .hsync_end = 720 + 32 + 200, + .htotal = 720 + 32 + 200 + 120, + .vdisplay = 720, + .vsync_start = 720 + 8, + .vsync_end = 720 + 8 + 4, + .vtotal = 720 + 8 + 4 + 16, +}; + static struct ws_panel *panel_to_ts(struct drm_panel *panel) { return container_of(panel, struct ws_panel, base); @@ -399,6 +411,9 @@ static const struct of_device_id ws_pane .compatible = "waveshare,11.9inch-panel", .data = &ws_panel_11_9_mode, }, { + .compatible = "waveshare,4inch-panel", + .data = &ws_panel_4_mode, + }, { /* sentinel */ } };