From nobody Tue Nov 26 02:45:20 2024 Received: from sonic312-26.consmr.mail.ir2.yahoo.com (sonic312-26.consmr.mail.ir2.yahoo.com [77.238.178.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE6E21CFEDD for ; Tue, 22 Oct 2024 21:54:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.238.178.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729634049; cv=none; b=jYdLN8b5EY1maDEA6TsjaYutxeo+UhmsxLP5+ULx6PO8qrTMLQBEW9WfFn/M3oI+WTVQFBIPAVFhwVBSehZSto0R9ESPGXnUm5kVRSOjnCvF34Xe9qvymZKEwG+CEWF/2b4c6mBsHEL1PC8Eu5+MW1Ny2oiWT/YawEzizAPaylg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729634049; c=relaxed/simple; bh=g++a2B4CheVBx4WzXBzPoWNad5FRHHEhfwrEmacF3wg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cWzBDoLGJVJau2TqmWRPa1d9daZ9Ipg6k5gThS1DDQIdZ/JrkFobLQjAP3lAxTo65HFJQ/mHWIpzKJMF3mF8ZFa/s/zis68s0zWRaR+lVIuyYcAQJG4fFOFSMiMY3JqDvOZUYCMc93fSdeCdtXMrmJ4arpjVu8ZVIUUkKV+NQW8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rocketmail.com; spf=pass smtp.mailfrom=rocketmail.com; dkim=pass (2048-bit key) header.d=rocketmail.com header.i=@rocketmail.com header.b=LxvPr0FO; arc=none smtp.client-ip=77.238.178.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rocketmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rocketmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rocketmail.com header.i=@rocketmail.com header.b="LxvPr0FO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1729634045; bh=70QVeRtyDiMg9KxW5Djk0oZQv4ngnf+PlKtHAYt3mCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=LxvPr0FOcJICBO2IeCDVLNMwU8d4Z6SHwfO4CWPwT9g8FmHC8Zj/kKj578KNt2LzLJtGQ/IS/pP8ZU0moGByR9wv7/rq83KZb5tqRwpN699sIkPD07GMGE0PMak6wGYPdWrZ9QYj2ivlf9OqGNOc/QYnQlh8UkVM7PCdhfmvha3RyUpbCloiwbziUaTPOLn+62eOKn4/YfVEYy/1Wd85qmAkXmAfUDf+46Zp68QdFOj1j9Bk8jA8r/a72VZ4JifefsCJVcgUAHJ6pyaSTeLnJS55AZciRnboiC5O6lmOG5x388EEyQsk2sysAVikVGkCvBfSfaOTmcoYtukalpOQww== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729634045; bh=IxYM/RT8HeIOxvp2A33FbYbi7vLghRjR/vY6Ns1cMw0=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=HE0l71184C9IRog4jiMDWcSQpO3Vz5H0M98WIsb1FzxVzyl7ez42+P1qkA/1iqn3ipu2gZbeqGx0IfYkRk7XAMZqOPukDPjCAEHYuCYYLqBjNolKLG+cpTdWsJAmArsuT7bcj/cGsYlv8WhiAF/tStRGEojltzilOK6DSBlAizCnj6bRlgNvnkh9GjG7X6nGsLa7dujhPPH8kk5sU14ehwn050IzG6Sm0ndIrO/cA6kyUA5AEyWTZGbA2NjiLgo/Jl4RYJAxcveX1faamH5MC4KFeKxNakMQu6cP5IA2/l/bA2013dYakbs7IXmrrzQsnRSQfU4eSwTUlLPkyFuj/Q==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GMbjTaFNvDvAZVqy1hEsgxJ1HOuVFIHgoVaWZ1lO7vau20JjosgZHQFSjp E4eA0FnWsDlgLKrAd40rL8Qb1DH3dSrUXP_OkE9XU4gjuYNTJ3kFbpjbzKSKfLIDZ_gteivwvfie yTis_nnbaV_jZvNd1PQFG_4dbvgxGj1udm5MgKZuaNdFqUjuC2SqEz0RScImWN1guop9qwYjCCHq 9ayF84bDUzPcMaEWUyObH2UHPLOjoQ_bJDs4Ty7u.4TAMNymGJA-- X-Sonic-MF: X-Sonic-ID: 35b9d1d3-400a-4fc6-b194-8a75753c9daf Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Tue, 22 Oct 2024 21:54:05 +0000 Received: by hermes--production-ir2-c694d79d9-qjs6q (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 00a5d0a4af66107c7c1614b6d685cac8; Tue, 22 Oct 2024 21:33:46 +0000 (UTC) From: Jakob Hauser To: Neil Armstrong , Jessica Zhang , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Thierry Reding , Laurent Pinchart , Andrzej Hajda , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH v2 3/5] drm/panel: samsung-s6e88a0-ams427ap24: Add initial driver Date: Tue, 22 Oct 2024 23:33:37 +0200 Message-Id: <3a7d3e17e37819fa0a198a37d0c2f54de7b93971.1729630039.git.jahau@rocketmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This initial part of the panel driver was mostly generated by the "linux-mdss-dsi-panel-driver-generator" tool [1], reading downstream Android kernel file "dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi" [2]. On top of the generic output of the tool, there were a couple of changes applied: - Added mipi_dsi_dcs_set_display_on() to function s6e88a0_ams427ap24_on(), otherwise the display does not show up. - In functions s6e88a0_ams427ap24_on() and s6e88a0_ams427ap24_off() changed DSI commands to multi context and used "accum_err" returns. - In functions s6e88a0_ams427ap24_on() and s6e88a0_ams427ap24_off() replaced msleep() by mipi_dsi_msleep(). - The function s6e88a0_ams427ap24_get_modes() was changed to make use of drm_connector_helper_get_modes_fixed(). This also required to include drm/drm_probe_helper.h. - In function s6e88a0_ams427ap24_probe() registring the regulators was chan= ged to devm_regulator_bulk_get_const(). This required to change supplies in s= truct s6e88a0_ams427ap24 to a pointer. - Removed bool "prepared" from struct s6e88a0_ams427ap24 and instead used framework-provided "panel->prepared" in functions s6e88a0_ams427ap24_prep= are() and s6e88a0_ams427ap24_unprepare(). [1] https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generat= or [2] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/dri= vers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24= _qhd_octa_video.dtsi Signed-off-by: Jakob Hauser --- Coulnd't read out RAW EDID, /sys/class/drm/card0-DSI-1/edid is empty. Changes in v2: - Removed bool "prepared" from struct s6e88a0_ams427ap24 and instead used framework-provided "panel->prepared" in functions s6e88a0_ams427ap24_pre= pare() and s6e88a0_ams427ap24_unprepare(). Mentioned this in the commit message. --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../panel/panel-samsung-s6e88a0-ams427ap24.c | 260 ++++++++++++++++++ 3 files changed, 270 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index bce4cb64184a..f8adc38447fb 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -632,6 +632,15 @@ config DRM_PANEL_SAMSUNG_AMS639RQ08 Say Y or M here if you want to enable support for the Samsung AMS639RQ08 FHD Plus (2340x1080@60Hz) CMD mode panel. =20 +config DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24 + tristate "Samsung AMS427AP24 panel with S6E88A0 controller" + depends on GPIOLIB && OF && REGULATOR + depends on DRM_MIPI_DSI + help + Say Y here if you want to enable support for Samsung AMS427AP24 panel + with S6E88A0 controller (found in Samsung Galaxy S4 Mini Value Edition + GT-I9195I). To compile this driver as a module, choose M here. + 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 4db02c2411ae..7dcf72646cac 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -77,6 +77,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) +=3D panel-sam= sung-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) +=3D panel-samsung-s6e63m0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_SPI) +=3D panel-samsung-s6e63m0-spi= .o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI) +=3D panel-samsung-s6e63m0-dsi= .o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24) +=3D panel-samsung-s6e8= 8a0-ams427ap24.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) +=3D panel-samsung-s6e8= 8a0-ams452ef01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) +=3D panel-samsung-s6e8aa0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF00) +=3D panel-samsung-sofef00.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c b/dri= vers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c new file mode 100644 index 000000000000..0ab2768e0e2b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c @@ -0,0 +1,260 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung AMS427AP24 panel with S6E88A0 controller + * Copyright (c) 2024 Jakob Hauser + */ + +#include +#include +#include +#include +#include + +#include