Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2157005rwd; Sun, 21 May 2023 14:32:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AfpmhlJ8zoltG3ES5XGZ/iqAjgIcQMe8KhnWhM0xfIn7ZYLTP2SIAC3rdEKiQsMMGxXFe X-Received: by 2002:a17:90a:ce07:b0:253:8c39:642 with SMTP id f7-20020a17090ace0700b002538c390642mr7838042pju.5.1684704746806; Sun, 21 May 2023 14:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684704746; cv=none; d=google.com; s=arc-20160816; b=CRu/RHnSC7d28bq4Np4uB/ibsewRl6Kcj+i1O2OfiQTrcHinzUyHH/hGoiM0RSVgmY W0uw3BhaFll/+tZJXqhKH3ZepbCZLFbv3k0mDx3IOWOtuqfw/cxTn0w6qYkM3XtmU9VQ znfDkdJIPT0GDtJzG6akF3Ug+T4MZpRoop+ao6yaaEZ4E7QiLp+KQ+JR3/0SX3XxOff4 Is40p8+Mz9CtWKrJRW6kxnZoISCui1puGtXPqH9d3WvERWzWseVdVBAguWAzFa2LVqFD rc7Jq8t+CspEghKLSSX7fK5r9Iy4HUg6Q/++3Kir5nZKYHghGkIcPHvRug1gg8LVjO9H DQ0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=/3mbZvbsIuyCDem7euzPQWAAmh1P8xbQI1rJT4lxIgw=; b=tsEae+fjVFqpqNh30kwiTUuVAAAzT/9BroB8hxm507EL8lY2mWf4wP9REodPGFnAj8 vkQc7hKXi35FEipQezy/d/GjECALBXps6l6WqRWVOoyHd3q1S1hFOItuqfxNWjneSKR2 a+5s4hMudfVEx/6jq9D0zbmUfSUZbEM7LVU/7uskFxkrLHrteXb4JcSViuadVG63TBSc /f/2RoL2j07+KKvTP4eikF+4gnW8FD1oT+G4bN46vcCGjSqRs3soniy/Zly83oUf5QQI HYnjq27Bjhg5/fuHrwt53nj9vA3SGlV3+gnkGvUFNdIFPpmJhX30RC88bCe8aZC0XSAV dufw== 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 t10-20020a17090ad50a00b0023d22d0f0fdsi5757840pju.19.2023.05.21.14.32.13; Sun, 21 May 2023 14:32:26 -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 S231267AbjEUVX1 (ORCPT + 99 others); Sun, 21 May 2023 17:23:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbjEUVXU (ORCPT ); Sun, 21 May 2023 17:23:20 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [IPv6:2001:4b7a:2000:18::168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34CEEBF 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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