From patchwork Thu Jan 19 16:31:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 644154 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 10A77C004D4 for ; Thu, 19 Jan 2023 16:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbjASQcN (ORCPT ); Thu, 19 Jan 2023 11:32:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjASQcL (ORCPT ); Thu, 19 Jan 2023 11:32:11 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2D3C24134 for ; Thu, 19 Jan 2023 08:32:07 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id v13so3511955eda.11 for ; Thu, 19 Jan 2023 08:32:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YE4kxjCoA8g22WKPVKZXkJ+ZWFhCgt4Gpj2pAo7Vofg=; b=pINpCCbJuokFvEfsZ52A6K7wsjl18I2oknNeiQJ3ynhH3vOP35dZ86H2EQk+jZLamm uSi0+B4zjimfQTbOUGOrr1sxlCrj7SdzFa90u0J3qz6kdV0yN0iCk27WhipVl7S66LW4 qQl+HvzQTcG4DcML//YwR1b0nW1FyOggmPkYm9uqtQ7u+HLE5N/4rI1rZkCk92OgPSTi ncIl89IWWMOoizVO/b7W8dH1YqoW5H231eow9nIOEthNHwM1W6ftRUfT2N+228kpfHrb 4L+oeUVMx4nv9PGaDpZyJZg3ARr4a3y0tKOUOTTGE1YRyqM3mOoxo1MbaXVlqhQ4CXIj YImQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YE4kxjCoA8g22WKPVKZXkJ+ZWFhCgt4Gpj2pAo7Vofg=; b=T4TbLvGLuzLgGfK3r5VAVobJQpvMTP87+fs2rcTqXhIAI4ga6dVHe6eOdEfa+tRXYM HOzUGIGrrVX1rvPrjbnL71DrIJdU3Q5umfjvrRCqhK2wbK42au9wnQ9HIfk8fTSq5p1b jI3MC2mzjgy7IK2EEQIZ0oEDf+F194BPA5aQxubmP6/ejFNPhUTXSqdQ/sSpnfJ5/boQ MEzvWAUsJrx8jZkOzh4N/I4+Oopmf5SpTc2zQv+IGXnLXROBHoziYimXbZnddXUxjuwj sg9/2uwCjhx6zpaktlyfcsz3Wr54Tb3D3UEByPd+gn8uG1J/pShAUAoaB0lpIrhP21lC 5D4w== X-Gm-Message-State: AFqh2kqW8AhJLaiUkx9x0MlFEsSng114MUQ0MzGpyu2J2u7DZ5NJs98S PbNb373wGtDP35AWko7w6VfykXfLv/AdxA1T X-Google-Smtp-Source: AMrXdXv0JD7ArwgvLKwUjKMA3A7LLoYNY+CcCHNC2j9dwsvXlVKHekCHCKeXSxiUkSXs/UeW80N1lQ== X-Received: by 2002:a05:6402:1ad1:b0:460:5706:d1fa with SMTP id ba17-20020a0564021ad100b004605706d1famr12010299edb.18.1674145926252; Thu, 19 Jan 2023 08:32:06 -0800 (PST) Received: from localhost.localdomain (abyk37.neoplus.adsl.tpnet.pl. [83.9.30.37]) by smtp.gmail.com with ESMTPSA id fg11-20020a056402548b00b004873927780bsm15669466edb.20.2023.01.19.08.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 08:32:05 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Konrad Dybcio , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/2] dt-bindings: display/panel: Add Sony Tama TD4353 JDI display panel Date: Thu, 19 Jan 2023 17:31:59 +0100 Message-Id: <20230119163201.580858-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Konrad Dybcio Add bindings for the display panel used on some Sony Xperia XZ2 and XZ2 Compact smartphones. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- v3 -> v4: - Pick up rb Link to v3: https://lore.kernel.org/lkml/20220930180812.32210-1-konrad.dybcio@somainline.org/ .../display/panel/sony,td4353-jdi.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sony,td4353-jdi.yaml diff --git a/Documentation/devicetree/bindings/display/panel/sony,td4353-jdi.yaml b/Documentation/devicetree/bindings/display/panel/sony,td4353-jdi.yaml new file mode 100644 index 000000000000..b6b885b4c22d --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sony,td4353-jdi.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/sony,td4353-jdi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sony TD4353 JDI 5 / 5.7" 2160x1080 MIPI-DSI Panel + +maintainers: + - Konrad Dybcio + +description: | + The Sony TD4353 JDI is a 5 (XZ2c) / 5.7 (XZ2) inch 2160x1080 + MIPI-DSI panel, used in Xperia XZ2 and XZ2 Compact smartphones. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: sony,td4353-jdi-tama + + reg: true + + backlight: true + + vddio-supply: + description: VDDIO 1.8V supply + + vsp-supply: + description: Positive 5.5V supply + + vsn-supply: + description: Negative 5.5V supply + + panel-reset-gpios: + description: Display panel reset pin + + touch-reset-gpios: + description: Touch panel reset pin + + port: true + +required: + - compatible + - reg + - vddio-supply + - vsp-supply + - vsn-supply + - panel-reset-gpios + - touch-reset-gpios + - port + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel: panel@0 { + compatible = "sony,td4353-jdi-tama"; + reg = <0>; + + backlight = <&pmi8998_wled>; + vddio-supply = <&vreg_l14a_1p8>; + vsp-supply = <&lab>; + vsn-supply = <&ibb>; + panel-reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + touch-reset-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; +... From patchwork Thu Jan 19 16:32:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 645153 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 2EE09C004D4 for ; Thu, 19 Jan 2023 16:34:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbjASQeA (ORCPT ); Thu, 19 Jan 2023 11:34:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbjASQcN (ORCPT ); Thu, 19 Jan 2023 11:32:13 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65DEC15563 for ; Thu, 19 Jan 2023 08:32:11 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id v13so3512166eda.11 for ; Thu, 19 Jan 2023 08:32:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ElGHLl1p07NWckigrAo4Z4Nh91TagT335zgulDzAc7s=; b=YSWxBFBldsha8Wz6TAtG0mjkZ8gqt2PYkVMxad91exTjqAvblot8cNrz81JNT4kQfm Sq98YG+SFnbhvIbZIIe+nzIZAedvAW2myzVX9Spa4lqQJmMQFAC6afIcPLBtBE8unJSe G8dfBtqKfj7cPV4aUFW/3D9nA+hQmYv/OcGRHf5UbEcyxG/TKQ+VUe0abNo77x+znAOm siMJlw6I40Bg/GBjwSmoR4+u9ulVpO7T3VMQ4HX5B1CVsix4s42DoOzj4VQZHWLZzqhS aFmfSFPMxqZI8tWPuKOVSHIYuPrCUfYKz7PUnQd8hVGqXKhcvC/yMFpnbvUkXXctyWFp 5aBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ElGHLl1p07NWckigrAo4Z4Nh91TagT335zgulDzAc7s=; b=nXByRCvFiXmaWDQJzdunNoX2vT5EKpMPO11u8X5aLDLtikMu1m3u6GrUyMiVGgxFRZ QdiRRw16wCUh2vKWeDM4C24XFMOKZR5kNkMPWPBvHBUcBLqvkVjv6dZLLhKM8BjhUUVD IeR9MpSnL0rYfoWwX8qF4J4+xYh1QZQHD6KWQ6dvOA3JagdGPFefsPBXbmuBvM1wUL+m 9bjC82TywvBAbRYleEgXtDuLh6h/Ko81wuj+W5INTg/rgLM7+K1VRJxoUM3BdF9MSS+A pZhORDhGYaDa+GpzoQzzcNrNdU7AWYJQpbtiopl42oc0qYllbe2p4T52iQ2s/J47D0Xb qJqA== X-Gm-Message-State: AFqh2kobHlX1Or0yw2Vq8gDT7r5jX6jMuijyktLWw1spu4P6f402Kugw Zfo883HHLjLs3cXKrijqyVHpOswZU+hYAMVR X-Google-Smtp-Source: AMrXdXsXBLyytR8pP3BLJsKEszSpi1ICR2w52kIB7S8EBzZi6GvhEFWVzV2wSGlqnAjPJfTgInpN6Q== X-Received: by 2002:a05:6402:5306:b0:49b:b274:b815 with SMTP id eo6-20020a056402530600b0049bb274b815mr12246564edb.39.1674145928963; Thu, 19 Jan 2023 08:32:08 -0800 (PST) Received: from localhost.localdomain (abyk37.neoplus.adsl.tpnet.pl. [83.9.30.37]) by smtp.gmail.com with ESMTPSA id fg11-20020a056402548b00b004873927780bsm15669466edb.20.2023.01.19.08.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 08:32:08 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Konrad Dybcio , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/2] gpu/drm/panel: Add Sony TD4353 JDI panel driver Date: Thu, 19 Jan 2023 17:32:00 +0100 Message-Id: <20230119163201.580858-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230119163201.580858-1-konrad.dybcio@linaro.org> References: <20230119163201.580858-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Konrad Dybcio Add support for the Sony TD4353 JDI 2160x1080 display panel used in some Sony Xperia XZ2 and XZ2 Compact smartphones. Due to the specifics of smartphone manufacturing, it is impossible to retrieve a better name for this panel. This revision adds support for the default 60 Hz configuration, however there could possibly be some room for expansion, as the display panels used on Sony devices have historically been capable of >2x refresh rate overclocking. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- v3 -> v4: - De-magicize some numbers - Pick up rb drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 329 ++++++++++++++++++ 3 files changed, 340 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-sony-td4353-jdi.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d03a64155d15..8da741f1c2ba 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -677,6 +677,16 @@ 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_TD4353_JDI + tristate "Sony TD4353 JDI 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 Tama + TD4353 JDI command mode panel as found on some Sony Xperia + XZ2 and XZ2 Compact smartphones. + config DRM_PANEL_SONY_TULIP_TRULY_NT35521 tristate "Sony Tulip Truly NT35521 panel" depends on GPIOLIB && OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 1630dd0c69ae..22155d62bec0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -68,6 +68,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_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_SONY_SYNAPTICS_JDI) += panel-sony-synaptics-jdi.o obj-$(CONFIG_DRM_PANEL_TDO_TL070WSH30) += panel-tdo-tl070wsh30.o diff --git a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c new file mode 100644 index 000000000000..8d8813dbaa45 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c @@ -0,0 +1,329 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022 Konrad Dybcio + * + * Generated with linux-mdss-dsi-panel-driver-generator with a + * substantial amount of manual adjustments. + * + * SONY Downstream kernel calls this one: + * - "JDI ID3" for Akari (XZ2) + * - "JDI ID4" for Apollo (XZ2 Compact) + */ + +#include +#include +#include +#include +#include +#include + +#include