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: 13108365 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2EF67C46467 for ; Thu, 19 Jan 2023 16:32:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 31D6910E9BB; Thu, 19 Jan 2023 16:32:13 +0000 (UTC) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7498710E9B6 for ; Thu, 19 Jan 2023 16:32:10 +0000 (UTC) Received: by mail-ed1-x52b.google.com with SMTP id z11so3584827ede.1 for ; Thu, 19 Jan 2023 08:32:10 -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=VcD9Poh/0Hch5Qw+xJl5JZ9KkUAujYtRaY0B9vj+tWdko4qrVc8yQKdtwWdCVbBZuP hpvaJ1JG3a4/B6DSb0zxsrxHxOR7aIxKRYm1O0OnYVj7aduE0XfV7hY+UN7rpy8u1EGw 2qCqkwBqFJFk+adHPsOW/rFpdIqpdmrQGI4OIj7tYYUFksvEwv083DWNVeNpCnv1GR4m XfnZzTXO8oTrjEdk75a6j7iUboid+fURx6dU76bnJ5w0JZ/gMQ1U1CAHuq54gfEqfFIJ 3EufL4Q+im0c/Gy6HU+mO2uDwgM95Wkv05+ABjHTRALgVMMXvEAzFCH961ObiUDG7kPn OONA== X-Gm-Message-State: AFqh2krYMru4gcvbJK+DjAPkCJhjEGdzTKS6r5vEwGiwu6dVq8TEtaoM Fq1PmGv367taMpWnssPdxMRF4Q== 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 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 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: devicetree@vger.kernel.org, Krzysztof Kozlowski , Sam Ravnborg , Konrad Dybcio , linux-kernel@vger.kernel.org, Rob Herring , Konrad Dybcio , Thierry Reding , dri-devel@lists.freedesktop.org, marijn.suijten@somainline.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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