bcm27xx: update 6.1 patches from RPi foundation
[openwrt/staging/xback.git] / target / linux / bcm27xx / patches-6.1 / 950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch
1 From 50da59d237df59b38c5e3c375b3df8fabbda1069 Mon Sep 17 00:00:00 2001
2 From: Eng33 <eng33@waveshare.net>
3 Date: Fri, 8 Mar 2024 18:36:37 +0800
4 Subject: [PATCH 1286/1295] Driver:add waveshare 4inch dsi lcd (C) driver
5
6 Signed-off-by: Eng33 <eng33@waveshare.net>
7 ---
8 drivers/gpu/drm/panel/panel-waveshare-dsi.c | 15 +++++++++++++++
9 1 file changed, 15 insertions(+)
10
11 --- a/drivers/gpu/drm/panel/panel-waveshare-dsi.c
12 +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi.c
13 @@ -138,6 +138,18 @@ static const struct drm_display_mode ws_
14 .vtotal = 1480 + 60 + 60 + 60,
15 };
16
17 +static const struct drm_display_mode ws_panel_4_mode = {
18 + .clock = 50000,
19 + .hdisplay = 720,
20 + .hsync_start = 720 + 32,
21 + .hsync_end = 720 + 32 + 200,
22 + .htotal = 720 + 32 + 200 + 120,
23 + .vdisplay = 720,
24 + .vsync_start = 720 + 8,
25 + .vsync_end = 720 + 8 + 4,
26 + .vtotal = 720 + 8 + 4 + 16,
27 +};
28 +
29 static struct ws_panel *panel_to_ts(struct drm_panel *panel)
30 {
31 return container_of(panel, struct ws_panel, base);
32 @@ -399,6 +411,9 @@ static const struct of_device_id ws_pane
33 .compatible = "waveshare,11.9inch-panel",
34 .data = &ws_panel_11_9_mode,
35 }, {
36 + .compatible = "waveshare,4inch-panel",
37 + .data = &ws_panel_4_mode,
38 + }, {
39 /* sentinel */
40 }
41 };