From patchwork Tue Mar 6 13:56:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 130807 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3967849lja; Tue, 6 Mar 2018 05:58:06 -0800 (PST) X-Google-Smtp-Source: AG47ELtR5Up8cs1IWcJheXWxQO7mNROP88x8dO2v/McQxRDfgzInLfmY5pjoMp/6fvRNyIBT8oKs X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr16420788pls.267.1520344686554; Tue, 06 Mar 2018 05:58:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520344686; cv=none; d=google.com; s=arc-20160816; b=pNpWEygdhk5cbehau0VFry/TE4wMV5OTIKDIm0cL51AWSRzKrWiNGPlll85Jtg/YGM 7jOACmId606IBxEWk1Df71bWuE6iIK+xGxj3A3yvDXaGFtEurvPZS1BSz1t0++LvWlxB 35h8PsJQgR2fjtvvmkM0moQhxQYo0HYNiu45sM0Ul3ZSzXwS8Udd/pViYw+fJ5eFSFMI 16sneZzyAxApA7JTzm+JllUzCbYpsKcO+/ci/5OHCvM3EaCIZfq84epC9a1iDCG8RTS3 fWBs/QJrj+VRL+HOJ9ui2JRE2TcEl7FBoxQGa0Wb+6wm2HA1SBUSyh1sSPb84SRzApNf YsQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=5OxXJrXHE229WwZ+Zl5jegi2Mc2/qT/5KONG6nN/dOA=; b=k3RN4PC1ydcYVps8RZvPQNA7xn8vBoU7oK1RcwLCdTSL/Re8llAfJzKONImsCZ17kA FJY+Bl7SyjLaCLkjegQTN/GvcUOrUbYa8UZKMbnnMA0I6jOC+NLEOeHwa0OAXdVsEGB9 S5k4Y6Q3Q18dURdKHWbmQvAVIQREFJNP8ad18BueS0l0s9YN8NMnWiVVyQtEsI1a5ZSO 2uDXkMQ2SgNZlbRT6fRASsPjdz1Timyw9VFxJHE1TiAox8Wo5GMs8J7BXnf6jIAcAUtG dL3Ur8RkATGA3Xr9UcUYIQVOISU2KxFIWIy0llNmZq4AoZ5PLK0FAPo3hGJZltiJ2h0I lfUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id w11-v6si8358051plq.369.2018.03.06.05.58.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Mar 2018 05:58:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E755C6E158; Tue, 6 Mar 2018 13:57:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CA806E149 for ; Tue, 6 Mar 2018 13:57:18 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id 6E90C20784; Tue, 6 Mar 2018 14:57:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.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 (unknown [185.94.189.190]) by mail.bootlin.com (Postfix) with ESMTPSA id CA9BE209CA; Tue, 6 Mar 2018 14:56:21 +0100 (CET) From: Maxime Ripard To: Thierry Reding , Chen-Yu Tsai , Maxime Ripard , Mark Rutland , Rob Herring Subject: [PATCH v3 5/7] drm/panel: Add Ilitek ILI9881c panel driver Date: Tue, 6 Mar 2018 14:56:02 +0100 Message-Id: <4ebd47038b1ee1cc6b7d9738313f43f985268463.1520344489.git-series.maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Petazzoni , Daniel Vetter , Maxime Ripard , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Maxime Ripard The LHR050H41 panel is the panel shipped with the BananaPi M2-Magic, and is based on the Ilitek ILI9881c Controller. Add a driver for it, modelled after the other Ilitek controller drivers. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/panel/Kconfig | 9 +- drivers/gpu/drm/panel/Makefile | 1 +- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 506 +++++++++++++++++++- 3 files changed, 516 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6ba4031f3919..bc94b4e4ae48 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -36,6 +36,15 @@ config DRM_PANEL_ILITEK_IL9322 Say Y here if you want to enable support for Ilitek IL9322 QVGA (320x240) RGB, YUV and ITU-T BT.656 panels. +config DRM_PANEL_ILITEK_ILI9881C + tristate "Ilitek ILI9881C-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Ilitek ILI9881c controller. + config DRM_PANEL_INNOLUX_P079ZCA tristate "Innolux P079ZCA panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 6d251ebc568c..3ab387be4dbf 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c new file mode 100644 index 000000000000..8a1b65c05ba1 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.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