From patchwork Mon Jun 24 01:30:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13709100 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 832DEC2D0D1 for ; Mon, 24 Jun 2024 07:23:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F10610E381; Mon, 24 Jun 2024 07:23:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="S5sK1Lmr"; dkim-atps=neutral Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0423410E1C9 for ; Mon, 24 Jun 2024 01:37:31 +0000 (UTC) X-Envelope-To: dmitry.torokhov@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719192645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZafQrF5/mKlL8ki2Ug5SDJIBpVQSzq+g1QzIBRzfyPQ=; b=S5sK1Lmrh4fypFDeNyykJi9GhIe2od8bN57+EIYbGislNoTaxB6SmGmhgGRaU2ll7mpDWH t04RsXzaCVOTcrlJsT29DdT+5RBQQ0cHSJszcy3Hnp3utTBc37I2fqCctejbxwvnofpNli I6ENATR5SS6WJQO5Jo1mZ/a0dR42qwN17P+oHzJyWI0oEaNPq73U0USVzTkS8xIH+Gxm50 FJXWirV75v+lw9sL/e/3X0qQfMOexB5SgkTrKzPhXp0jVCY1Vgo917FRXZS8xcXsAfElq6 PnlfQe4QwyfZAhAlYBFtmVqcftRVyMjzeG5HT0ONn5UIzcuX2pEh88nZ/7x2XA== X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: andersson@kernel.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: tzimmermann@suse.de X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: airlied@gmail.com X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: conor+dt@kernel.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: robh@kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Mon, 24 Jun 2024 03:30:29 +0200 Subject: [PATCH 5/7] drm/panel: add driver for samsung amb655x MIME-Version: 1.0 Message-Id: <20240624-oneplus8-v1-5-388eecf2dff7@postmarketos.org> References: <20240624-oneplus8-v1-0-388eecf2dff7@postmarketos.org> In-Reply-To: <20240624-oneplus8-v1-0-388eecf2dff7@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht X-Developer-Signature: v=1; a=openpgp-sha256; l=15789; i=caleb@postmarketos.org; h=from:subject:message-id; bh=o4NXFA1nl/MD7sMoQldoD6FkmLpkc9i7HJm6gFkXqiY=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmeMw7FiqAjkGif4BMSj0qrBOI8xpq8r6CJ1bg4 3SOxK+UP/eJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZnjMOwAKCRAFgzErGV9k tmeqEACGZix8yX6eU57CVR24z/z0fAPANYsy8S2iJON1FUNjLW9zoOjqlKVatYedglE5QsGuDta YB4D9FTPPjLRpVy1+HghkZfwmSAzSOHo7sfjnJwBIMiXZIhcUp0iOi1oF/sTDiZFSrYB5/ES4lc VI72klRwf2vpjbQ8HanREpphPDNFHoQxwjVI80Sc9/YCUjkeelliOlAeGFwfuZ60NqOa8xAZQgy uVS/EraKWGsSnpVAzqcTpfBBSuCUGqyuybh0eFrBnS0tKTaDkLK0yDT6bkN2ExEB5jMqgmesJ72 Zb2D4fTxM9t8JJ4Li82vokFvB2mm0sJUF1tG8qIfcn4TFKDrnRsTa6D3rIczqGIXgfaT2MZUYjO YE+Qk5FRWZQOPGiLxyZNMsWN7/HLlgl+iQb2BIskq0wvlD8i4IMTv5Fp0PHxLXIOZNVdv8Rb+ZZ EjiWRpJVbCToSf9oAXPj3if9shMFqUTNJ4sKf2HVCH1TvJLYpPASU1sJI3LyjGA/IQM/ioNiXpj tcH5y95F2HwdwhCDKCK10rdoLn+hpnwnhxmUAQ2kroMh8/Kon7V3TQrOimwHgmnKSAy5kIXNabQ p00PAAWp1QpMYbiG+FjSK6zTR44QPmd4gEp3DeX5DvS02niqkSPk3Z7FY1emu3+MJCF6lq3piR4 xt1k87CVln0AwEA== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-Mailman-Approved-At: Mon, 24 Jun 2024 07:22:58 +0000 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a 1080x2400 120hz panel used on the OnePlus 8T. It uses DSC but uses non-standard DCS commands. Signed-off-by: Caleb Connolly --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-amb655x.c | 420 ++++++++++++++++++++++++++ 4 files changed, 437 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 807feae089c4..2b9cfbf92d7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7142,8 +7142,15 @@ M: Robert Chiras S: Maintained F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml F: drivers/gpu/drm/panel/panel-raydium-rm67191.c +DRM DRIVER FOR SAMSUNG AMB655X PANEL +M: Caleb Connolly +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: Documentation/devicetree/bindings/display/panel/samsung,amb655x.yaml +F: drivers/gpu/drm/panel/panel-samsung-amb655x.c + DRM DRIVER FOR SAMSUNG DB7430 PANELS M: Linus Walleij S: Maintained T: git https://gitlab.freedesktop.org/drm/misc/kernel.git diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index bf4eadfe21cb..7203d16ab20a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -590,8 +590,17 @@ config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 depends on OF select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_SAMSUNG_AMB655X + tristate "Samsung AMB655X DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + DRM panel driver for the Samsung AMB655X panel. + This panel has a resolution of 1080x2400 @ 60hz or 120Hz. + config DRM_PANEL_SAMSUNG_ATNA33XC20 tristate "Samsung ATNA33XC20 eDP panel" depends on OF depends on BACKLIGHT_CLASS_DEVICE diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 051b75b3df7b..be6d500a56a4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -58,8 +58,9 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM692E5) += panel-raydium-rm692e5.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM69380) += panel-raydium-rm69380.o obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMB655X) += panel-samsung-amb655x.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-amb655x.c b/drivers/gpu/drm/panel/panel-samsung-amb655x.c new file mode 100644 index 000000000000..2af89bfd798a --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-amb655x.c @@ -0,0 +1,420 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: +// Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +// Copyright (c) 2024 Caleb Connolly + + +#include +#include +#include +#include +#include + +#include