Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5281imw; Tue, 12 Jul 2022 13:24:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u0W56SkZYX+VMx7tMiSTBQGi2+HvbJrZoi7yoVaclGOEuckOg7wq4KfWAuR/lQwBSZX7cH X-Received: by 2002:a05:6a00:1386:b0:52a:d5f9:2837 with SMTP id t6-20020a056a00138600b0052ad5f92837mr10260159pfg.5.1657657480266; Tue, 12 Jul 2022 13:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657657480; cv=none; d=google.com; s=arc-20160816; b=G+Hh1vjtTdxXJkqftwpTuVLxa9KVW3DhyhzSjQ8aKiLVRwe4KxwLuBLLjJhF9SLeUZ UqRMewsoHvmc4Zs1TkpKlLNcoDipoIQVzIQydkYngYxFygcr4145kPCT/cS+DdsH9oiV FW9smdcNzLM4gP0c9DeRTiZiIR6S4Vpo8IFzSfzy6olBYKZdW+KqknnjQJab0+WBRUf4 YxaivjSjrgSQFB2sjXYhgej5rTxT9NXM5Qi9CApmNtSik/nPxfqIwNp+riUMikqNgz1X pj3MggpfoubfXBK3NyvWY2kqT+gnAQA/tbWGvXZQqLIBFhqEfXyST91UlNtNUs/pfTnp 4KLw== 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=rWiecdn38m6SxVZZWXOGjUrAo7SS2foFGksp0y9tQh8=; b=B1Fqh8PqwBw2+VwEVC07sJyZ4lPuTlTfN+20LDag/mw7Otq2mvQ47Q1FyC13HUOXdD /8tt8Kuwg9/HvLmjRf88ml7UcUfrrNUaXUOvaCs1XvMreMrU1lsOJ4xUBR/CqVoUuriG wk484FUvQqSecEdSNYAt+8GeQWMcOQLz0GZWGPFYbGx3stttQxqbBf+q8Vf8+FsPaZKq x3/oOHKzwGZzF/yzV7eTfxfSTMhHlaZnRlii+R/Zx1YP1wotK68HCyKUFW8y/vsfRbxP zGV5fCyxEheZ1OqEKmjNIgCHKg6OoOfo97DwEIIcrncQdxHQIIp8pWTdVuZZU36iV5RR iRcQ== 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 bg8-20020a1709028e8800b0016c281b1de3si12579713plb.501.2022.07.12.13.24.26; Tue, 12 Jul 2022 13:24:40 -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 S234576AbiGLUDs (ORCPT + 99 others); Tue, 12 Jul 2022 16:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234137AbiGLUDp (ORCPT ); Tue, 12 Jul 2022 16:03:45 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [5.144.164.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 505931039 for ; Tue, 12 Jul 2022 13:03:41 -0700 (PDT) Received: from localhost.localdomain (abxj14.neoplus.adsl.tpnet.pl [83.9.3.14]) by m-r2.th.seeweb.it (Postfix) with ESMTPA id 01B243F6BE; Tue, 12 Jul 2022 22:03:36 +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 2/2] gpu/drm/panel: Add Sony TD4353 JDI panel driver Date: Tue, 12 Jul 2022 22:02:41 +0200 Message-Id: <20220712200244.960018-2-konrad.dybcio@somainline.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220712200244.960018-1-konrad.dybcio@somainline.org> References: <20220712200244.960018-1-konrad.dybcio@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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. --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 352 ++++++++++++++++++ 3 files changed, 363 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 38799effd00a..1baa0a2c36bd 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -624,6 +624,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 eabd4d6a1845..df8a6b707dbb 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -63,6 +63,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..8bc2e55af63c --- /dev/null +++ b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c @@ -0,0 +1,352 @@ +// 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 + * - "JDI ID4" for Apollo + */ + +#include +#include +#include +#include +#include +#include + +#include