Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp442589imb; Fri, 1 Mar 2019 05:02:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyIklAcvW96eV8qHA50B5yIVrmlg70vi5S04fYLWu7nBsuS5BNmY2E9OUvFkfA8s+foAUHa X-Received: by 2002:a63:1155:: with SMTP id 21mr4484867pgr.96.1551445376731; Fri, 01 Mar 2019 05:02:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551445376; cv=none; d=google.com; s=arc-20160816; b=xZOuzTGRJ9BIUBGOQ73XuHKYnIfr2zf/N83NEMQ0IumSZyWl3XUa5XTgeB856ljjdq zw403HuncmbGuOXIde9lmfVas7J9nEV0z/hnZ4Gphi1s6gJI2WKmUanOsTv1cLRb15Fy mWxH0TrFNE64ODIEMDQjfVtESrfYcjM91rE5lu/GHeTtd2+mljoRJWI/wtTw2YgnlUFz nJ3eBmAkUwp5j2SELEjHol9zDXMKgMDR3x4BYPXc6exyHIX1ipDiJ0+mKdU3LEoOGOuN cM3+O4RjN2NvFPZY5MyVzI/3pg1L3oW0EcBM+QDF64feL2muzP69fi4Zc+JtMK10uQb4 8WUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=2nG4gYk9pXFrwYLePFNLMSgfwOWmfRmwdCmqyh0NFEk=; b=zyjeAfN1sDrUxc+qS/IENBswjsnEeIRAnK5aBXmy9mV8hZtgMIamiWu4g0xCfqJWcj IRLUEBfZKY79QNzoBjU8weJQSbPcJbmMAebzDj1ErW1MCLp/r7ANHpsq9fJvDbVkenia MxfbBaPMjK1iywP88wcCCD2jvb555x6S6OhNeimvRQUYi9PdLPn/lLRXOxrB1H4BB6n3 pzSWDtpk5ltxJ6j0tQzDrlL1cvM3VgVofeC+69m1qMteEMZA/HBz94r3xY46PoUmH0TK xOwM7EY7q5a2dVT1wSewerdFI4Rv3ex/u4rYERP2cO2jpUyPqOQmi44isEn4bqAiHCZZ OClQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w62si15894586pgd.330.2019.03.01.05.02.41; Fri, 01 Mar 2019 05:02:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733232AbfCANCR (ORCPT + 99 others); Fri, 1 Mar 2019 08:02:17 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:55745 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732687AbfCANCO (ORCPT ); Fri, 1 Mar 2019 08:02:14 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 9F3A9FB03; Fri, 1 Mar 2019 14:02:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GK_4n5q-2jbD; Fri, 1 Mar 2019 14:02:08 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 3C47A41520; Fri, 1 Mar 2019 14:02:04 +0100 (CET) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Thierry Reding , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sam Ravnborg Subject: [PATCH v2 3/3] drm/panel: Add Rocktech jh057n00900 panel driver Date: Fri, 1 Mar 2019 14:02:04 +0100 Message-Id: <21f8e44a5f65c97ef77d159c6be6603dba29232b.1551445106.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Support Rocktech jh057n00900 5.5" 720x1440 TFT LCD panel. It is a MIPI DSI video mode panel. The panel seems to use a Sitronix ST7703 look alike (most of the commands look similar to the ST7703's data sheet but use a different number of parameters). The initial version of the DSI init sequence (including sleeps) were provided by the vendor. Sleeps were reduced considerably though to speed up initialization. Signed-off-by: Guido Günther Cc: guido.gunther@puri.sm --- drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-rocktech-jh057n00900.c | 385 ++++++++++++++++++ 3 files changed, 399 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 3e070153ef21..42f541fe57ae 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -149,6 +149,19 @@ config DRM_PANEL_RAYDIUM_RM68200 Say Y here if you want to enable support for Raydium RM68200 720x1280 DSI video mode panel. +config DRM_PANEL_ROCKTECH_JH057N00900 + tristate "Rocktech JH057N00900 MIPI touchscreen 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 Rocktech JH057N00900 + MIPI DSI panel as e.g. used in the Librem 5 devkit. It has a + resolution of 720x1440 pixels, a built in backlight and touch + controller. + Touch input support is provided by the goodix driver and needs to be + selected separately. + config DRM_PANEL_SAMSUNG_S6D16D0 tristate "Samsung S6D16D0 DSI video mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index e7ab71968bbf..902e871059d0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o +obj-$(CONFIG_DRM_PANEL_ROCKTECH_JH057N00900) += panel-rocktech-jh057n00900.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c new file mode 100644 index 000000000000..7df72040a90d --- /dev/null +++ b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c @@ -0,0 +1,385 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Rockteck jh057n00900 5.5" MIPI-DSI panel driver + * + * Copyright (C) Purism SPC 2019 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include