From patchwork Wed Feb 21 09:20:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 129004 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp409742ljc; Wed, 21 Feb 2018 01:21:47 -0800 (PST) X-Google-Smtp-Source: AH8x224ErVhYEuX+0smzyoGQRbIncMznkRMlqbYnigpqXer1o+lwU3jq5au0/8VJMPdEkjP5xdfu X-Received: by 2002:a17:902:9683:: with SMTP id n3-v6mr2492898plp.177.1519204906851; Wed, 21 Feb 2018 01:21:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519204906; cv=none; d=google.com; s=arc-20160816; b=V7XClnnGqTr0EG5/sEqpM/yRCARz7h0aFjPIpeH+mspqnTUS6hkCKEqWPDTYZqkR6R AAPnPytT7hdiHwoknG2Te0Vx+bx9XodoOaykImbA2d7knOB5tNt7aLGsIl0ppgavpel2 SejKNQ8JLb9mLBg6PrrtWUzIwgQMhnGNhQXOPEuYYO6ouW6oD+HZ59cg5+ECGV6QsdYQ L5Ca7HtpVF1f2YKPwGNMwqPIEmUjyPb2RxKmLeSxQX62Q70IUGC62FA6X1edwoHfdBHg 8fZ0WwFkar7WAXrjwk+pU4r3j/2YFKEy68jFW5midegze93l++++ekKJG1AM40CUYcOS SSKA== 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:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EoPhjQqebCCWlHNcsL/rp1RLg5FGdmFQZjlTltmOZNM=; b=IIaUHOoXFQSlA5HK9w5F+EYVFTId5OD13e5Npkvwo91VSN2ocvx5iwRX45pAHw3uMU 8UbbzSW6WOcUxXe+A1UxBWE3g9TtUP+iMA1Z14i1wQOX9uT0KmUWUCWNq3jiR1SlFW3B mXXRLkdp1RDsHRVoROb2Z14XW7Vy4mY/YSENr6xIqxMpxvnp5pQYUmjfgKGhuE4sDA9c VCBhkIhACfd1bWWcscNtargS258/GGhJedxoPhur43OphOWfo4tqSicTbTyIGAd4YxWa Uetmw6mVYpstqCwhTbfCSlYk20cBL1thXMYZqWuwiGfI7pf+JoxAyrHcmbCrtJK+0VHn jjHA== 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 1-v6si1316015plo.230.2018.02.21.01.21.46; Wed, 21 Feb 2018 01:21:46 -0800 (PST) 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 S932201AbeBUJVn (ORCPT + 28 others); Wed, 21 Feb 2018 04:21:43 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:54575 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932136AbeBUJVL (ORCPT ); Wed, 21 Feb 2018 04:21:11 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id CE3E7207F4; Wed, 21 Feb 2018 10:21:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 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 5B243207F1; Wed, 21 Feb 2018 10:20:42 +0100 (CET) From: Maxime Ripard To: Mark Brown , Thierry Reding , Chen-Yu Tsai , Maxime Ripard , Mark Rutland , Rob Herring Cc: dri-devel@lists.freedesktop.org, Gustavo Padovan , Daniel Vetter , Maarten Lankhorst , Sean Paul , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Maxime Ripard Subject: [PATCH v2 08/10] drm/panel: Add Huarui LHR050H41 panel driver Date: Wed, 21 Feb 2018 10:20:32 +0100 Message-Id: <33efcb267bc513bb19551f1ffdcf578ebfb90369.1519204731.git-series.maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard The LHR050H41 panel is the panel shipped with the BananaPi M2-Magic. Add a driver for it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/panel/Kconfig | 9 +- drivers/gpu/drm/panel/Makefile | 1 +- drivers/gpu/drm/panel/panel-huarui-lhr050h41.c | 506 ++++++++++++++++++- 3 files changed, 516 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-huarui-lhr050h41.c -- git-series 0.9.1 diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6ba4031f3919..965310fd129a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -28,6 +28,15 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_HUARUI_LHR050H41 + tristate "Huarui LHR050H41 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for the Huarui Lighting + LHR05041 DSI panel. The panel has a 1280x720 resolution. + config DRM_PANEL_ILITEK_IL9322 tristate "Ilitek ILI9322 320x240 QVGA panels" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 6d251ebc568c..0eda133d26bb 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_HUARUI_LHR050H41) += panel-huarui-lhr050h41.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o diff --git a/drivers/gpu/drm/panel/panel-huarui-lhr050h41.c b/drivers/gpu/drm/panel/panel-huarui-lhr050h41.c new file mode 100644 index 000000000000..f73d484a695b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-huarui-lhr050h41.c @@ -0,0 +1,506 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2017, Free Electrons + * Author: Maxime Ripard + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include