From: Alexandre Mergnat <amergnat@baylibre.com>
To: "Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Jitao Shi" <jitao.shi@mediatek.com>,
"CK Hu" <ck.hu@mediatek.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>
Cc: dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org,
linux-clk@vger.kernel.org,
Alexandre Mergnat <amergnat@baylibre.com>
Subject: [PATCH v2 14/18] drm/mediatek: add mt8365 dpi support
Date: Tue, 16 Apr 2024 17:53:15 +0200 [thread overview]
Message-ID: <20231023-display-support-v2-14-33ce8864b227@baylibre.com> (raw)
In-Reply-To: <20231023-display-support-v2-0-33ce8864b227@baylibre.com>
- Add compatibles and platform data into the Mediatek DPI driver.
- Fix the DPI0 parent clock to be consistent.
This SoC is compatible with the mt8183 calculate factor.
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
drivers/clk/mediatek/clk-mt8365-mm.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mt8365-mm.c b/drivers/clk/mediatek/clk-mt8365-mm.c
index 01a2ef8f594e..3f62ec750733 100644
--- a/drivers/clk/mediatek/clk-mt8365-mm.c
+++ b/drivers/clk/mediatek/clk-mt8365-mm.c
@@ -53,7 +53,7 @@ static const struct mtk_gate mm_clks[] = {
GATE_MM0(CLK_MM_MM_DSI0, "mm_dsi0", "mm_sel", 17),
GATE_MM0(CLK_MM_MM_DISP_RDMA1, "mm_disp_rdma1", "mm_sel", 18),
GATE_MM0(CLK_MM_MM_MDP_RDMA1, "mm_mdp_rdma1", "mm_sel", 19),
- GATE_MM0(CLK_MM_DPI0_DPI0, "mm_dpi0_dpi0", "vpll_dpix", 20),
+ GATE_MM0(CLK_MM_DPI0_DPI0, "mm_dpi0_dpi0", "dpi0_sel", 20),
GATE_MM0(CLK_MM_MM_FAKE, "mm_fake", "mm_sel", 21),
GATE_MM0(CLK_MM_MM_SMI_COMMON, "mm_smi_common", "mm_sel", 22),
GATE_MM0(CLK_MM_MM_SMI_LARB0, "mm_smi_larb0", "mm_sel", 23),
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index beb7d9d08e97..a4f9376ee472 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -997,6 +997,23 @@ static const struct mtk_dpi_conf mt8195_dpintf_conf = {
.csc_enable_bit = DPINTF_CSC_ENABLE,
};
+static const struct mtk_dpi_conf mt8365_conf = {
+ .cal_factor = mt8183_calculate_factor,
+ .reg_h_fre_con = 0xe0,
+ .max_clock_khz = 150000,
+ .output_fmts = mt8183_output_fmts,
+ .num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
+ .pixels_per_iter = 1,
+ .is_ck_de_pol = true,
+ .swap_input_support = true,
+ .support_direct_pin = true,
+ .dimension_mask = HPW_MASK,
+ .hvsize_mask = HSIZE_MASK,
+ .channel_swap_shift = CH_SWAP,
+ .yuv422_en_bit = YUV422_EN,
+ .csc_enable_bit = CSC_ENABLE,
+};
+
static int mtk_dpi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -1092,6 +1109,7 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
{ .compatible = "mediatek,mt8188-dp-intf", .data = &mt8195_dpintf_conf },
{ .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf },
{ .compatible = "mediatek,mt8195-dp-intf", .data = &mt8195_dpintf_conf },
+ { .compatible = "mediatek,mt8365-dpi", .data = &mt8365_conf },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids);
--
2.25.1
next prev parent reply other threads:[~2024-04-16 15:53 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 15:53 [PATCH v2 00/18] Add display support for the MT8365-EVK board Alexandre Mergnat
2024-04-16 15:53 ` [PATCH v2 01/18] dt-bindings: display: mediatek: aal: add compatible for MT8365 SoC Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:43 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 02/18] dt-bindings: display: mediatek: ccorr: " Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:43 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 03/18] dt-bindings: display: mediatek: color: " Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:43 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 04/18] dt-bindings: display: mediatek: dither: " Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:43 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 05/18] dt-bindings: display: mediatek: dsi: " Alexandre Mergnat
2024-04-17 10:21 ` AngeloGioacchino Del Regno
2024-04-17 18:44 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 06/18] dt-bindings: display: mediatek: dpi: add power-domains property amergnat
2024-04-17 10:15 ` AngeloGioacchino Del Regno
2024-04-17 18:44 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 07/18] dt-bindings: display: mediatek: dpi: add compatible for MT8365 Alexandre Mergnat
2024-04-17 10:14 ` AngeloGioacchino Del Regno
2024-04-16 15:53 ` [PATCH v2 08/18] dt-bindings: display: mediatek: gamma: add compatible for MT8365 SoC Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:47 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 09/18] dt-bindings: display: mediatek: ovl: " Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:47 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 10/18] dt-bindings: display: mediatek: rdma: " Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 18:48 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 11/18] dt-bindings: pwm: mediatek,pwm-disp: add power-domains property Alexandre Mergnat
2024-04-17 8:01 ` Uwe Kleine-König
2024-04-17 8:06 ` Alexandre Mergnat
2024-04-17 10:19 ` AngeloGioacchino Del Regno
2024-04-17 13:25 ` Uwe Kleine-König
2024-04-17 13:50 ` AngeloGioacchino Del Regno
2024-04-16 15:53 ` [PATCH v2 12/18] dt-bindings: pwm: mediatek,pwm-disp: add compatible for mt8365 SoC Alexandre Mergnat
2024-04-17 8:06 ` Uwe Kleine-König
2024-04-18 9:46 ` Alexandre Mergnat
2024-04-18 16:05 ` Uwe Kleine-König
2024-04-17 18:48 ` Rob Herring
2024-04-16 15:53 ` [PATCH v2 13/18] drm/mediatek: dsi: Improves the DSI lane setup robustness Alexandre Mergnat
2024-04-16 15:53 ` Alexandre Mergnat [this message]
2024-04-17 10:14 ` [PATCH v2 14/18] drm/mediatek: add mt8365 dpi support AngeloGioacchino Del Regno
2024-04-16 15:53 ` [PATCH v2 15/18] drm/mediatek: add MT8365 SoC support amergnat
2024-04-16 15:53 ` [PATCH v2 16/18] arm64: defconfig: enable display connector support Alexandre Mergnat
2024-04-16 15:53 ` [PATCH v2 17/18] arm64: dts: mediatek: add display blocks support for the MT8365 SoC Alexandre Mergnat
2024-04-17 10:27 ` AngeloGioacchino Del Regno
2024-04-16 15:53 ` [PATCH v2 18/18] arm64: dts: mediatek: add display support for mt8365-evk Alexandre Mergnat
2024-04-17 10:27 ` AngeloGioacchino Del Regno
2024-04-18 13:02 ` Alexandre Mergnat
2024-04-17 7:58 ` [PATCH v2 00/18] Add display support for the MT8365-EVK board Uwe Kleine-König
2024-04-17 8:12 ` Alexandre Mergnat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231023-display-support-v2-14-33ce8864b227@baylibre.com \
--to=amergnat@baylibre.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=catalin.marinas@arm.com \
--cc=chunkuang.hu@kernel.org \
--cc=ck.hu@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jitao.shi@mediatek.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=tzimmermann@suse.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).