From patchwork Fri Jun 26 00:55:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11626753 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A369F60D for ; Fri, 26 Jun 2020 07:36:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8248020775 for ; Fri, 26 Jun 2020 07:36:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="bSmun+ES" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8248020775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDF006EC44; Fri, 26 Jun 2020 07:36:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id 572586E379 for ; Fri, 26 Jun 2020 00:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593132964; bh=V8lg3QrmlL/+ORB8+T8iagnNb4aO75aHpHs9Ov8wOuQ=; h=From:To:Cc:Subject:Date:References:From; b=bSmun+ESjXhcDEqOkhLNm1NAZ++s5RpXAHg8rTW4A40AhIaqSjzpfzK0URfP7B+RT CMQAQ4rl0aOcy+oOwAcjw0ghRJNBZFPCNfVN6CWU1G9nBWsWQh94u/e07W6zdavgFJ BiElb3ruXWfyLdTrd96NEk+CxebeepNO/oes36TQ= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Subject: [PATCH v5 01/13] dt-bindings: vendor-prefixes: Add Xingbangda Date: Fri, 26 Jun 2020 02:55:49 +0200 Message-Id: <20200626005601.241022-2-megous@megous.com> In-Reply-To: <20200626005601.241022-1-megous@megous.com> References: <20200626005601.241022-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Jun 2020 07:36:14 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Icenowy Zheng Shenzhen Xingbangda Display Technology Co., Ltd is a company which produces LCD modules. It supplies the LCD panels for the PinePhone. Add the vendor prefix of it. Signed-off-by: Icenowy Zheng Signed-off-by: Ondrej Jirman Acked-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 9aeab66be85f..740b116b179f 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1157,6 +1157,8 @@ patternProperties: description: Xiaomi Technology Co., Ltd. "^xillybus,.*": description: Xillybus Ltd. + "^xingbangda,.*": + description: Shenzhen Xingbangda Display Technology Co., Ltd "^xinpeng,.*": description: Shenzhen Xinpeng Technology Co., Ltd "^xlnx,.*": From patchwork Fri Jun 26 00:55:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11626731 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F8F71392 for ; Fri, 26 Jun 2020 07:36:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DED820775 for ; Fri, 26 Jun 2020 07:36:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="TRRw9lBE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DED820775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 924DC6E436; Fri, 26 Jun 2020 07:36:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id 674F06EC2B for ; Fri, 26 Jun 2020 00:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593132964; bh=KRfWCMHYqiubRZHMWvAgA8TVb0j4Ixsfwj+pdX6IJzI=; h=From:To:Cc:Subject:Date:References:From; b=TRRw9lBEckkGVBb6TM7xSIl7LPIHjW7yC6wsQ1l325PT1m8GoC44MLFoJuqsmiSFY VWe0+hhTEd/dtfrYCgukMGx6rDoqJsmUgXL4OtzbbUvYRwjUoxVLtHeYJHY+po9nc0 LtcyMJVfVuO9qCUmXVNsZF4d/ikAesVOZIAmvEL0= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Subject: [PATCH v5 02/13] dt-bindings: panel: Convert rocktech, jh057n00900 to yaml Date: Fri, 26 Jun 2020 02:55:50 +0200 Message-Id: <20200626005601.241022-3-megous@megous.com> In-Reply-To: <20200626005601.241022-1-megous@megous.com> References: <20200626005601.241022-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Jun 2020 07:36:15 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Convert Rocktech MIPI DSI panel driver from txt to yaml bindings. Signed-off-by: Ondrej Jirman --- .../display/panel/rocktech,jh057n00900.txt | 23 ------- .../display/panel/rocktech,jh057n00900.yaml | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt create mode 100644 Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt deleted file mode 100644 index a372c5d84695..000000000000 --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt +++ /dev/null @@ -1,23 +0,0 @@ -Rocktech jh057n00900 5.5" 720x1440 TFT LCD panel - -Required properties: -- compatible: should be "rocktech,jh057n00900" -- reg: DSI virtual channel of the peripheral -- reset-gpios: panel reset gpio -- backlight: phandle of the backlight device attached to the panel -- vcc-supply: phandle of the regulator that provides the vcc supply voltage. -- iovcc-supply: phandle of the regulator that provides the iovcc supply - voltage. - -Example: - - &mipi_dsi { - panel@0 { - compatible = "rocktech,jh057n00900"; - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>; - vcc-supply = <®_2v8_p>; - iovcc-supply = <®_1v8_p>; - }; - }; diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml new file mode 100644 index 000000000000..f97c48550741 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/rocktech,jh057n00900.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel + +maintainers: + - Ondrej Jirman + +description: | + Rocktech JH057N00900 is a 720x1440 TFT LCD panel + connected using a MIPI-DSI video interface. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: rocktech,jh057n00900 + + reg: + maxItems: 1 + description: DSI virtual channel + + vcc-supply: + description: Panel power supply + + vccio-supply: + description: I/O voltage supply + + reset-gpios: + description: GPIO used for the reset pin + maxItems: 1 + + backlight: + description: Backlight used by the panel + $ref: "/schemas/types.yaml#/definitions/phandle" + +required: + - compatible + - reg + - vcc-supply + - vccio-supply + - reset-gpios + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "rocktech,jh057n00900"; + reg = <0>; + vcc-supply = <®_2v8_p>; + iovcc-supply = <®_1v8_p>; + reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + }; + }; +... From patchwork Fri Jun 26 00:55:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11626761 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDB5B60D for ; Fri, 26 Jun 2020 07:37:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C25A20775 for ; Fri, 26 Jun 2020 07:37:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="YWTnNiSb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C25A20775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FF746EC3F; Fri, 26 Jun 2020 07:36:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id C08C76E379 for ; Fri, 26 Jun 2020 00:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593132965; bh=Xs3DGK4g22Xz2ldtB+A5ZCMGYmWkqwG6E538OdVkcGc=; h=From:To:Cc:Subject:Date:References:From; b=YWTnNiSbvFXnMqnLTaqbz42pAY4AZNqWmp+1Mb0kxc3kYgLnDDskDCPYE24jqRMPB cannFblFO36FQe0sovyYEkB/KNKf3zpd8+9gPGGB1Bbe4chnjssNwSfsydQ/BfXByH y9LtueWwsRbjTn3eQE9LK/48vFFy3yQ8mKRxcSO4= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Subject: [PATCH v5 03/13] dt-bindings: panel: Add compatible for Xingbangda XBD599 panel Date: Fri, 26 Jun 2020 02:55:51 +0200 Message-Id: <20200626005601.241022-4-megous@megous.com> In-Reply-To: <20200626005601.241022-1-megous@megous.com> References: <20200626005601.241022-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Jun 2020 07:36:15 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel. It is based on Sitronix ST7703 LCD controller just like rocktech,jh057n00900. It is used in PinePhone. Add a compatible for it. Signed-off-by: Ondrej Jirman --- .../bindings/display/panel/rocktech,jh057n00900.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml index f97c48550741..4d43a1b36d7c 100644 --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml @@ -18,7 +18,11 @@ allOf: properties: compatible: - const: rocktech,jh057n00900 + enum: + # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel + - rocktech,jh057n00900 + # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel + - xingbangda,xbd599 reg: maxItems: 1 From patchwork Fri Jun 26 00:55:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11626735 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 010151392 for ; Fri, 26 Jun 2020 07:36:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3B8720775 for ; Fri, 26 Jun 2020 07:36:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="RNhZs8ba" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3B8720775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A334D6EC32; Fri, 26 Jun 2020 07:36:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CE586E379 for ; Fri, 26 Jun 2020 00:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593132965; bh=bvbs9rMtIYivhcGkU73LYwotOH9K4xuF8jbTeyIjuqs=; h=From:To:Cc:Subject:Date:References:From; b=RNhZs8baQTyq/NXG+wtLXoR0htIqEItVl/jGzYaLwXKQbSglf9xAUeEV/uhaIHAWS GSM169D9kH6ThuwXcY8F4ZYs2WkXY4yuhjHWBWuqiy/C3780RIw4U8FwtYjN0zDYyP 6pU82qUd1ZvgNXakoBmC5b5txtxJfJj/E4gsNJto= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Subject: [PATCH v5 04/13] drm/panel: rocktech-jh057n00900: Rename the driver to st7703 Date: Fri, 26 Jun 2020 02:55:52 +0200 Message-Id: <20200626005601.241022-5-megous@megous.com> In-Reply-To: <20200626005601.241022-1-megous@megous.com> References: <20200626005601.241022-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Jun 2020 07:36:15 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This rename is done so that the driver matches the name of the display controller and in preparation for adding support for more panels to the driver. This is just a basic file rename, with no code changes. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij --- drivers/gpu/drm/panel/Kconfig | 26 +++++++++---------- drivers/gpu/drm/panel/Makefile | 2 +- ...-jh057n00900.c => panel-sitronix-st7703.c} | 0 3 files changed, 14 insertions(+), 14 deletions(-) rename drivers/gpu/drm/panel/{panel-rocktech-jh057n00900.c => panel-sitronix-st7703.c} (100%) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 39055c1f0e2f..de2f2a452be5 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -283,19 +283,6 @@ 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 @@ -395,6 +382,19 @@ config DRM_PANEL_SITRONIX_ST7701 ST7701 controller for 480X864 LCD panels with MIPI/RGB/SPI system interfaces. +config DRM_PANEL_SITRONIX_ST7703 + tristate "Sitronix ST7703 based MIPI touchscreen panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Sitronix ST7703 based + panels, souch as 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_SITRONIX_ST7789V tristate "Sitronix ST7789V panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index de74f282c433..e45ceac6286f 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -27,7 +27,6 @@ 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_RM67191) += panel-raydium-rm67191.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 @@ -41,6 +40,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o +obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c similarity index 100% rename from drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c rename to drivers/gpu/drm/panel/panel-sitronix-st7703.c From patchwork Fri Jun 26 00:55:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11626763 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E464F912 for ; Fri, 26 Jun 2020 07:37:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C30D620775 for ; Fri, 26 Jun 2020 07:37:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="HFGpdmRZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C30D620775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D7226EC40; Fri, 26 Jun 2020 07:36:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18E686E379 for ; Fri, 26 Jun 2020 00:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593132966; bh=9nC15xo+CPESdjpdIyybaGwU2PhmaJZzcbPRCaKJEbk=; h=From:To:Cc:Subject:Date:References:From; b=HFGpdmRZGfZ60iWH0mbulxJo375sOnHF7MNQQGApsL+gBns5QOho0rLbZ4Z77dLjE P2KTEkU2dyN7xu7m+WLER0AlVOnu2HmuYc3JpU+9Mi3/7agcQRPwiYzTHh5z0W7QP7 9Xah0GMizkGELkbUgpQhpV3Azmr94WF5Z59WhCsA= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Subject: [PATCH v5 05/13] drm/panel: st7703: Rename functions from jh057n prefix to st7703 Date: Fri, 26 Jun 2020 02:55:53 +0200 Message-Id: <20200626005601.241022-6-megous@megous.com> In-Reply-To: <20200626005601.241022-1-megous@megous.com> References: <20200626005601.241022-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Jun 2020 07:36:15 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is done so that code that's not specific to a particular jh057n panel is named after the controller. Functions specific to the panel are kept named after the panel. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 90 ++++++++++--------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 38ff742bc120..511af659f273 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Rockteck jh057n00900 5.5" MIPI-DSI panel driver + * Driver for panels based on Sitronix ST7703 controller, souch as: + * + * - Rocktech jh057n00900 5.5" MIPI-DSI panel * * Copyright (C) Purism SPC 2019 */ @@ -21,7 +23,7 @@ #include #include -#define DRV_NAME "panel-rocktech-jh057n00900" +#define DRV_NAME "panel-sitronix-st7703" /* Manufacturer specific Commands send via DSI */ #define ST7703_CMD_ALL_PIXEL_OFF 0x22 @@ -45,7 +47,7 @@ #define ST7703_CMD_SETGIP1 0xE9 #define ST7703_CMD_SETGIP2 0xEA -struct jh057n { +struct st7703 { struct device *dev; struct drm_panel panel; struct gpio_desc *reset_gpio; @@ -56,9 +58,9 @@ struct jh057n { struct dentry *debugfs; }; -static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel) +static inline struct st7703 *panel_to_st7703(struct drm_panel *panel) { - return container_of(panel, struct jh057n, panel); + return container_of(panel, struct st7703, panel); } #define dsi_generic_write_seq(dsi, seq...) do { \ @@ -69,7 +71,7 @@ static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel) return ret; \ } while (0) -static int jh057n_init_sequence(struct jh057n *ctx) +static int jh057n_init_sequence(struct st7703 *ctx) { struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); struct device *dev = ctx->dev; @@ -141,9 +143,9 @@ static int jh057n_init_sequence(struct jh057n *ctx) return 0; } -static int jh057n_enable(struct drm_panel *panel) +static int st7703_enable(struct drm_panel *panel) { - struct jh057n *ctx = panel_to_jh057n(panel); + struct st7703 *ctx = panel_to_st7703(panel); int ret; ret = jh057n_init_sequence(ctx); @@ -156,17 +158,17 @@ static int jh057n_enable(struct drm_panel *panel) return 0; } -static int jh057n_disable(struct drm_panel *panel) +static int st7703_disable(struct drm_panel *panel) { - struct jh057n *ctx = panel_to_jh057n(panel); + struct st7703 *ctx = panel_to_st7703(panel); struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); return mipi_dsi_dcs_set_display_off(dsi); } -static int jh057n_unprepare(struct drm_panel *panel) +static int st7703_unprepare(struct drm_panel *panel) { - struct jh057n *ctx = panel_to_jh057n(panel); + struct st7703 *ctx = panel_to_st7703(panel); if (!ctx->prepared) return 0; @@ -178,9 +180,9 @@ static int jh057n_unprepare(struct drm_panel *panel) return 0; } -static int jh057n_prepare(struct drm_panel *panel) +static int st7703_prepare(struct drm_panel *panel) { - struct jh057n *ctx = panel_to_jh057n(panel); + struct st7703 *ctx = panel_to_st7703(panel); int ret; if (ctx->prepared) @@ -230,10 +232,10 @@ static const struct drm_display_mode default_mode = { .height_mm = 130, }; -static int jh057n_get_modes(struct drm_panel *panel, +static int st7703_get_modes(struct drm_panel *panel, struct drm_connector *connector) { - struct jh057n *ctx = panel_to_jh057n(panel); + struct st7703 *ctx = panel_to_st7703(panel); struct drm_display_mode *mode; mode = drm_mode_duplicate(connector->dev, &default_mode); @@ -254,17 +256,17 @@ static int jh057n_get_modes(struct drm_panel *panel, return 1; } -static const struct drm_panel_funcs jh057n_drm_funcs = { - .disable = jh057n_disable, - .unprepare = jh057n_unprepare, - .prepare = jh057n_prepare, - .enable = jh057n_enable, - .get_modes = jh057n_get_modes, +static const struct drm_panel_funcs st7703_drm_funcs = { + .disable = st7703_disable, + .unprepare = st7703_unprepare, + .prepare = st7703_prepare, + .enable = st7703_enable, + .get_modes = st7703_get_modes, }; static int allpixelson_set(void *data, u64 val) { - struct jh057n *ctx = data; + struct st7703 *ctx = data; struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n"); @@ -282,7 +284,7 @@ static int allpixelson_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL, allpixelson_set, "%llu\n"); -static void jh057n_debugfs_init(struct jh057n *ctx) +static void st7703_debugfs_init(struct st7703 *ctx) { ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL); @@ -290,16 +292,16 @@ static void jh057n_debugfs_init(struct jh057n *ctx) &allpixelson_fops); } -static void jh057n_debugfs_remove(struct jh057n *ctx) +static void st7703_debugfs_remove(struct st7703 *ctx) { debugfs_remove_recursive(ctx->debugfs); ctx->debugfs = NULL; } -static int jh057n_probe(struct mipi_dsi_device *dsi) +static int st7703_probe(struct mipi_dsi_device *dsi) { struct device *dev = &dsi->dev; - struct jh057n *ctx; + struct st7703 *ctx; int ret; ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); @@ -340,7 +342,7 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) return ret; } - drm_panel_init(&ctx->panel, dev, &jh057n_drm_funcs, + drm_panel_init(&ctx->panel, dev, &st7703_drm_funcs, DRM_MODE_CONNECTOR_DSI); ret = drm_panel_of_backlight(&ctx->panel); @@ -363,13 +365,13 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) default_mode.vrefresh, mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); - jh057n_debugfs_init(ctx); + st7703_debugfs_init(ctx); return 0; } -static void jh057n_shutdown(struct mipi_dsi_device *dsi) +static void st7703_shutdown(struct mipi_dsi_device *dsi) { - struct jh057n *ctx = mipi_dsi_get_drvdata(dsi); + struct st7703 *ctx = mipi_dsi_get_drvdata(dsi); int ret; ret = drm_panel_unprepare(&ctx->panel); @@ -383,12 +385,12 @@ static void jh057n_shutdown(struct mipi_dsi_device *dsi) ret); } -static int jh057n_remove(struct mipi_dsi_device *dsi) +static int st7703_remove(struct mipi_dsi_device *dsi) { - struct jh057n *ctx = mipi_dsi_get_drvdata(dsi); + struct st7703 *ctx = mipi_dsi_get_drvdata(dsi); int ret; - jh057n_shutdown(dsi); + st7703_shutdown(dsi); ret = mipi_dsi_detach(dsi); if (ret < 0) @@ -397,28 +399,28 @@ static int jh057n_remove(struct mipi_dsi_device *dsi) drm_panel_remove(&ctx->panel); - jh057n_debugfs_remove(ctx); + st7703_debugfs_remove(ctx); return 0; } -static const struct of_device_id jh057n_of_match[] = { +static const struct of_device_id st7703_of_match[] = { { .compatible = "rocktech,jh057n00900" }, { /* sentinel */ } }; -MODULE_DEVICE_TABLE(of, jh057n_of_match); +MODULE_DEVICE_TABLE(of, st7703_of_match); -static struct mipi_dsi_driver jh057n_driver = { - .probe = jh057n_probe, - .remove = jh057n_remove, - .shutdown = jh057n_shutdown, +static struct mipi_dsi_driver st7703_driver = { + .probe = st7703_probe, + .remove = st7703_remove, + .shutdown = st7703_shutdown, .driver = { .name = DRV_NAME, - .of_match_table = jh057n_of_match, + .of_match_table = st7703_of_match, }, }; -module_mipi_dsi_driver(jh057n_driver); +module_mipi_dsi_driver(st7703_driver); MODULE_AUTHOR("Guido Günther "); -MODULE_DESCRIPTION("DRM driver for Rocktech JH057N00900 MIPI DSI panel"); +MODULE_DESCRIPTION("DRM driver for Sitronix ST7703 based MIPI DSI panels"); MODULE_LICENSE("GPL v2"); From patchwork Fri Jun 26 00:55:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11626743 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EDF3E14E3 for ; Fri, 26 Jun 2020 07:36:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CC75220775 for ; Fri, 26 Jun 2020 07:36:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="fPZl5job" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC75220775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8A1D6E44E; Fri, 26 Jun 2020 07:36:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1C5896EC29 for ; Fri, 26 Jun 2020 00:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593132966; bh=H4Ey/axNrmDO8uWqgGRB90xGu+wTgBcSE26SENeyZ7Y=; h=From:To:Cc:Subject:Date:References:From; b=fPZl5job8L5Vj6SXEpUmEWt1xp72Di5hQdqIqR5g3buxh9QvctA9uN7Ow2j5YH5hG CYIi3OhHwRcGi6jvYae0ifvAgU9f7HJ4o7vxWjle2AQCnUcCi6eGUxuSD9eY+nkSBd oZAtXBJ8y7NTPjyv2B5Mx3RqUTvfED7aFvw4oZFc= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Subject: [PATCH v5 06/13] drm/panel: st7703: Prepare for supporting multiple panels Date: Fri, 26 Jun 2020 02:55:54 +0200 Message-Id: <20200626005601.241022-7-megous@megous.com> In-Reply-To: <20200626005601.241022-1-megous@megous.com> References: <20200626005601.241022-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Jun 2020 07:36:15 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Samuel Holland , Bhushan Shah , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Luca Weiss , Martijn Braam , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Parametrize the driver so that it can support more panels based on st7703 controller. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 511af659f273..08cbc316266c 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include