From patchwork Wed Apr 20 09:32:33 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: 8888111 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 28AB7BF29F for ; Wed, 20 Apr 2016 10:46:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8903D2008F for ; Wed, 20 Apr 2016 10:46:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E79372024C for ; Wed, 20 Apr 2016 10:46:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 659716E957; Wed, 20 Apr 2016 10:46:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C3FD6E93D for ; Wed, 20 Apr 2016 09:33:29 +0000 (UTC) Received: by mail-pf0-x229.google.com with SMTP id 184so16735186pff.0 for ; Wed, 20 Apr 2016 02:33:29 -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=+FWLgSXcVAPcu4h95u+EZuDd/27uH+tS3pcuiSDFjm0=; b=Unb0TRUKVpkD8v4ThdR+LXBhVlBObr0bhZs1mm9n1JO+uw7pkjvfSN2LqIvDcokFll eSM2lLsersrFHRhjUsDGm6IFdKeMoFJeH1+NGYRCWazupu0QUeujprbghk9Xi32kFUjS UnOkG9A1M2yn+74cAjGYisc3arkhUiRnlwX7Zkq+RANWxPXBN+0x0HzqhBzmx36gj5cq wnpC6e0MEsP8lcbo4bEdi66BzivHs2fogj87LhDL/QE3bl4DFy29IuKVSEV3nwknaQjs In+rXSgT1jdcFLUfLp0gzrGiqykROsUwZuW1Ws2ER1E7SgVK73QFVXMHzHJ0RmE0nmgR LvgQ== 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=+FWLgSXcVAPcu4h95u+EZuDd/27uH+tS3pcuiSDFjm0=; b=eEkjwHE6r1NvLMm1jKfLR1quyd8/sMvc9030wdwP/Z2Dq4wowSof/ko1DCqP/g098Y C1rlGRfVJFSJ7dM0lLa0Xd7lY1hxUvcTlifp4ByJtaq2bOURXAc4JpZweJYQE8daD2/y eLyo2K44QKO+cficcazWhugivtCrRrF59q+xV+xG3gyq9keZULyDaT5pXbDKx3rHtPD0 rkCmRFeAM4lIgre9d/SXXBCljpG+wTHSQkEaShfCmRPX/zATTnFgTdsPdP7VsTAjiTJe NFmR+pOCSXyTMobUx6Z8Z5HKy2qD5HeDXDiKyhCmWwcNnnWXSxa27EadcaoJ8JeZNo/8 tJRQ== X-Gm-Message-State: AOPr4FVSCl25VoenhbVK0dsbWF4Mr7ZAKHDWfTrrjBmnJisuWWFwi6x21R5pSiht+Yr1wA== X-Received: by 10.98.71.203 with SMTP id p72mr10783541pfi.165.1461144808653; Wed, 20 Apr 2016 02:33:28 -0700 (PDT) Received: from localhost.localdomain ([202.83.17.75]) by smtp.gmail.com with ESMTPSA id 187sm18973348pff.66.2016.04.20.02.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 02:33:27 -0700 (PDT) From: Vinay Simha BN To: Subject: [PATCH v2 4/4] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel Date: Wed, 20 Apr 2016 15:02:33 +0530 Message-Id: <1461144755-10633-4-git-send-email-simhavcs@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1461144755-10633-1-git-send-email-simhavcs@gmail.com> References: <20160414171500.GA11505@rob-hp-laptop> <1461144755-10633-1-git-send-email-simhavcs@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 20 Apr 2016 10:46:20 +0000 Cc: open list , "open list:DRM PANEL DRIVERS" , Vinay Simha BN , 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=ham 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 [vinay simha bn: removed interface setting cmd mode, video mode panel setting selection] Signed-off-by: Vinay Simha BN --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 506 +++++++++++++++++++++++++ 3 files changed, 518 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-jdi-lt070me05000.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 1500ab9..4a6fcc2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -7,6 +7,17 @@ config DRM_PANEL menu "Display Panels" depends on DRM && DRM_PANEL +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 + 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_SIMPLE tristate "support for simple panels" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f277eed..5d74ac2 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.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-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c new file mode 100644 index 0000000..aeeba99 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -0,0 +1,506 @@ +/* + * Copyright (C) 2016 InforceComputing + * Author: Vinay Simha BN + * + * Copyright (C) 2016 Linaro Ltd + * Author: Sumit Semwal + * + * From internet archives, the panel for Nexus 7 2nd Gen, 2013 model is a + * JDI model LT070ME05000, and its data sheet is at: + * http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet + * + * 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