From patchwork Mon Sep 30 20:24:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danila Tikhonov X-Patchwork-Id: 13817061 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 61085CF64BE for ; Mon, 30 Sep 2024 20:39:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA4E210E05A; Mon, 30 Sep 2024 20:39:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=jiaxyga.com header.i=@jiaxyga.com header.b="FTgTmN2/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=jiaxyga.com header.i=@jiaxyga.com header.b="J13khg8s"; dkim-atps=neutral X-Greylist: delayed 855 seconds by postgrey-1.36 at gabe; Mon, 30 Sep 2024 20:39:29 UTC Received: from fallback18.i.mail.ru (fallback18.i.mail.ru [79.137.243.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id C620C10E05A for ; Mon, 30 Sep 2024 20:39:29 +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:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=3iJcm5G5pdRzMZPFwnfcRuLnp2Ig4a9Qk118V9QfNWw=; t=1727728769;x=1727818769; b=FTgTmN2/akWSr+hqPQBtaCWFf6EHxZtmrocUK+B0TIH0vnb4D7MO5Hydq9cxDekPPPni3K03b3Kk/FsX/Ek73hZA6UkMY/gAT31KgP66z6kACtjbwqZi15+pPSpHhEw8X35ZH0oVfsHqqwY+1cJSWfCgtTSZv6qM42mdNhLX4Nk=; Received: from [10.12.4.13] (port=33338 helo=smtp38.i.mail.ru) by fallback18.i.mail.ru with esmtp (envelope-from ) id 1svMxI-00FfJ1-TW; Mon, 30 Sep 2024 23:25:17 +0300 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=3iJcm5G5pdRzMZPFwnfcRuLnp2Ig4a9Qk118V9QfNWw=; t=1727727916; x=1727817916; b=J13khg8sPS6b0/7k528ZHlZKMjyPepXsBm7vt21gMCgO9dUosXIB05ACQo4+aOdZlKpOTJA2BE4 S6XcYfAye5YOmdtYHpIrnYFgZoQ01dtr/vda5yAR4dpBDGNbxoThKUGEMwwFXzdDjNdgUNnpx3ggO GRgnaKBlmlWr1DojGNo=; Received: by exim-smtp-69fb954d46-6fqd6 with esmtpa (envelope-from ) id 1svMx4-00000000HGp-1ewK; Mon, 30 Sep 2024 23:25:02 +0300 From: Danila Tikhonov To: neil.armstrong@linaro.org, quic_jesszhan@quicinc.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@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, linux@mainlining.org, Danila Tikhonov Subject: [PATCH v3 2/2] drm/panel: Add Samsung AMS639RQ08 panel driver Date: Mon, 30 Sep 2024 23:24:48 +0300 Message-ID: <20240930202448.188051-3-danila@jiaxyga.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240930202448.188051-1-danila@jiaxyga.com> References: <20240930202448.188051-1-danila@jiaxyga.com> MIME-Version: 1.0 X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD964E86F54238FCC39B474B51A4E6CEF96B6E1A8C01776A3AB182A05F53808504045DDB624FCC7B8FE3DE06ABAFEAF670557CECC9846ABA09C1C5DC97C387795A50C4FDA321CD2EEF9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B356E3E4D202B32AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379448E89E2A57838D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8B944735CF172AB59D31576F67790544CFC91284E0CC22190CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637BA939FD1B3BAB99B389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F790063750A1A8C6A3E0B001D81D268191BDAD3DBD4B6F7A4D31EC0BE2F48590F00D11D6D81D268191BDAD3D78DA827A17800CE7266735129D8A02D6EC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5278DA827A17800CE7FE3A47D6FA29121068655334FD4449CB26055571C92BF10F35872C767BF85DA227C277FBC8AE2E8BD198C2A7CB645D0575ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-B7AD71C0: 4965CFDFE05191347903E2BF2CCE50FB42605BC54A9F883B79311020FFC8D4AD661A7FFD632DF40A1C98BA224982BC1D X-C1DE0DAB: 0D63561A33F958A514BA70B046477A495002B1117B3ED6967BA080C80CE7C997AD0703CEB2EF9A27823CB91A9FED034534781492E4B8EEAD688A4496B03D38F1C79554A2A72441328621D336A7BC284946AD531847A6065AED8438A78DFE0A9EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD75DCE07D45A749953FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF3E5F8F9191A50C370546920E730F923CF132E09F4173EADD7071ED3560597856792D7E5D32AAB0D0A06F21331F7F71AFB02C33038ABADD5CDAB1623086507E5B763C1008CBEFAD170D035775BAD7A4FF02C26D483E81D6BE72B480F99247062FEE42F474E8A1C6FD34D382445848F2F3 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojNqGc3Zc5qMln5xvmk5an3A== X-Mailru-Sender: 0A26D9779F8DDEAB5292BC5C4A2F209372733F1AA10A11B1B951B70A5BD4BD8E103F0513A1107EB8BDDB26EEA8DAF3A6210985D6C440852E55B4A2144138A88088F510C62CFD139357C462056C5AD9112068022A3E05D37EB4A721A3011E896F X-Mras: Ok X-7564579A: 646B95376F6C166E X-77F55803: 6242723A09DB00B4CB1E8E83197BFF842CA3A8D249ED4F83C5BD1728C4FF32B468F3CF0E9FE49B6959AB7659C5DDE2DEBCEDFC9A423E898E8E4CB8C0AE79338B48A0BA594134B869 X-7FA49CB5: 0D63561A33F958A588EC9361796EB5D69D4AFCDFE72AEA169498B130C8598D378941B15DA834481FA18204E546F3947CEE16715F795C715CF6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637C3E95B63A1FCE889389733CBF5DBD5E9B5C8C57E37DE458BD96E472CDF7238E0725E5C173C3A84C39B1AFFD6BD8BDD3135872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojNqGc3Zc5qMm/rhtqZxTKFg== X-Mailru-MI: 8000000000000800 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 | 329 ++++++++++++++++++ 3 files changed, 339 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 d3a9a9fafe4e..c5167b4fa589 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -614,6 +614,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 987a08702410..1a7a2ee394ec 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -62,6 +62,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 000000000000..817365cb5e46 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-ams639rq08.c @@ -0,0 +1,329 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2024, Danila Tikhonov + */ + +#include +#include +#include +#include +#include +#include + +#include