From patchwork Thu Apr 14 10:47:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinay Simha B N X-Patchwork-Id: 8838691 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7BFEEC0553 for ; Thu, 14 Apr 2016 15:22:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F48A202F0 for ; Thu, 14 Apr 2016 15:22:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 47307202EB for ; Thu, 14 Apr 2016 15:22:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBA2B6E1EB; Thu, 14 Apr 2016 15:22:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x243.google.com (mail-pa0-x243.google.com [IPv6:2607:f8b0:400e:c03::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26C4A6E131 for ; Thu, 14 Apr 2016 10:48:35 +0000 (UTC) Received: by mail-pa0-x243.google.com with SMTP id zy2so6592422pac.2 for ; Thu, 14 Apr 2016 03:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rbLwVOkUIneOdPb3I5Wv10DPP3ggzaDDCibQdpRw3mw=; b=H+nvaJo1+qrQLpmEqABqnrdqJTs/HiERxUzDhVNEE9fwB6SgoTiYeFcseo1rZypitL 7QO5yrfCXlQBJzI5IyyoQ0eEZ3x1c4jna3D9xZIEbTSZEsOQ05qmybY1Jy8KlEAuMUQE WCBTjVbRPa6fvT8SpI9tugKCqO414OPBtx1WKQLP675qUzJ3xY64zUD0/sIb51i3F+Wf qyQ6fm6wl7wUbN+h+xiRwPlftqcNdwkl+mkYsBtnRYPnUEelJ0V6tNGH1SovXVtpg349 Bu5n4C1G41WmQHDMyQKHuQ79wlCw48cZE4risdORVkXCDQtG/F6cj9eycz9MY2wMOFTZ mHDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rbLwVOkUIneOdPb3I5Wv10DPP3ggzaDDCibQdpRw3mw=; b=fovbEkF4WKrDTKExFPJzIWYceBnNTsB8aIzI9mv9tOI5M5PSp4yfaAG9cO0OkfKMNg j/17LOP8+CRzQuZI/1b4W5OHcSPPuvY7SU8QQIIun/v+g/nF/EOU2PV774UQuCkVZrMF Pfqr74WzHEVU0vx1tJbdNjBSpyx+nYrXYB2qH4NcsaBMhkGIzQ+HMryUc8ftx4GTs1Y9 vXJ1779q+7DhguPq56tvlREw4BbUU+gl51OPnM90l1vivD4YpNoSePERrY6lh/xmTpqG kvtM5QYZ0W8bTjSHTwaB2FmXku+GIMJL5uSkBd3pRUlfGgKcF8bg+Gg4oRcLJUmbE7GL MdOw== X-Gm-Message-State: AOPr4FWti4bX8IHrLdkB3PxD5kUBz3bmLC/rNxjkBeq6lpoFHZ7THUblIie8LPFC67Ue1A== X-Received: by 10.67.2.41 with SMTP id bl9mr19889427pad.39.1460630914569; Thu, 14 Apr 2016 03:48:34 -0700 (PDT) Received: from localhost.localdomain ([202.83.17.75]) by smtp.gmail.com with ESMTPSA id yj1sm57200679pac.16.2016.04.14.03.48.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Apr 2016 03:48:33 -0700 (PDT) From: Vinay Simha BN To: Subject: [RESEND][PATCH] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel Date: Thu, 14 Apr 2016 16:17:45 +0530 Message-Id: <1460630869-21853-1-git-send-email-simhavcs@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1460528887-22915-1-git-send-email-simhavcs@gmail.com> References: <1460528887-22915-1-git-send-email-simhavcs@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 14 Apr 2016 15:22:37 +0000 Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Pawel Moll , Ian Campbell , "open list:DRM PANEL DRIVERS" , open list , Ralf Baechle , Rob Herring , Jonathan Cameron , Kumar Gala , Vinay Simha BN , Shawn Guo , Archit Taneja 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for the JDI lt070me05000 WUXGA DSI panel used in Nexus 7 2013 devices. Programming sequence for the panel is was originally found in the android-msm-flo-3.4-lollipop-release branch from: https://android.googlesource.com/kernel/msm.git And video mode setting is from dsi-panel-jdi-dualmipi1-video.dtsi file in: git://codeaurora.org/kernel/msm-3.10.git LNX.LA.3.6_rb1.27 Other fixes folded in were provided by Archit Taneja Cc: Archit Taneja Signed-off-by: Vinay Simha BN [sumit.semwal: Ported to the drm/panel framework] Signed-off-by: Sumit Semwal [jstultz: Cherry-picked to mainline, folded down other fixes from Vinay and Archit] Signed-off-by: John Stultz Acked-by: John Stultz [vinay simha bn: added interface setting cmd mode, cmd or video mode panel setting selection in panel_init based on mode_flags] Signed-off-by: Vinay Simha BN --- .../bindings/display/panel/jdi,lt070me05000.txt | 27 + .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 685 +++++++++++++++++++++ 5 files changed, 725 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt create mode 100644 drivers/gpu/drm/panel/panel-jdi-lt070me05000.c diff --git a/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt b/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt new file mode 100644 index 0000000..35c5ac7 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt @@ -0,0 +1,27 @@ +JDI model LT070ME05000 1920x1200 7" DSI Panel + +Basic data sheet is at: + http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet + +This panel has video mode implemented currently in the driver. + +Required properties: +- compatible: should be "jdi,lt070me05000" + +Optional properties: +- power-supply: phandle of the regulator that provides the supply voltage +- reset-gpio: phandle of gpio for reset line +- backlight: phandle of the backlight device attached to the panel + +Example: + + dsi@54300000 { + panel: panel@0 { + compatible = "jdi,lt070me05000"; + reg = <0>; + + power-supply = <...>; + reset-gpio = <...>; + backlight = <...>; + }; + }; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index a580f3e..ec42bb4 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -130,6 +130,7 @@ invensense InvenSense Inc. isee ISEE 2007 S.L. isil Intersil issi Integrated Silicon Solutions Inc. +jdi Japan Display Inc. jedec JEDEC Solid State Technology Association karo Ka-Ro electronics GmbH keymile Keymile GmbH diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 1500ab9..f41690e 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -61,6 +61,17 @@ config DRM_PANEL_SHARP_LQ101R1SX01 To compile this driver as a module, choose M here: the module will be called panel-sharp-lq101r1sx01. +config DRM_PANEL_JDI_LT070ME05000 + tristate "JDI LT070ME05000 WUXGA DSI 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 JDI WUXGA DSI video/ + command mode panel as found in Google Nexus 7 (2013) devices. + The panel has a 1200(RGB)×1920 (WUXGA) resolution and uses + 24 bit RGB per pixel. + config DRM_PANEL_SHARP_LS043T1LE01 tristate "Sharp LS043T1LE01 qHD video mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f277eed..e6c6fc8 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -5,3 +5,4 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o +obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c new file mode 100644 index 0000000..051aa1b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -0,0 +1,685 @@ +/* + * Copyright (C) 2015 InforceComputing + * Author: Vinay Simha BN + * + * Copyright (C) 2015 Linaro Ltd + * Author: Sumit Semwal + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include