From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932534AbdEKX4f (ORCPT ); Thu, 11 May 2017 19:56:35 -0400 Received: from anholt.net ([50.246.234.109]:58286 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932299AbdEKX4c (ORCPT ); Thu, 11 May 2017 19:56:32 -0400 From: Eric Anholt To: dri-devel@lists.freedesktop.org, Thierry Reding , Rob Herring , Mark Rutland , Archit Taneja , Andrzej Hajda , Laurent Pinchart , devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eric Anholt Subject: [PATCH 4/4] drm/panel: Add the Raspberry Pi 7" touchscreen's panel. Date: Thu, 11 May 2017 16:56:25 -0700 Message-Id: <20170511235625.22427-5-eric@anholt.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170511235625.22427-1-eric@anholt.net> References: <20170511235625.22427-1-eric@anholt.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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