From patchwork Sun May 21 21:23:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 13249570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AE7CC7EE23 for ; Sun, 21 May 2023 21:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbjEUVXV (ORCPT ); Sun, 21 May 2023 17:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbjEUVXP (ORCPT ); Sun, 21 May 2023 17:23:15 -0400 Received: from m-r2.th.seeweb.it (m-r2.th.seeweb.it [IPv6:2001:4b7a:2000:18::171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B35E9E1 for ; Sun, 21 May 2023 14:23:13 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 900B83F340; Sun, 21 May 2023 23:23:05 +0200 (CEST) From: Marijn Suijten Date: Sun, 21 May 2023 23:23:03 +0200 Subject: [PATCH RFC 01/10] drm/panel: Clean up SOFEF00 config dependencies MIME-Version: 1.0 Message-Id: <20230521-drm-panels-sony-v1-1-541c341d6bee@somainline.org> References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> In-Reply-To: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Baryshkov , Abhinav Kumar , Kuogee Hsieh , Jessica Zhang , Marijn Suijten X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org As per the config name this Display IC features a DSI command-mode interface (or the command to switch to video mode is not known/documented) and does not use any of the video-mode helper utilities, hence should not select VIDEOMODE_HELPERS. In addition it uses devm_gpiod_get() and related functions from GPIOLIB. Fixes: 5933baa36e26 ("drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices") Signed-off-by: Marijn Suijten Reviewed-by: Neil Armstrong Reviewed-by: Caleb Connolly --- drivers/gpu/drm/panel/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2b9d6db7860ba..67ef898d133f2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -608,10 +608,10 @@ config DRM_PANEL_SAMSUNG_S6E8AA0 config DRM_PANEL_SAMSUNG_SOFEF00 tristate "Samsung sofef00/s6e3fc2x01 OnePlus 6/6T DSI cmd mode panels" + depends on GPIOLIB depends on OF depends on DRM_MIPI_DSI depends on BACKLIGHT_CLASS_DEVICE - select VIDEOMODE_HELPERS help Say Y or M here if you want to enable support for the Samsung AMOLED command mode panels found in the OnePlus 6/6T smartphones. From patchwork Sun May 21 21:23:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 13249571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8117C7EE2F for ; Sun, 21 May 2023 21:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231197AbjEUVXX (ORCPT ); Sun, 21 May 2023 17:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbjEUVXP (ORCPT ); Sun, 21 May 2023 17:23:15 -0400 Received: from relay05.th.seeweb.it (relay05.th.seeweb.it [5.144.164.166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B372AE3 for ; Sun, 21 May 2023 14:23:13 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 58E6F3F342; Sun, 21 May 2023 23:23:11 +0200 (CEST) From: Marijn Suijten Date: Sun, 21 May 2023 23:23:04 +0200 Subject: [PATCH RFC 02/10] dt-bindings: display: panel: Describe Sony Xperia XZ3's LGD panel MIME-Version: 1.0 Message-Id: <20230521-drm-panels-sony-v1-2-541c341d6bee@somainline.org> References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> In-Reply-To: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Baryshkov , Abhinav Kumar , Kuogee Hsieh , Jessica Zhang , Marijn Suijten X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the LG-Display OLED panel found in the Sony Xperia XZ3. Signed-off-by: Marijn Suijten --- .../bindings/display/panel/sony,akatsuki-lgd.yaml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/sony,akatsuki-lgd.yaml b/Documentation/devicetree/bindings/display/panel/sony,akatsuki-lgd.yaml new file mode 100644 index 0000000000000..523e580b70c7d --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sony,akatsuki-lgd.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/sony,akatsuki-lgd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sony Xperia XZ3 LG Display 1440x2880 6.0" OLED DSI panel + +maintainers: + - Marijn Suijten + +description: | + This is an unnamed 6.0" 1440x2880 (9:18 aspect ratio) 60 hz panel + produced by LG Display, found in the Sony Xperia XZ3 smartphone. + It is always programmed with DSI 1.1. enabled. + + The assembly features an Atmel maXTouch digitizer, described separately + as atmel,maxtouch. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: sony,akatsuki-lgd + + port: true + + reg: + maxItems: 1 + description: DSI virtual channel + + reset-gpios: true + + vddio-supply: + description: I/O voltage supply (1.8V) + +required: + - compatible + - port + - reg + - reset-gpios + - vddio-supply + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "sony,akatsuki-lgd"; + reg = <0>; + + vddio-supply = <&vreg_l14a_1p8>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; + +... + From patchwork Sun May 21 21:23:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 13249574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E79BC7EE23 for ; Sun, 21 May 2023 21:23:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231250AbjEUVX0 (ORCPT ); Sun, 21 May 2023 17:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbjEUVXU (ORCPT ); Sun, 21 May 2023 17:23:20 -0400 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [5.144.164.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A9DEE9 for ; Sun, 21 May 2023 14:23:14 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 235283F34A; Sun, 21 May 2023 23:23:12 +0200 (CEST) From: Marijn Suijten Date: Sun, 21 May 2023 23:23:05 +0200 Subject: [PATCH RFC 03/10] drm/panel: Add LGD panel driver for Sony Xperia XZ3 MIME-Version: 1.0 Message-Id: <20230521-drm-panels-sony-v1-3-541c341d6bee@somainline.org> References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> In-Reply-To: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Baryshkov , Abhinav Kumar , Kuogee Hsieh , Jessica Zhang , Marijn Suijten X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Sony provides an unlabeled LGD + Atmel maXTouch assembly in its Xperia XZ3 (tama akatsuki) phone, with custom DCS commands to match. This panel features Display Stream Compression 1.1. Signed-off-by: Marijn Suijten --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sony-akatsuki-lgd.c | 362 ++++++++++++++++++++++++ 3 files changed, 374 insertions(+) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 67ef898d133f2..18bd116e78a71 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -706,6 +706,17 @@ config DRM_PANEL_SONY_ACX565AKM Say Y here if you want to enable support for the Sony ACX565AKM 800x600 3.5" panel (found on the Nokia N900). +config DRM_PANEL_SONY_AKATSUKI_LGD + tristate "Sony Xperia XZ3 LGD panel" + depends on GPIOLIB && OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Sony Xperia XZ3 + 1440x2880@60 6.0" OLED DSI cmd mode panel produced by LG Display. + + This panel uses Display Stream Compression 1.1. + config DRM_PANEL_SONY_TD4353_JDI tristate "Sony TD4353 JDI panel" depends on GPIOLIB && OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index ff169781e82d7..85133f73558f3 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -71,6 +71,7 @@ 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_ACX565AKM) += panel-sony-acx565akm.o +obj-$(CONFIG_DRM_PANEL_SONY_AKATSUKI_LGD) += panel-sony-akatsuki-lgd.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt35521.o obj-$(CONFIG_DRM_PANEL_TDO_TL070WSH30) += panel-tdo-tl070wsh30.o diff --git a/drivers/gpu/drm/panel/panel-sony-akatsuki-lgd.c b/drivers/gpu/drm/panel/panel-sony-akatsuki-lgd.c new file mode 100644 index 0000000000000..f55788f963dab --- /dev/null +++ b/drivers/gpu/drm/panel/panel-sony-akatsuki-lgd.c @@ -0,0 +1,362 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2023 Marijn Suijten + * + * Based on Sony Downstream's "Atmel LGD ID5" Akatsuki panel dtsi. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include