From nobody Wed Nov 27 10:52:40 2024 Received: from sonic313-21.consmr.mail.ir2.yahoo.com (sonic313-21.consmr.mail.ir2.yahoo.com [77.238.179.188]) (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 81B541CEE85 for ; Thu, 10 Oct 2024 18:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.238.179.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728585730; cv=none; b=FE5RaMSgOLsM0AnfmXwPCinpJ4Y2RD7CC+W4Of3ojwJSY/xascoUxu+vpLmKRzY8TOtAVGehmzsZSxakOpkqYptTFN+Bxn+lM6TSAk0E1KvoUe8P+j+qklHVfIbTmSSizb4bC1lJFntJxEnjmMVXJqX0Mjo4DxHY3IOy4b93Ly4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728585730; c=relaxed/simple; bh=RLoASV0tuN6BS3Rlj7Ph0YGO3InAKCMnzst6WrMalQs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BClKFnB5kbC3wh8v86FS71D+fk6NkvdR5qehY94K2P6/XsgnRQSI8B1Fa/7AaMT/2mR4hiELYClRNbhFT9rsuoFSXiT3w1fj8RyBjfYI/t2Gl9wEJQ5ar0h3awVvSo3uj+kHWJ27gNp1T9Z9KDhv08zh4tI6A75TeeDFA/e74M4= 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=YTNG6IR5; arc=none smtp.client-ip=77.238.179.188 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="YTNG6IR5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1728585726; bh=VQ4NzBF3TD+BrXUOBvpilZ2FzFEEeRSPx8VYOZUJm+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=YTNG6IR58L+QoRX9ezQkkQglZ6ET+wn7C/O7lrLebzMvFkfOtzhD0+Rl13tTIUCypLZqwFnrxsynXdFIkB82iA9qkwTcx7Jv3ynVyZ5ImDkV+I7Z35bg+jxYYXvKJHOyN2vVEW/ofy6i0fGxebPcrgkj51Zskw5ygyoOPYGIbDYvj5UE8BD6CU/P6SAxCXeX9wwLGwJymUFcXJz5LInu7JtAGoiOqrgXlrrZRNnImnoljxUYVFXse50EhbY8CYI8b+akRP1clv8nb22TU3W1POVMMJ6vp3pZ8B9dIx4T243ieV5ONdrxMJOe1Okv6Q55k8lXbl48a4O4R6CybtOdNg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1728585726; bh=t+NKXkmDWLGOcZJhVj9mgI8IEtOm2dRGZfPUjB53vSM=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=I1+nJcwjF8PEqjM4T1BeSMvMxgXoirigJGSr8FE4QAWqGZbjHDPNwPg+JPy9MuLaia8B73WtMh1dJZNlrHvwDwLgqLdfe2+0jZ0se7E5GYy9WL5jLN9qydLsVi+U/zj4TahTfWr0gnXbWMYuFCypf8SXSMIGVxuaUjyI4rCgXTY7X3bl2QpwMXOodNfEGlVOIuM0Sezl+6roYE19NyGjYl98TEv9YfEKvk0CjUiv9xxiGYAMoxfKLCqxByDEOIqYia6GGZSHVKnzpOaUGpPCo08P/IyEbOW2rZb1uLOLeqkW2YKaqrNT2y7Mjd2OVGvtUm2r+ZXlci+mX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 9mlcoQNE.XLWrPVWzDq_cGXEgNd6mIgQ1YPOxBmy0WS50w8nNX2moZYkjAhlBrh_MVkFMGXW9FDm AoMpZ5lVDoJWmqr6m0trowEnLrxakWlKReSUde8wdYwSCvCuQFbFQIlikjR8rpLe3WphUgeldMCj CpOiQhTi.Du9RGDMcoAcGiBMMR2esWz8v955IaoF0OY2VOBD7IEdbobCd5wwRs.tndvMXK4yeits 4mj1SPDU8L67uSp3iLRZl.Y8EExK7MFIbbIUAtn7ZyHR58jz1lhhuPzle5Q-- X-Sonic-MF: X-Sonic-ID: c3365b06-8d82-45d8-b1b1-a24869898cf7 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Thu, 10 Oct 2024 18:42:06 +0000 Received: by hermes--production-ir2-6664f499fc-97g4x (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7a7b462d09211a1a6528a42ebeb90f61; Thu, 10 Oct 2024 18:31:58 +0000 (UTC) From: Jakob Hauser To: Neil Armstrong , Jessica Zhang , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH 2/4] drm/panel: samsung-s6e88a0-ams427ap24: Add initial driver Date: Thu, 10 Oct 2024 20:31:49 +0200 Message-Id: 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. Coulnd't read out RAW EDID, /sys/class/drm/card0-DSI-1/edid is empty. [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 --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../panel/panel-samsung-s6e88a0-ams427ap24.c | 261 ++++++++++++++++++ 3 files changed, 271 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 ddfaa99ea9dd..fa6a8c6cac5b 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -623,6 +623,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 4b5eaf111676..3002087c26d1 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -76,6 +76,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..182ba8c347e2 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung AMS427AP24 panel with S6E88A0 controller + * Copyright (c) 2024 Jakob Hauser + */ + +#include +#include +#include +#include +#include + +#include