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: 9642195 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 4781260328 for ; Fri, 24 Mar 2017 00:52:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37A2427FB0 for ; Fri, 24 Mar 2017 00:52:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C00E28446; Fri, 24 Mar 2017 00:52:08 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1499227FB0 for ; Fri, 24 Mar 2017 00:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/er71rDjM58egah9TxOHfDWBqj2G8LkbnV8vTbhLEW8=; b=Li74JQmb9mhCTCfoku8r94Kyv9 uaQuGLKTgU1HSAPnCBNYqxYxa3MSoTX+rkbaWSr8IEBOF0cx8fY6ueTQC+58aM+BmpBB+CCasR+nw suS/LEc1hB6Pv/sceZmJbREs+fPVuMJ/+G6/5s/13e4HRQPqT6VT7LetdVyicf00Smqva0JgKI7MO uQ8WC5b3uOcYi7293KI5Ha8cQNbRx/wwSv1yABGnCXMuE1T1NjSfaG9+2xQstBOhjNpkznf5N/o0y E9vMHa1q5xX0jPhaZrLfwFsUAUzC3K3ar/JkI215pBWkeAOHCxv3k21IEr4pL8bTyYgSMBbajm01T BVP/sFcw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1crDSX-0002ZK-PV; Fri, 24 Mar 2017 00:52:05 +0000 Received: from mail-pf0-f193.google.com ([209.85.192.193]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crDSU-0002XB-IE for linux-rockchip@lists.infradead.org; Fri, 24 Mar 2017 00:52:04 +0000 Received: by mail-pf0-f193.google.com with SMTP id r137so23905pfr.3 for ; Thu, 23 Mar 2017 17:51:42 -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=N3o8u1EMT9XjYv4PJCicafomH9ZlBbbQOv7fkSqmlgtW/W16jh1WFjjsznmfVWKkB4 ZW4nChiOeNqkeXrGLv7Y2ZjznhXmlMYPG3UYi+5wr/6hhdXOLbL7mOAzrH4yZ7SSV4hQ pZ7kgdNdC+BWmQ9H8PmH3IrYgHFhtcljJV8fCXDu3kF3QmvfznAxZM/+jNbfFlJZAdlT dtb+jVghmKxo5oePvUek3eoBX9qLOeLI0tqU4ogcsmsB82b8iTgjOl9jnvDWVxXVJMEo FVEO51imachFkEx+9ZW0RY/KwR2eAdWv/i+gPMVBhnfYMJ340J0hvRCSFs0Q5N08kara cuCA== X-Gm-Message-State: AFeK/H30WqDkaw9iNUuIIOOJujWWbSUIDgOwKaL4sBd/04HdXQ/2G9RpupDBjmTe2kYLcw== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170323_175202_660258_178397AC X-CRM114-Status: GOOD ( 19.82 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Zhong , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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