Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp145590yba; Mon, 1 Apr 2019 03:37:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxou+80o9HyPrbVtY+NpoeCoXRxXuXGnN81Oz0D8/K20+JcTGjVEByUzHD17edfTHAmycAl X-Received: by 2002:a17:902:e302:: with SMTP id cg2mr16911256plb.285.1554115077677; Mon, 01 Apr 2019 03:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554115077; cv=none; d=google.com; s=arc-20160816; b=tSDux7ARbgCsRzdayL1rFaP+0IKiyAKl4PBG7rEAB6esWbGZyYhND/6GHvus1fLtbA l5p4QJ0pQYfY8zR1zvRDFceAKMD4XC5YQmRFyc8QXzHWJy8wECXbTR35QThaqp7VBlew tEjcddtvkc5fPBb5FDqxAtXUbmFqZkD8aN7b859KGffX1Vj5dduNni/9PJik34LUGeIs ft9KtnpQYpW19vEgiA8K68zOI+mABvEk51EhNiE7fE3XSheYoqZKPl0ly73TXJzQHYqG m1f7+vNsJ2XDTbSnLM2bIdWYQPYLiRsDaCtd9nf2qjBncB6GRWohIULXuX7cYzrc54o9 nxgw== 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=Z2GKFotyXVToJXYWQ3VvbeE/1i26Kyl+/C8LE1/JpFA=; b=UKHqbI/lcYC9jEmtl0+OYpbH3wgneVf1QgPNdb1IYb2odk72nlxSDKWy8cH1a+df+w ae1zi3YMCXMt+d3WdPG9NIzUcqN/HTptGAwSWeWWAxWjlAACF1dEEbhc/oMuBRaq4H3D GXMogxssn3qDLEyXss1xpuK+PJtHgZvx/AZcRE3gW15gTB6t5IwASYL5TkI5yBaY5nVm SZ2zytVaJI5yaOAGV0MlSMGQ+WZINIVMcTw1P3qB5gYknrD1CMOsDhIOCj2XOFPMfwXK zQTK36kBBaROhf/FRRtj0OeMvA8tKhu3btcIO2v6V6vbA+ct1Q6GJA81IXe22/EGFrJW xcWQ== 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 j1si8393074pfe.189.2019.04.01.03.37.42; Mon, 01 Apr 2019 03:37:57 -0700 (PDT) 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 S1726827AbfDAKft (ORCPT + 99 others); Mon, 1 Apr 2019 06:35:49 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:35144 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726514AbfDAKfp (ORCPT ); Mon, 1 Apr 2019 06:35:45 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 03E20FB02; Mon, 1 Apr 2019 12:35:44 +0200 (CEST) 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 XvQduJY13mRb; Mon, 1 Apr 2019 12:35:40 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 542CE44B7A; Mon, 1 Apr 2019 12:35:35 +0200 (CEST) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Kevin Hilman , Manivannan Sadhasivam , Shawn Guo , Jagan Teki , Martin Blumenstingl , Johan Hovold , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Nicolas Ferre , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Ravnborg Subject: [PATCH v5 3/3] drm/panel: Add Rocktech jh057n00900 panel driver Date: Mon, 1 Apr 2019 12:35:35 +0200 Message-Id: <1a9ce687be283c66dfb26d1dfb52a7bf695090fa.1554114302.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 --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-rocktech-jh057n00900.c | 386 ++++++++++++++++++ 4 files changed, 406 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c diff --git a/MAINTAINERS b/MAINTAINERS index 8f1f505920df..57968eabe844 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4999,6 +4999,12 @@ S: Orphan / Obsolete F: drivers/gpu/drm/r128/ F: include/uapi/drm/r128_drm.h +DRM DRIVER FOR ROCKTECH JH057N00900 PANELS +M: Guido Günther +S: Maintained +F: drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c +F: Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt + DRM DRIVER FOR SAVAGE VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/savage/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index f53f817356db..645ceb5776a9 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_RONBO_RB070D30 tristate "Ronbo Electronics RB070D30 panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 7834947a53b0..0e739bbc44b8 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_RONBO_RB070D30) += panel-ronbo-rb070d30.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.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