From patchwork Thu Jun 2 03:14:32 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: 9149523 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 C206F60221 for ; Thu, 2 Jun 2016 08:24:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD85F25D97 for ; Thu, 2 Jun 2016 08:24:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A24892665D; Thu, 2 Jun 2016 08:24:17 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2FD22654B for ; Thu, 2 Jun 2016 08:24:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1278E6EB2F; Thu, 2 Jun 2016 08:24:02 +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 C5E6A6E2AF for ; Thu, 2 Jun 2016 03:14:58 +0000 (UTC) Received: by mail-pa0-x243.google.com with SMTP id fg1so2013883pad.3 for ; Wed, 01 Jun 2016 20:14:58 -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:mime-version :content-transfer-encoding; bh=Rrjm09SzYRKxwigC9BE3tVIyftTtIcSntSCEFrXIMLE=; b=ONXDIHWMuj/ptYyd93DB7ztcpNUcFMzUYxdS7tpUANQrFBra0/EoaOaQCi7eACuK9V P/GARUpcstQrYtmESiRdasET05UtchtqNZfj+Z10XxhQMwogGGPqo1LNeGlGZQhL1Io7 IONQNUEW9kx1ktMFefzEfiJjADH3TpDOjDPqmcP7iV/YpwGZAAhv47QBqqYUZ0v98as1 6b+HQGWmvKQq++KpNTRekNWt+lri3x5/PBFPLsQYE+XkMd1S5FVFbk8ApCKa8nmGw52j +6x6HfqXfI9YTgPCegMLX5iXRV54gBVYFmB8EHMA6tICDUpCfjz/aq0/DqzgeNKph7Ti pn7g== 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:mime-version :content-transfer-encoding; bh=Rrjm09SzYRKxwigC9BE3tVIyftTtIcSntSCEFrXIMLE=; b=JE/lXegm1LXqmrLcqma1dnIByguB8QmbwRhqCu2iHaNU4SWzRCB8PYK0TE33oPW4Rk FN12eoZioc2QN45F5v7Qa7eTX6cIB7ZRWTHdOjUGX+5sANvlQ2ttMuoV8flZaZhmMOot i6IHwxR/HbGCbkXeBjmUkKPw3bogVbWxXYVh7FFfMG2CKcu/UXB0xhWWDW5/JCtBWQVg 2wX5CLRSLY3WCQ4hY0BWnpnEhfYN9VbBJyEzF/wYGuVi4zQFMKA0KJLhiWcjzK21hBCz IO2o6kSUTkjBptAD6oDNgZl2JAXjfKIwgwHeKjXEAUjXQIXjmsL6H+qPEbuO2Q+nDSLq bPdw== X-Gm-Message-State: ALyK8tLY00muHoMc4DbKn3zjY97qAwzymjPosL5tFi9Ty8JKt80PCgFkdh4PLuzyX20I5w== X-Received: by 10.66.87.198 with SMTP id ba6mr2264949pab.151.1464837297715; Wed, 01 Jun 2016 20:14:57 -0700 (PDT) Received: from localhost.localdomain ([122.172.131.85]) by smtp.gmail.com with ESMTPSA id bh8sm1454954pac.3.2016.06.01.20.14.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 20:14:57 -0700 (PDT) From: Vinay Simha BN To: Subject: [PATCH v3] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel Date: Thu, 2 Jun 2016 08:44:32 +0530 Message-Id: <1464837274-27689-1-git-send-email-simhavcs@gmail.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 02 Jun 2016 08:23:59 +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-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 [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] Cc: Rob Clark Signed-off-by: Vinay Simha BN --- v2: * incorporated code reviews from theiry, archit code style, alphabetical soring in Makefile, Kconfig, regulator_bulk, arrays of u8, generic helper function, documentation bindings, v3: * dcs backlight support added * tested this panel driver in nexus7 2013 device --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 479 +++++++++++++++++++++++++ 3 files changed, 491 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..83e89e7 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..44a1aff2f --- /dev/null +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -0,0 +1,479 @@ +/* + * 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