aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch
blob: 4bda41a791dbe959aac0a86b907e1968246018f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 50da59d237df59b38c5e3c375b3df8fabbda1069 Mon Sep 17 00:00:00 2001
From: Eng33 <eng33@waveshare.net>
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 <eng33@waveshare.net>
---
 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 */
 	}
 };