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: 9306573 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 A235960756 for ; Wed, 31 Aug 2016 08:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95FD828E57 for ; Wed, 31 Aug 2016 08:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89E0A28E5A; Wed, 31 Aug 2016 08:18:53 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A79228E57 for ; Wed, 31 Aug 2016 08:18:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933371AbcHaISw (ORCPT ); Wed, 31 Aug 2016 04:18:52 -0400 Received: from down.free-electrons.com ([37.187.137.238]:53926 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932914AbcHaISs (ORCPT ); Wed, 31 Aug 2016 04:18:48 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Mylene Josserand , Thomas Petazzoni , Alexander Kaplan 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> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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, }, {