Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2656127imb; Mon, 4 Mar 2019 10:33:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzoFHyZ5zPc9U3nz4ykCNCGiK/1jdoraFBDn+SC2hvH0EflsXtytID+2IaVZhqtHL4d3Oei X-Received: by 2002:a63:74e:: with SMTP id 75mr19629990pgh.374.1551724412321; Mon, 04 Mar 2019 10:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551724412; cv=none; d=google.com; s=arc-20160816; b=rJn7e5FVce7xPry40k9fdZ29WB/QhhnqC19lM0B3F5sahhA8MYCO9NCe5JNlr+19Yn nvElyZ2iNY2znjbZEfTCRS9dPYF6WazWxafaw4IWEh/5RSiWzjZBvgBgw/qudJtT3y3s cjSc35a+IwJssqvSK7tD66fiUuBlJM8/6QO96Cm9UOuvHNLcYUIHoGd9o5+UKy/Ux26r v3bOtFJ3bwJLzuv5gdJLIw0uHRRSVOf3VOjrB9fzjufIOl/SR7BB1qvehUD1ZsgaUTZU Hs6DNzdsG7i/bX40e/xiyQddRlgUunQES6Y8ydmL5P4k9JXiQgX8WifKCdEu4KKU9/x7 Tb7w== 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=8QC4Jtb66M/s/ni5Kom9eZ3X58Xz7Eq4BYhHK6FzXuk=; b=PWmxR76agpj0BRQPJ+IsPUCawCy3PmDhdwympGRirPwO70UuCIIMl3HeqoT0rlSLPg 41r+EF9Kdj60UIW2E+eEvY2xacHBGthYak5So+vLw8x6ZbQndlN32gOL/qHBo+LqBp6+ vdKbNtxLrY9DekdKS5LCKQ7nDr0At2xEU8VcfTwBjEFRZFlRoviX5AcMErKJIauBYG5a vQ9/qXoG62hKODEgMyjGNwZ2/JRCAHXdQBKnio60fTG1LWrw3NZR6QPSV1Us6O2VYTqp E2CATTU+tjn6clf8DQYrCaX7gSX4fSbNkHGH3L7ZVoGw2US8C3RrdFHn1HSOLYjt5PSz 75IA== 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 a11si5734505pff.126.2019.03.04.10.33.17; Mon, 04 Mar 2019 10:33:32 -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 S1727548AbfCDRxZ (ORCPT + 99 others); Mon, 4 Mar 2019 12:53:25 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:60077 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727529AbfCDRxV (ORCPT ); Mon, 4 Mar 2019 12:53:21 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 487C8FB02; Mon, 4 Mar 2019 18:53:19 +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 gHB8zxda8TQT; Mon, 4 Mar 2019 18:53:15 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id BB5DC414FD; Mon, 4 Mar 2019 18:53:11 +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 v3 3/3] drm/panel: Add Rocktech jh057n00900 panel driver Date: Mon, 4 Mar 2019 18:53:11 +0100 Message-Id: <307863f6ebb3730750010e5a7b7fc7230119b685.1551710977.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 Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-rocktech-jh057n00900.c | 386 ++++++++++++++++++ 3 files changed, 400 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..158a6d548068 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c @@ -0,0 +1,386 @@ +// 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