From patchwork Fri Mar 24 00:51:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 9642191 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 E9C63601E9 for ; Fri, 24 Mar 2017 00:51:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA9322823E for ; Fri, 24 Mar 2017 00:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF1E428475; Fri, 24 Mar 2017 00:51:44 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 3B6B82823E for ; Fri, 24 Mar 2017 00:51:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA7F16EB75; Fri, 24 Mar 2017 00:51:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6E876EB75 for ; Fri, 24 Mar 2017 00:51:41 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id o126so32688pfb.1 for ; Thu, 23 Mar 2017 17:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wCqhOQNyfwtRC2xp52K7M6fw0BEzVCKUvs8TGw9nE8M=; b=cqQVG054giawElAB9kT6rNq+hSX+oMQEjn9H+8d22NyPp6ZTS2fETTacVM6nE6wh8N F21uYbBUfEuq5eyHnL2TJFMJSgwttlFUaoUvR9dZTvwaHcwQ1Wnl7GHjR3uBkt9ipYQd 2O57iKmKLD6lEUiDYxNeFyIpoxYrE8gL9hldVADuZRtt9TX8O50Cfwaoo+pIiZIiv+VT q0KQ+ygo6etVqanKwwFI3QhValSvNLVC4TQBpk9Pw2XTbF9BgZC2kR1GznVHxbZVIZ4p ptqADErUNL3DguPpa0qnUp1hf2RyoYGa5TKq8eA+JTFLAOYfVC9YdX6YICm9UM6/OM7Q oTLQ== X-Gm-Message-State: AFeK/H0MskyYJQj79G1TnuHfyDbzsMqICT3PzjJsygIQieuTl7meuPUNDxALzwqWmvjukg== X-Received: by 10.99.110.138 with SMTP id j132mr5659149pgc.217.1490316701486; Thu, 23 Mar 2017 17:51:41 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id i3sm539310pfg.117.2017.03.23.17.51.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Mar 2017 17:51:40 -0700 (PDT) From: Chris Zhong To: linux-rockchip@lists.infradead.org, thierry.reding@gmail.com Subject: [PATCH v4 2/2] drm/panel: add innolux,p079zca panel driver Date: Fri, 24 Mar 2017 08:51:32 +0800 Message-Id: <1490316692-20506-2-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1490316692-20506-1-git-send-email-zyw@rock-chips.com> References: <1490316692-20506-1-git-send-email-zyw@rock-chips.com> Cc: Chris Zhong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Support Innolux P079ZCA 7.85" 768x1024 TFT LCD panel, it is a MIPI DSI panel. Signed-off-by: Chris Zhong Reviewed-by: Sean Paul Tested-by: Brian Norris --- Changes in v4: - remove backlight check after probe - add bpc info Changes in v3: - printk err after regulator_disable(innolux->supply) Changes in v2: - add some error check - always use Low power mode to send commend - add comments for all the sleep - use DRM_DEV_ERROR instead of dev_err drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-innolux-p079zca.c | 340 ++++++++++++++++++++++++++ 3 files changed, 352 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-innolux-p079zca.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 62aba97..99dd010 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -18,6 +18,17 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_INNOLUX_P079ZCA + tristate "Innolux P079ZCA panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Innolux P079ZCA + TFT-LCD modules. The panel has a 1024x768 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host and has a built-in LED backlight. + config DRM_PANEL_JDI_LT070ME05000 tristate "JDI LT070ME05000 WUXGA DSI panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index a5c7ec0..bda2aa4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.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 obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c new file mode 100644 index 0000000..6ba9344 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2017, Fuzhou Rockchip Electronics Co., Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include