1 From 231e27c3d0f8a9dc323391fcbca5b48ca863a727 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] drm/panel-simple: Add a timing for the Raspberry Pi
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.
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
14 1 file changed, 28 insertions(+)
16 --- a/drivers/gpu/drm/panel/panel-simple.c
17 +++ b/drivers/gpu/drm/panel/panel-simple.c
18 @@ -3188,6 +3188,31 @@ static const struct panel_desc qishenglo
19 .connector_type = DRM_MODE_CONNECTOR_DPI,
22 +static const struct drm_display_mode raspberrypi_7inch_mode = {
23 + .clock = 25979400 / 1000,
25 + .hsync_start = 800 + 2,
26 + .hsync_end = 800 + 2 + 2,
27 + .htotal = 800 + 2 + 2 + 46,
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,
35 +static const struct panel_desc raspberrypi_7inch = {
36 + .modes = &raspberrypi_7inch_mode,
43 + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
44 + .connector_type = DRM_MODE_CONNECTOR_DSI,
47 static const struct display_timing rocktech_rk070er9427_timing = {
48 .pixelclock = { 26400000, 33300000, 46800000 },
49 .hactive = { 800, 800, 800 },
50 @@ -4219,6 +4244,9 @@ static const struct of_device_id platfor
51 .compatible = "qishenglong,gopher2b-lcd",
52 .data = &qishenglong_gopher2b_lcd,
54 + .compatible = "raspberrypi,7inch-dsi",
55 + .data = &raspberrypi_7inch,
57 .compatible = "rocktech,rk070er9427",
58 .data = &rocktech_rk070er9427,