d5cee828b0763070d282ef7904918d26d57c6522
[openwrt/staging/svanheule.git] /
1 From 8a5c68347952e6ae70d58a0ead55aa28c77ab9ca Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 26 Mar 2021 17:06:36 +0000
4 Subject: [PATCH 0301/1085] drm/panel-simple: Add a timing for the Raspberry Pi
5 7" panel
6
7 The Raspberry Pi 7" 800x480 panel uses a Toshiba TC358762 DSI
8 to DPI bridge chip, so there is a requirement for the timings
9 to be specified for the end panel. Add such a definition.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
14 1 file changed, 28 insertions(+)
15
16 --- a/drivers/gpu/drm/panel/panel-simple.c
17 +++ b/drivers/gpu/drm/panel/panel-simple.c
18 @@ -3376,6 +3376,31 @@ static const struct panel_desc rocktech_
19 .connector_type = DRM_MODE_CONNECTOR_DPI,
20 };
21
22 +static const struct drm_display_mode raspberrypi_7inch_mode = {
23 + .clock = 25979400 / 1000,
24 + .hdisplay = 800,
25 + .hsync_start = 800 + 2,
26 + .hsync_end = 800 + 2 + 2,
27 + .htotal = 800 + 2 + 2 + 46,
28 + .vdisplay = 480,
29 + .vsync_start = 480 + 7,
30 + .vsync_end = 480 + 7 + 2,
31 + .vtotal = 480 + 7 + 2 + 21,
32 + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
33 +};
34 +
35 +static const struct panel_desc raspberrypi_7inch = {
36 + .modes = &raspberrypi_7inch_mode,
37 + .num_modes = 1,
38 + .bpc = 8,
39 + .size = {
40 + .width = 154,
41 + .height = 86,
42 + },
43 + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
44 + .connector_type = DRM_MODE_CONNECTOR_DSI,
45 +};
46 +
47 static const struct display_timing rocktech_rk070er9427_timing = {
48 .pixelclock = { 26400000, 33300000, 46800000 },
49 .hactive = { 800, 800, 800 },
50 @@ -4427,6 +4452,9 @@ static const struct of_device_id platfor
51 .compatible = "rocktech,rk043fn48h",
52 .data = &rocktech_rk043fn48h,
53 }, {
54 + .compatible = "raspberrypi,7inch-dsi",
55 + .data = &raspberrypi_7inch,
56 + }, {
57 .compatible = "rocktech,rk070er9427",
58 .data = &rocktech_rk070er9427,
59 }, {