From patchwork Wed Jun 12 08:34:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danila Tikhonov X-Patchwork-Id: 13694641 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 250B0C27C75 for ; Wed, 12 Jun 2024 08:34:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B835D10E7D2; Wed, 12 Jun 2024 08:34:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jiaxyga.com header.i=@jiaxyga.com header.b="ulswbu1H"; dkim-atps=neutral Received: from smtp16.i.mail.ru (smtp16.i.mail.ru [95.163.41.69]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8DB0A10E7CA for ; Wed, 12 Jun 2024 08:34:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=jiaxyga.com ; s=mailru; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:From:Sender:Reply-To:To:Cc:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive: X-Cloud-Ids:Disposition-Notification-To; bh=oqluNzAu9FoFII29qH8cTPlFyKHLBzSkfLu3+aV7hrE=; t=1718181258; x=1718271258; b=ulswbu1H9VUkYArhSAEHANpz0vNow39fRADfgOiKE8BL126Bvc5yoauJawWkwE7hHrrmxyd4KeR ozYX7Iuom2wzRiKUg7+nwl2GRykGitdlsXGHNvTFixGp4BHWRHO1TgpXdYqRmSKv9jyrYhZtaQbDA c9Cj9+W8x6bidX1OKaI=; Received: by smtp16.i.mail.ru with esmtpa (envelope-from ) id 1sHJQu-00000006Iqv-1D4p; Wed, 12 Jun 2024 11:34:16 +0300 From: Danila Tikhonov To: neil.armstrong@linaro.org, quic_jesszhan@quicinc.com, sam@ravnborg.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, adrian@travitia.xyz, degdagmohamed@gmail.com, Danila Tikhonov Subject: [PATCH v2 2/2] drm/panel: Add Samsung AMS639RQ08 panel driver Date: Wed, 12 Jun 2024 11:34:05 +0300 Message-ID: <20240612083405.15750-3-danila@jiaxyga.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612083405.15750-1-danila@jiaxyga.com> References: <20240612083405.15750-1-danila@jiaxyga.com> MIME-Version: 1.0 Authentication-Results: smtp16.i.mail.ru; auth=pass smtp.auth=danila@jiaxyga.com smtp.mailfrom=danila@jiaxyga.com X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9AC8CA0B4439200FA3396D26EA105C0471DE01117BA8131F700894C459B0CD1B99482E7B7D5FC789D87FE86DE270AD9EE7DA64669BD8F541C18367D251A7F91BD1E35E39F85F323EC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E439DB85B4CC0F53EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063727C65896DA7AF7D78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8038B8C6B35619D6105E8BD7C2AB4DD11DB43DD82ECE0887ECC7F00164DA146DAFE8445B8C89999728AA50765F7900637DCE3DBD6F8E38AFD389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8A9FF340AA05FB58CF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C10A7BA5215B3CCEC6136E347CC761E074AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3E2B0921DE55F4073BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B6957A4DEDD2346B4275ECD9A6C639B01B78DA827A17800CE7AEA1580DED4E70E3731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5E3DA7D379BB9B0585002B1117B3ED696947A839CC9B7DDD68D59E407A97E9958823CB91A9FED034534781492E4B8EEADF94D3DC5184210B4C79554A2A72441328621D336A7BC284946AD531847A6065AED8438A78DFE0A9EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF3A557326F3BBA7107D775F2FFA951AEEEE420329849C0A3803D038B532554971265F63FF884E79B304A26A3878DC13306DF1B459DB5CA71D1DB24A82BF7F4F2272FABE6F497FC5360D035775BAD7A4FF02C26D483E81D6BE72B480F99247062FEE42F474E8A1C6FD34D382445848F2F3 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj7p5wIdCuWKM+xQE68OQa5A== X-Mailru-Sender: 9EB879F2C80682A09F26F806C7394981B214AC7FA6C30164A7CF1FCFAF80C0E91E834379425F4AEF6E6A5B9EC695DC762C62728BC403A049225EC17F3711B6CF1A6F2E8989E84EC137BFB0221605B344978139F6FA5A77F05FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok 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" Add the driver for Samsung AMS639RQ08 FHD Plus CMD mode panel support found in: - Xiaomi Mi 9 Lite / CC9 (sdm710-xiaomi-pyxis) - Xiaomi Mi 9T / Redmi K20 (sm7150-xiaomi-davinci) - Xiaomi Mi 9T Pro / Redmi K20 Pro (sm8150-xiaomi-raphael) Tested-by: Degdag Mohamed # xiaomi-raphael Tested-by: Jens Reidel # xiaomi-davinci Signed-off-by: Danila Tikhonov Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-samsung-ams639rq08.c | 362 ++++++++++++++++++ 3 files changed, 372 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-ams639rq08.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2ae0eb0638f32..8a86960ae812a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -576,6 +576,15 @@ config DRM_PANEL_RONBO_RB070D30 Say Y here if you want to enable support for Ronbo Electronics RB070D30 1024x600 DSI panel. +config DRM_PANEL_SAMSUNG_AMS639RQ08 + tristate "Samsung AMS639RQ08 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y or M here if you want to enable support for the + Samsung AMS639RQ08 FHD Plus (2340x1080@60Hz) CMD mode panel. + config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 tristate "Samsung AMS452EF01 panel with S6E88A0 DSI video mode controller" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f0203f6e02f44..eb87bc01b0414 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -58,6 +58,7 @@ 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_AMS639RQ08) += panel-samsung-ams639rq08.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 diff --git a/drivers/gpu/drm/panel/panel-samsung-ams639rq08.c b/drivers/gpu/drm/panel/panel-samsung-ams639rq08.c new file mode 100644 index 0000000000000..f9789fdd6c326 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-ams639rq08.c @@ -0,0 +1,362 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2024, Danila Tikhonov + */ + +#include +#include +#include +#include +#include +#include + +#include