Received: by 10.192.165.156 with SMTP id m28csp491930imm; Thu, 19 Apr 2018 02:34:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx49RJxEiB/8fry/Qlg2JnrhiG+iyguCiZcUVml2Q3ZYNfoPWKU+l+2ESgwzkmI8IU7a8pPw+ X-Received: by 10.98.8.12 with SMTP id c12mr5181104pfd.77.1524130459904; Thu, 19 Apr 2018 02:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524130459; cv=none; d=google.com; s=arc-20160816; b=sjTT2INNZHs+c21Gg3byQiw43zfWhUSCCk3U3tigRi3bAkazoQedRlZtGxokmI96YE VdYZQDl5JbNDEWjzNryYLy9INTtLYiyDevnkrvXMFx1U+e+gxVs7jSXggomQ5T89oQyK 4QUosbL13kP+MVoh3QefIm0zZ7OTCxwb3vs1gvpYfVq3YjS0ykn8DO2XiixJKj+37xQK mACeZxShzOQHpNwfxjdedxj64TgVdQ+wA8MC+wvinIxus/2HIJbPnWQMpImIGO5CiYPO fugBjqwvvrBLNPhEimyysAmXw3Ih+GXzXTjwW+KdLq7gkPqRZ7euPXQGC7KR0AMhXFEZ ZH+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=pfARasQlASA1XCQNS3YKmnyJwe6snEpJqjMai0a4O2s=; b=EThyg3ZrmAduiS/kUo32ZT86+srVd6Nx/z3DxDboQwQJqrS4LN8B68jpzD4+9OJ1Fw mKbDMqPINUUBSbhcy+CbaRSMeAvuXWGIcvnFU4ipWSidSL59VqvmOgtkAaAddMM7k1gS Dv+liiEir1vdjrU/4BPMMq+7pK1o/XMOMEvgSscaAtzq5axAqT0M7oR7d54oGW4A/O6N J4X+/1J3SdSMXsAL3bv6ehJNbOati6hmZxv6HcQiOOun3s6XpgLlB+L3TbshNrdmZn9o NZG0r2WYv8RKgMSq3kXF0WIfng8IhiErEjB0CWPCE8s9lA2JQRq/cKdfboeAMR9hIqPp 5yVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si2558978pgq.675.2018.04.19.02.34.05; Thu, 19 Apr 2018 02:34:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbeDSJch (ORCPT + 99 others); Thu, 19 Apr 2018 05:32:37 -0400 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:35720 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776AbeDSJce (ORCPT ); Thu, 19 Apr 2018 05:32:34 -0400 Received: by wens.csie.org (Postfix, from userid 1000) id 9E9235FD40; Thu, 19 Apr 2018 17:32:29 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , David Airlie , Thierry Reding , Rob Herring , Mark Rutland Cc: Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Liu Subject: [PATCH 4/6] drm/panel: simple: Add support for Banana Pi 7" S070WV20-CT16 panel Date: Thu, 19 Apr 2018 17:32:23 +0800 Message-Id: <20180419093225.614-5-wens@csie.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419093225.614-1-wens@csie.org> References: <20180419093225.614-1-wens@csie.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This panel is marketed as Banana Pi 7" LCD display. On the back is a sticker denoting the model name S070WV20-CT16. This is a 7" 800x480 panel connected through a 24-bit RGB interface. However the panel only does 262k colors. Signed-off-by: Chen-Yu Tsai --- .../display/panel/bananapi,s070wv20-ct16.txt | 7 ++++++ drivers/gpu/drm/panel/panel-simple.c | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt diff --git a/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt new file mode 100644 index 000000000000..2ec35ce36e9a --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt @@ -0,0 +1,7 @@ +Banana Pi 7" (S070WV20-CT16) TFT LCD Panel + +Required properties: +- compatible: should be "bananapi,s070wv20-ct16" + +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 cbf1ab404ee7..9bc037f74d6c 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -745,6 +745,28 @@ static const struct panel_desc avic_tm070ddh03 = { }, }; +static const struct drm_display_mode bananapi_s070wv20_ct16_mode = { + .clock = 30000, + .hdisplay = 800, + .hsync_start = 800 + 40, + .hsync_end = 800 + 40 + 48, + .htotal = 800 + 40 + 48 + 40, + .vdisplay = 480, + .vsync_start = 480 + 13, + .vsync_end = 480 + 13 + 3, + .vtotal = 480 + 13 + 3 + 29, +}; + +static const struct panel_desc bananapi_s070wv20_ct16 = { + .modes = &bananapi_s070wv20_ct16_mode, + .num_modes = 1, + .bpc = 6, + .size = { + .width = 154, + .height = 86, + }, +}; + static const struct drm_display_mode boe_nv101wxmn51_modes[] = { { .clock = 71900, @@ -2112,6 +2134,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "avic,tm070ddh03", .data = &avic_tm070ddh03, + }, { + .compatible = "bananapi,s070wv20-ct16", + .data = &bananapi_s070wv20_ct16, }, { .compatible = "boe,nv101wxmn51", .data = &boe_nv101wxmn51, -- 2.17.0