From patchwork Wed Aug 31 08:18:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 9306559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0AFFF60756 for ; Wed, 31 Aug 2016 08:18:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F297D28E57 for ; Wed, 31 Aug 2016 08:18:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6EDF28E5A; Wed, 31 Aug 2016 08:18:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D570628E57 for ; Wed, 31 Aug 2016 08:18:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E99E6E1DD; Wed, 31 Aug 2016 08:18:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by gabe.freedesktop.org (Postfix) with ESMTP id 134426E2C0 for ; Wed, 31 Aug 2016 08:18:21 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id ACCD8173E; Wed, 31 Aug 2016 10:18:19 +0200 (CEST) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 7EE0B141; Wed, 31 Aug 2016 10:18:19 +0200 (CEST) From: Maxime Ripard To: Linus Walleij , Chen-Yu Tsai , Maxime Ripard , Jingoo Han , Lee Jones , Tomi Valkeinen , Daniel Vetter , David Airlie , Thierry Reding Subject: [PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support Date: Wed, 31 Aug 2016 10:18:14 +0200 Message-Id: <20160831081817.5191-4-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160831081817.5191-1-maxime.ripard@free-electrons.com> References: <20160831081817.5191-1-maxime.ripard@free-electrons.com> Cc: Thomas Petazzoni , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-gpio@vger.kernel.org, Alexander Kaplan , Mylene Josserand , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The A10-EVB from Allwinner comes with an unidentified panel, with the only mark on the PCB being A10-SUB-EVB-5LCD. Add timings to simple panel to handle it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 85143d1b9b31..be371b053aab 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -386,6 +386,29 @@ static void panel_simple_shutdown(struct device *dev) panel_simple_disable(&panel->base); } +static const struct drm_display_mode allwinner_a10_sub_evb_5lcd_mode = { + .clock = 33000, + .hdisplay = 800, + .hsync_start = 800 + 209, + .hsync_end = 800 + 209 + 1, + .htotal = 800 + 209 + 1 + 45, + .vdisplay = 480, + .vsync_start = 480 + 22, + .vsync_end = 480 + 22 + 1, + .vtotal = 480 + 22 + 1 + 22, + .vrefresh = 60, +}; + +static const struct panel_desc allwinner_a10_sub_evb_5lcd = { + .modes = &allwinner_a10_sub_evb_5lcd_mode, + .num_modes = 1, + .size = { + .width = 110, + .height = 67, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, +}; + static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = { .clock = 33333, .hdisplay = 800, @@ -1515,6 +1538,9 @@ static const struct panel_desc urt_umsh_8596md_parallel = { static const struct of_device_id platform_of_match[] = { { + .compatible = "allwinner,sun4i-a10-sub-evb-5-lcd", + .data = &allwinner_a10_sub_evb_5lcd, + }, { .compatible = "ampire,am800480r3tmqwa1h", .data = &ire_am800480r3tmqwa1h, }, {