From patchwork Sun Jun 30 18:36: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: 13717284 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 0CDE7C27C4F for ; Sun, 30 Jun 2024 18:37:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 831BF10E2B3; Sun, 30 Jun 2024 18:37:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="WSj41HZM"; dkim-atps=neutral Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id 820ED10E2B8 for ; Sun, 30 Jun 2024 18:36:51 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772610; 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=P9ZFsw5xKwfg6vVcqc1X4au1s1qxxzW1yFV8kIX9ZSE=; b=WSj41HZMGv+5oU1m0ZUCu94priRa8IH+Xf+qpfZZXkMKcVQBHwQnOLpZUSlDoLnH7/DbLD vGpzC5/N21SSH/ixqqfq3tTutZkjzwIIiTHO5ZayFUU2BNC/2Wxi8f6+6EDUNhR2viYEz6 v5OkQG/f6CQGp7GYrO5C49twKxJdjTVmBNGE5ubWH8WYM/5PlGXLqYXn14/Npqn80eAsXi DPeM6HL89XghS3hklKVG0hdFPmGFK+9/CzjQxEL8vUzA00BnGvIVEoNZczgqScbOIkTLBS WXvyxtWlWBVwi+qWvPkjzArcx7BeFGnJIPVQUy9Eoah3OAF/CR0ytuSEyAX2Yw== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:29 +0200 Subject: [PATCH v2 6/8] drm/panel: add driver for samsung amb655x MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-6-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@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: Dmitry Baryshkov , 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=16049; i=caleb@postmarketos.org; h=from:subject:message-id; bh=EPwneTSUtmzFjis/lUpYnHTx38d8qVEWHysAJM4/3lo=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWzuaPi7F90lxPkFwq9649JuWMaX2MePgXr1 GADhQASGl+JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k trKID/9DttHjwt+bJmb9SIFBqofaHu3tELGSP04/SURKKIAzjTUWMdcVjTbpCXOiZ04C9N4PVhB x1/UFpfNaPUvWNX21ymPjCw8nhLYL3eZRPSs6gsskbCy73UfMEY2uHzx/vxsqIYJdYyxOSMi46w HqHo/kt0HEXv+elYqv+L8OYeeQ2jPT9qnjTenfbSaaA3xx5lOVvG0l96gVetbp30RYUSyYxirt+ 41U7Yfvrrr2nt0gMUVAM4hxnUgAN2RrNBcDI+DLtfdM52hEExbD0AXYrKz3qvIEr6oGSKKyoxFj 0rrbP8n0eqi1C125OamKGZ7jMW2MC5RWXS/bRYAQzZw6meShgU21IPLYyOGfnsj6F725OtAFXTy pRRTLoRicuMyRqSW6R+De6xVt7/mq6UFPexQWmPg7Er0aWbF4ww1Iv8xRNtuju9hp1c4Q+iKyYp lvv1Cn/05l6JR6shMeW90qMVWCfquSQWJA7oiQ3yF8ZPnPC5BW0lJpA/te5y3NsE6ciB8zwGn2U 6F65ziTCjY+Sy391weuqghqPdqw1qUA7313/r1ZnQZMgB+4Fxj3zdkUQpSByUkeBimXlwWv0Bh2 2k+bxioFuiVYcateYk6Lmls2murBA/WJCnkbfQPXJPspdMD56Vmk5Aa3TV3PK45gRkcOGZuyCcr Kao3oOGwoIWGtVg== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT 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 with many non-standard DCS commands. The only user of this panel (the OnePlus 8T) has a bug somewhere in the DSI stack whereby it isn't possible to properly initialize this panel after a reset. As a result, the reset GPIO is made optional so it can be left unused on that device. 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 | 399 ++++++++++++++++++++++++++ 4 files changed, 416 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..945346e84f68 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-amb655x.c @@ -0,0 +1,399 @@ +// 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