[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170511235625.22427-5-eric@anholt.net>
Date: Thu, 11 May 2017 16:56:25 -0700
From: Eric Anholt <eric@...olt.net>
To: dri-devel@...ts.freedesktop.org,
Thierry Reding <thierry.reding@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Archit Taneja <architt@...eaurora.org>,
Andrzej Hajda <a.hajda@...sung.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
devicetree@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Eric Anholt <eric@...olt.net>
Subject: [PATCH 4/4] drm/panel: Add the Raspberry Pi 7" touchscreen's panel.
The timings are those that the firmware defines as the baseline, which
will be modified by the bridge/host as necessary to get the clocking
to work.
Signed-off-by: Eric Anholt <eric@...olt.net>
---
drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index c4566ce8fda7..5bd026cf432b 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1530,6 +1530,33 @@ static const struct panel_desc qd43003c0_40 = {
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
};
+static const struct drm_display_mode raspberrypi_7inch_mode = {
+ /* Modeline comes from the Raspberry Pi firmware, with HFP=1
+ * plugged in and clock re-computed from that.
+ */
+ .clock = 25979400 / 1000,
+ .hdisplay = 800,
+ .hsync_start = 800 + 1,
+ .hsync_end = 800 + 1 + 2,
+ .htotal = 800 + 1 + 2 + 46,
+ .vdisplay = 480,
+ .vsync_start = 480 + 7,
+ .vsync_end = 480 + 7 + 2,
+ .vtotal = 480 + 7 + 2 + 21,
+ .vrefresh = 60,
+};
+
+static const struct panel_desc raspberrypi_7inch = {
+ .modes = &raspberrypi_7inch_mode,
+ .num_modes = 1,
+ .bpc = 8,
+ .size = {
+ .width = 154,
+ .height = 86,
+ },
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+};
+
static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
.clock = 271560,
.hdisplay = 2560,
@@ -1996,6 +2023,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "qiaodian,qd43003c0-40",
.data = &qd43003c0_40,
}, {
+ .compatible = "raspberrypi,7inch-touchscreen-panel",
+ .data = &raspberrypi_7inch,
+ }, {
.compatible = "samsung,lsn122dl01-c01",
.data = &samsung_lsn122dl01_c01,
}, {
--
2.11.0
Powered by blists - more mailing lists