From patchwork Sat Dec 16 13:13:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 10116951 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 3FFEC6019C for ; Sat, 16 Dec 2017 13:13:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 265FC29CB1 for ; Sat, 16 Dec 2017 13:13:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A28A29CCD; Sat, 16 Dec 2017 13:13:46 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 2AE0529CB1 for ; Sat, 16 Dec 2017 13:13:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE0B26E04A; Sat, 16 Dec 2017 13:13:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4981E6E04A for ; Sat, 16 Dec 2017 13:13:40 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id t8so21935245wmc.3 for ; Sat, 16 Dec 2017 05:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=EwcVND9m56gJM1TzcdUoCmmjjQT8Eo/GBtCZf/8JBvE=; b=dDayv/O+pqdGHL0lym+IxjTWWdV2KeqL49paJwiLRS3Xv10aa3or1TWbjH7RS7CdGE 6oDuQFm1xtlgGdL1DNm7kcWgmg3m2Nc8ZGKz7aWhLrmjj+1fJ+Hrxl6A6qeKbEJVDEyS X04ReIEOAhkmEYmggUbNHYjT/B9hEWjXojCVo4RxvmcF8Gc5dT7wQeEpdbqhAm4cELB0 y+fiH9DVvhW0oT0AHdeQZf2rVuDZhSTOzTK0aZP40WZSXmTwSMSkYn5Mkh1mlva9NgKE cXWmsEP0EBC8mqJdh4EQnR2zTgme2Yyc8FbaTPT+AUsPHXkAAH47wleKthl5tefO4OY3 THAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc:date :in-reply-to:references:mime-version:content-transfer-encoding; bh=EwcVND9m56gJM1TzcdUoCmmjjQT8Eo/GBtCZf/8JBvE=; b=NtHegJeMtr+e3QUKf7KhNd2cko3iHPnZm6eLOfjE7fIUwYTge+ArXXRXL39GOY0CIt zTnsE4vzDiSargOXbySkJ6ib1XGymaA1DDtD+h3fX8CDrE87rSraA4IDGHd3ARy537Sg JfWG9Is8HxTsfAOA0FdQbrxhVTq5t5pL1Gz3iYGgtKOWQolL+TvmLt917cx4hinqZH/+ xxvbkZTR596I04Rf/iKGPxHH8sWveWTXgF7yuLQ4e0QTiFX/PeIDAPC7FJc/8EcT7dcB q06ks5U/sdEqNezZo177UGqcJQEPXOcGWduaEJf6BFqqlQL9FBfusDS4nLicXbdx0Gml 5R/Q== X-Gm-Message-State: AKGB3mLXLmovXmJMA6+tmp/bSgl74VRUi+kPv33FHiMMVlWCP7U1Lnn8 F9u6uJpvbd/OF4bGK82iiBs= X-Google-Smtp-Source: ACJfBovQhQoEV8cGVQMExuTkvfmnb3vM09RiMG4fJz7HbkZU7216DlowWE4AJTLOszSQNTztzKs1Ig== X-Received: by 10.80.148.199 with SMTP id t7mr21476575eda.124.1513430018363; Sat, 16 Dec 2017 05:13:38 -0800 (PST) Received: from mars.fritz.box (HSI-KBW-109-193-021-110.hsi7.kabel-badenwuerttemberg.de. [109.193.21.110]) by smtp.gmail.com with ESMTPSA id d9sm8251758edb.18.2017.12.16.05.13.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Dec 2017 05:13:37 -0800 (PST) Message-ID: <1513430016.1930.4.camel@googlemail.com> Subject: [PATCH v2] drm/panel: Add support for AUO G104SN02 V2 panel From: Christoph Fritz To: Rob Herring , Thierry Reding , David Airlie , Mark Rutland Date: Sat, 16 Dec 2017 14:13:36 +0100 In-Reply-To: <20171215230754.cnepbs34t5gp2rsf@rob-hp-laptop> References: <1513173656.2322.16.camel@googlemail.com> <20171215230754.cnepbs34t5gp2rsf@rob-hp-laptop> X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Cc: "devicetree@vger.kernel.org" , dri-devel@lists.freedesktop.org, Stefan =?ISO-8859-1?Q?Riedm=FCller?= 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: , Reply-To: chf.fritz@googlemail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds support for AUO G104SN02 V2 800x600 10.4" panel to DRM simple panel driver. Signed-off-by: Christoph Fritz Signed-off-by: Stefan Riedmueller Reviewed-by: Rob Herring --- Changes since v1: - be explicit as to which properties apply - adapt indenting .../bindings/display/panel/auo,g104sn02.txt | 12 ++++++++++ drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/auo,g104sn02.txt diff --git a/Documentation/devicetree/bindings/display/panel/auo,g104sn02.txt b/Documentation/devicetree/bindings/display/panel/auo,g104sn02.txt new file mode 100644 index 0000000..85626ed --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/auo,g104sn02.txt @@ -0,0 +1,12 @@ +AU Optronics Corporation 10.4" (800x600) color TFT LCD panel + +Required properties: +- compatible: should be "auo,g104sn02" +- power-supply: as specified in the base binding + +Optional properties: +- backlight: as specified in the base binding +- enable-gpios: as specified in the base binding + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index b7c4709..8599905 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -581,6 +581,29 @@ static const struct panel_desc auo_b133htn01 = { }, }; +static const struct drm_display_mode auo_g104sn02_mode = { + .clock = 40000, + .hdisplay = 800, + .hsync_start = 800 + 40, + .hsync_end = 800 + 40 + 216, + .htotal = 800 + 40 + 216 + 128, + .vdisplay = 600, + .vsync_start = 600 + 10, + .vsync_end = 600 + 10 + 35, + .vtotal = 600 + 10 + 35 + 2, + .vrefresh = 60, +}; + +static const struct panel_desc auo_g104sn02 = { + .modes = &auo_g104sn02_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 211, + .height = 158, + }, +}; + static const struct display_timing auo_g133han01_timings = { .pixelclock = { 134000000, 141200000, 149000000 }, .hactive = { 1920, 1920, 1920 }, @@ -1993,6 +2016,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "auo,b133xtn01", .data = &auo_b133xtn01, }, { + .compatible = "auo,g104sn02", + .data = &auo_g104sn02, + }, { .compatible = "auo,g133han01", .data = &auo_g133han01, }, {