From 6a315c0329c3036e491bfde2b7aab2643490eef6 Mon Sep 17 00:00:00 2001 From: Eng33 Date: Fri, 8 Mar 2024 18:36:37 +0800 Subject: [PATCH 0952/1085] 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); @@ -398,6 +410,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 */ } };