Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4046918rwb; Fri, 30 Sep 2022 12:01:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TfoXwOgJN8KenGEzyN/Cee/b3mv0rmSaeVLJghzzV3aqi+3xB7wQ3Z0XW3LEJTIZjW0Jx X-Received: by 2002:a17:907:7b93:b0:770:1d4f:4de9 with SMTP id ne19-20020a1709077b9300b007701d4f4de9mr7606362ejc.201.1664564467728; Fri, 30 Sep 2022 12:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664564467; cv=none; d=google.com; s=arc-20160816; b=iCEnOpQ18cHWeS+wkgZAkcLe3VEKwOFn3uDhGmGsy5GQg1IR1ZykgnqDs6M44xvQY8 xcv4hPhHUdpJowK45Ax/YbanyjqqZZE5LgCpoRsOFkRHf8V0ZYTk2NKwyQGNxT16yMQP uTeMP/oFrdiS39F5ui77AbNFS0cGSFZZpOlIyrufy6Det+VKPkFG072y3A/sbSZ3jptv saHec/Q1G4j6XIC7ZEsVUetTO6CMREGCkywYW3Po08D2UAY8gaVfLgLQy65jxxYhPdHX pqfHnijD6+rJaOeirvSwKQocShUFHIdmf6akCxFwPhOsGmhTe6wlytcjfWYDNrr/7N/L 38CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LlIncYop9FrKMLH+vOqIwTi2q7PSOssFs22krnrc6QE=; b=p9LYwMe0j6vSA1WYcgvDjkxIFtSWIBA29bpb5RwwvEiduemr5XeDa5XNYddwJACd4k sDK+BdeVBYrvZ5Ctzr57YmJbMBdsrQS/cu2ch2ovSkS0Y8+OHiOrLnCCawOvGkKJW9TV B3rDGk9j8WoMP4sN1kwLaukXuYSFB4VCWAENEL/A9/G440nhEXpPObIfwNGpkiEa4K68 SNlnNfyJCidmYUrEuAAx0tdoHB7B2X6209G1U1eO0t/F0+1lbtR3hRuDazrGwq+Iz2XD 0wC3921n3ZYknJpbgXcLQJ0B8rP5ncE729mCTcj9aD0y7AOCeGbxLxbTm6Yi1QLKIDLn EFfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd14-20020a170907968e00b0078355eb4a1csi2241772ejc.345.2022.09.30.12.00.41; Fri, 30 Sep 2022 12:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232088AbiI3SJE (ORCPT + 99 others); Fri, 30 Sep 2022 14:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231906AbiI3SIp (ORCPT ); Fri, 30 Sep 2022 14:08:45 -0400 Received: from m-r2.th.seeweb.it (m-r2.th.seeweb.it [5.144.164.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F19E81E557F for ; Fri, 30 Sep 2022 11:08:35 -0700 (PDT) Received: from localhost.localdomain (95.49.31.201.neoplus.adsl.tpnet.pl [95.49.31.201]) by m-r2.th.seeweb.it (Postfix) with ESMTPA id E91FE3F6B3; Fri, 30 Sep 2022 20:08:32 +0200 (CEST) From: Konrad Dybcio To: ~postmarketos/upstreaming@lists.sr.ht Cc: martin.botka@somainline.org, angelogioacchino.delregno@somainline.org, marijn.suijten@somainline.org, jamipkettunen@somainline.org, Konrad Dybcio , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 2/2] gpu/drm/panel: Add Sony TD4353 JDI panel driver Date: Fri, 30 Sep 2022 20:08:11 +0200 Message-Id: <20220930180812.32210-2-konrad.dybcio@somainline.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220930180812.32210-1-konrad.dybcio@somainline.org> References: <20220930180812.32210-1-konrad.dybcio@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes since v2: - "GPL v2" -> "GPL" - add missing S-o-b (how embarassing) - move { after sony_td4353_assert_reset_gpios() to a new line 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 a582ddd583c2..6ef1b48169b5 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -637,6 +637,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 8e71aa7581b8..8ef27bc86f94 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -64,6 +64,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_TDO_TL070WSH30) += panel-tdo-tl070wsh30.o obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.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..11db62992b8b --- /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