* [PATCH v2 0/4] Add support for the mt8167 display pipeline
@ 2026-09-21 11:38 Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Luca Leonardo Scorcia @ 2026-09-21 11:38 UTC (permalink / raw)
To: linux-mediatek
Cc: Luca Leonardo Scorcia, Chun-Kuang Hu, Philipp Zabel,
David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
CK Hu, Jitao shi, dri-devel, devicetree, linux-kernel,
linux-arm-kernel
This series adds support for (almost) all display blocks of mt8167.
This SoC supports a DSI or DPI display and has HDMI output via a second
DPI block wired to the HDMI phy.
All the hard work was already upstreamed in the past, now all that's left
is some glue. In the first two patches we add support for the DPI output
blocks. In the third one we describe all the possible combinations of the
SoC display pipeline and in the last one we add the required nodes to the
SoC dtsi.
The final outputs of the display pipeline in the SoC dtsi are
intentionally left not connected to allow board dts to specify their
own output node.
I said almost all display blocks because HDMI output is not included in
this patch. I have it tested and working at all supported resolutions, but
since it needs some fixes in clocks and a new phy driver, I will send it
in a separate series.
The series has been tested on a Lenovo Smart Clock 2 (DSI), a Xiaomi Mi
Smart Clock 2 (DSI), and a Sony Playstation Classic Mini (HDMI via DPI).
Unfortunately I couldn't find an actual device using a DPI display, but
since DPI1-HDMI works, I feel confident saying that the clocks divisors
are correct.
Changes in v2:
- Fixed some copy-and-paste error in MMSYS routes spotted by Sashiko [2].
Initial version: [1]
[1] https://lore.kernel.org/linux-mediatek/20260918175736.355305-1-l.scorcia@gmail.com/
[2] https://sashiko.dev/#/message/20260918180358.81A1D1F000FF%40smtp.kernel.org
Luca Leonardo Scorcia (4):
dt-bindings: display: mediatek: dpi: Add compatible for mt8167
drm/mediatek: Add support for mt8167 Digital Parallel Interface
soc: mediatek: mt8167-mmsys: add routes for all display paths
arm64: dts: mediatek: mt8167: Add DRM nodes
.../display/mediatek/mediatek,dpi.yaml | 1 +
arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 ++++++++++++++++++
drivers/gpu/drm/mediatek/mtk_dpi.c | 23 ++
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +
drivers/soc/mediatek/mt8167-mmsys.h | 193 ++++++++-
5 files changed, 579 insertions(+), 9 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-09-21 11:38 [PATCH v2 0/4] Add support for the mt8167 display pipeline Luca Leonardo Scorcia
@ 2026-09-21 11:38 ` Luca Leonardo Scorcia
2026-09-25 13:24 ` Krzysztof Kozlowski
` (2 more replies)
2026-09-21 11:38 ` [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface Luca Leonardo Scorcia
` (2 subsequent siblings)
3 siblings, 3 replies; 19+ messages in thread
From: Luca Leonardo Scorcia @ 2026-09-21 11:38 UTC (permalink / raw)
To: linux-mediatek
Cc: Luca Leonardo Scorcia, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
MediaTek mt8167 SoC has two Digital Parallel Interface (DPI) blocks,
one can be routed to a DPI display while the other is wired to the HDMI
block. They are not compatible with any other device, so add a new
compatible to describe them in the device tree.
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
.../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
index eb4f276e8dc4..6cd96a5cd4ae 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
@@ -21,6 +21,7 @@ properties:
- enum:
- mediatek,mt2701-dpi
- mediatek,mt7623-dpi
+ - mediatek,mt8167-dpi
- mediatek,mt8173-dpi
- mediatek,mt8183-dpi
- mediatek,mt8186-dpi
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface
2026-09-21 11:38 [PATCH v2 0/4] Add support for the mt8167 display pipeline Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
@ 2026-09-21 11:38 ` Luca Leonardo Scorcia
2026-11-16 15:05 ` Chun-Kuang Hu
2026-09-21 11:38 ` [PATCH v2 3/4] soc: mediatek: mt8167-mmsys: add routes for all display paths Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes Luca Leonardo Scorcia
3 siblings, 1 reply; 19+ messages in thread
From: Luca Leonardo Scorcia @ 2026-09-21 11:38 UTC (permalink / raw)
To: linux-mediatek
Cc: Luca Leonardo Scorcia, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, David Airlie, Simona Vetter, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
Add support for the two DPI blocks found in the mt8167 SoCs. One of them
can be routed to a DPI connector and another is directly connected to the
HDMI IP.
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 23 +++++++++++++++++++++++
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++
2 files changed, 25 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 0e4f430de983..9012adeb63d0 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -1114,6 +1114,10 @@ static const struct mtk_dpi_factor dpi_factor_mt2701[] = {
{ 64000, 4 }, { 128000, 2 }, { U32_MAX, 1 }
};
+static const struct mtk_dpi_factor dpi_factor_mt8167[] = {
+ { 64000, 16 }, { 74250, 8 }, { 160000, 4 }, { U32_MAX, 2 }
+};
+
static const struct mtk_dpi_factor dpi_factor_mt8173[] = {
{ 27000, 48 }, { 84000, 24 }, { 167000, 12 }, { U32_MAX, 6 }
};
@@ -1163,6 +1167,24 @@ static const struct mtk_dpi_conf mt2701_conf = {
.csc_enable_bit = CSC_ENABLE,
};
+static const struct mtk_dpi_conf mt8167_conf = {
+ .dpi_factor = dpi_factor_mt8167,
+ .num_dpi_factor = ARRAY_SIZE(dpi_factor_mt8167),
+ .reg_h_fre_con = 0xe0,
+ .max_clock_khz = 150000,
+ .output_fmts = mt8173_output_fmts,
+ .num_output_fmts = ARRAY_SIZE(mt8173_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 const struct mtk_dpi_conf mt8183_conf = {
.dpi_factor = dpi_factor_mt8183,
.num_dpi_factor = ARRAY_SIZE(dpi_factor_mt8183),
@@ -1342,6 +1364,7 @@ static void mtk_dpi_remove(struct platform_device *pdev)
static const struct of_device_id mtk_dpi_of_ids[] = {
{ .compatible = "mediatek,mt2701-dpi", .data = &mt2701_conf },
+ { .compatible = "mediatek,mt8167-dpi", .data = &mt8167_conf },
{ .compatible = "mediatek,mt8173-dpi", .data = &mt8173_conf },
{ .compatible = "mediatek,mt8183-dpi", .data = &mt8183_conf },
{ .compatible = "mediatek,mt8186-dpi", .data = &mt8186_conf },
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index c86a3f54f35b..64c87221d931 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -802,6 +802,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
.data = (void *)MTK_DPI },
{ .compatible = "mediatek,mt8167-dsi",
.data = (void *)MTK_DSI },
+ { .compatible = "mediatek,mt8167-dpi",
+ .data = (void *)MTK_DPI },
{ .compatible = "mediatek,mt8173-dpi",
.data = (void *)MTK_DPI },
{ .compatible = "mediatek,mt8183-dpi",
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 3/4] soc: mediatek: mt8167-mmsys: add routes for all display paths
2026-09-21 11:38 [PATCH v2 0/4] Add support for the mt8167 display pipeline Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface Luca Leonardo Scorcia
@ 2026-09-21 11:38 ` Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes Luca Leonardo Scorcia
3 siblings, 0 replies; 19+ messages in thread
From: Luca Leonardo Scorcia @ 2026-09-21 11:38 UTC (permalink / raw)
To: linux-mediatek
Cc: Luca Leonardo Scorcia, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, David Airlie, Simona Vetter, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
mt8167 display output pipeline can be configured in many different ways.
Add support for additional routes according to the SoC data sheet and
Android sources. There's a few inconsistencies between those two, but
assume the Android sources are correct since they are required to drive
HDMI output via DPI1.
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/soc/mediatek/mt8167-mmsys.h | 193 ++++++++++++++++++++++++++--
1 file changed, 184 insertions(+), 9 deletions(-)
diff --git a/drivers/soc/mediatek/mt8167-mmsys.h b/drivers/soc/mediatek/mt8167-mmsys.h
index 001379373507..7da81b668871 100644
--- a/drivers/soc/mediatek/mt8167-mmsys.h
+++ b/drivers/soc/mediatek/mt8167-mmsys.h
@@ -5,35 +5,210 @@
#define MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN 0x030
#define MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN 0x038
+#define MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN 0x03c
#define MT8167_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN 0x058
+#define MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN 0x05c
+#define MT8167_DISP_REG_CONFIG_DISP_UFOE_SEL_IN 0x060
#define MT8167_DISP_REG_CONFIG_DISP_DSI0_SEL_IN 0x064
+#define MT8167_DISP_REG_CONFIG_DISP_DPI0_SEL_IN 0x068
#define MT8167_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN 0x06c
+#define MT8167_DISP_REG_CONFIG_DISP_RDMA1_SOUT_SEL_IN 0x070
+#define MT8167_DISP_REG_CONFIG_DISP_DPI1_SEL_IN 0x074
+
+#define MT8167_OVL0_MOUT_EN_COLOR0 0x1
+#define MT8167_OVL0_MOUT_EN_WDMA0 0x2
+#define MT8167_OVL0_MOUT_EN_MASK 0x3
#define MT8167_DITHER_MOUT_EN_RDMA0 0x1
+#define MT8167_DITHER_MOUT_EN_UFOE 0x2
+#define MT8167_DITHER_MOUT_EN_WDMA0 0x4
#define MT8167_DITHER_MOUT_EN_MASK 0x7
-#define MT8167_RDMA0_SOUT_DSI0 0x2
-#define MT8167_RDMA0_SOUT_MASK 0x3
+#define MT8167_UFOE_MOUT_EN_DSI0 0x1
+#define MT8167_UFOE_MOUT_EN_DPI0 0x2
+/*
+ * For some reason Android sources and the data sheet don't agree here,
+ * the data sheet has UFOE_MOUT_EN_WDMA0 as 0x4 and does not mention DPI1.
+ */
+#define MT8167_UFOE_MOUT_EN_DPI1 0x4
+#define MT8167_UFOE_MOUT_EN_WDMA0 0x8
+#define MT8167_UFOE_MOUT_EN_MASK 0xF
+
+#define MT8167_COLOR0_SEL_IN_RDMA0 0x0
+#define MT8167_COLOR0_SEL_IN_OVL0 0x1
+#define MT8167_COLOR0_SEL_IN_MASK 0x1
+
+#define MT8167_WDMA0_SEL_IN_OVL0 0x0
+#define MT8167_WDMA0_SEL_IN_DITHER 0x1
+#define MT8167_WDMA0_SEL_IN_UFOE 0x2
+#define MT8167_WDMA0_SEL_IN_MASK 0x3
+
+#define MT8167_UFOE_SEL_IN_RDMA0 0x0
+#define MT8167_UFOE_SEL_IN_DITHER 0x1
+#define MT8167_UFOE_SEL_IN_MASK 0x1
+#define MT8167_DSI0_SEL_IN_UFOE 0x0
#define MT8167_DSI0_SEL_IN_RDMA0 0x1
+#define MT8167_DSI0_SEL_IN_RDMA1 0x2
#define MT8167_DSI0_SEL_IN_MASK 0x3
+#define MT8167_DPI0_SEL_IN_UFOE 0x0
+#define MT8167_DPI0_SEL_IN_RDMA0 0x1
+#define MT8167_DPI0_SEL_IN_RDMA1 0x2
+#define MT8167_DPI0_SEL_IN_MASK 0x3
+
+#define MT8167_DPI1_SEL_IN_UFOE 0x0
+#define MT8167_DPI1_SEL_IN_RDMA0 0x1
+#define MT8167_DPI1_SEL_IN_RDMA1 0x2
+#define MT8167_DPI1_SEL_IN_MASK 0x3
+
+#define MT8167_RDMA0_SOUT_UFOE 0x0
+#define MT8167_RDMA0_SOUT_COLOR0 0x1
+#define MT8167_RDMA0_SOUT_DSI0 0x2
+#define MT8167_RDMA0_SOUT_DPI0 0x3
+/* DPI1 is only defined in Android sources, not in the data sheet */
+#define MT8167_RDMA0_SOUT_DPI1 0x4
+#define MT8167_RDMA0_SOUT_MASK 0x7
+
+#define MT8167_RDMA1_SOUT_DSI0 0x0
+#define MT8167_RDMA1_SOUT_DPI0 0x1
+/* DPI1 is only defined in Android sources, not in the data sheet */
+#define MT8167_RDMA1_SOUT_DPI1 0x2
+#define MT8167_RDMA1_SOUT_MASK 0x3
+
static const struct mtk_mmsys_routes mt8167_mmsys_routing_table[] = {
+ /* OVL0<->COLOR0 */
MMSYS_ROUTE(OVL, 0, COLOR, 0,
- MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, OVL0_MOUT_EN_COLOR0,
- OVL0_MOUT_EN_COLOR0),
+ MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, MT8167_OVL0_MOUT_EN_MASK,
+ MT8167_OVL0_MOUT_EN_COLOR0),
+ MMSYS_ROUTE(OVL, 0, COLOR, 0,
+ MT8167_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN, MT8167_COLOR0_SEL_IN_MASK,
+ MT8167_COLOR0_SEL_IN_OVL0),
+
+ /* OVL0<->WDMA0 */
+ MMSYS_ROUTE(OVL, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, MT8167_OVL0_MOUT_EN_MASK,
+ MT8167_OVL0_MOUT_EN_WDMA0),
+ MMSYS_ROUTE(OVL, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_WDMA0_SEL_IN_MASK,
+ MT8167_WDMA0_SEL_IN_OVL0),
+
+ /* DITHER0 output to RDMA */
MMSYS_ROUTE(DITHER, 0, RDMA, 0,
MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_MASK,
MT8167_DITHER_MOUT_EN_RDMA0),
- MMSYS_ROUTE(OVL, 0, COLOR, 0,
- MT8167_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN, COLOR0_SEL_IN_OVL0,
- COLOR0_SEL_IN_OVL0),
- MMSYS_ROUTE(RDMA, 0, DSI, 0,
+
+ /* DITHER<->UFOE */
+ MMSYS_ROUTE(DITHER, 0, UFOE, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_MASK,
+ MT8167_DITHER_MOUT_EN_UFOE),
+ MMSYS_ROUTE(DITHER, 0, UFOE, 0,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_SEL_IN, MT8167_UFOE_SEL_IN_MASK,
+ MT8167_UFOE_SEL_IN_DITHER),
+
+ /* DITHER<->WDMA */
+ MMSYS_ROUTE(DITHER, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_MASK,
+ MT8167_DITHER_MOUT_EN_WDMA0),
+ MMSYS_ROUTE(DITHER, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_WDMA0_SEL_IN_MASK,
+ MT8167_WDMA0_SEL_IN_DITHER),
+
+ /* UFOE<->DSI0 */
+ MMSYS_ROUTE(UFOE, 0, DSI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_UFOE_MOUT_EN_DSI0),
+ MMSYS_ROUTE(UFOE, 0, DSI, 0,
MT8167_DISP_REG_CONFIG_DISP_DSI0_SEL_IN, MT8167_DSI0_SEL_IN_MASK,
- MT8167_DSI0_SEL_IN_RDMA0),
+ MT8167_DSI0_SEL_IN_UFOE),
+
+ /* UFOE<->DPI0 */
+ MMSYS_ROUTE(UFOE, 0, DPI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_UFOE_MOUT_EN_DPI0),
+ MMSYS_ROUTE(UFOE, 0, DPI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DPI0_SEL_IN, MT8167_DPI0_SEL_IN_MASK,
+ MT8167_DPI0_SEL_IN_UFOE),
+
+ /* UFOE<->DPI1 */
+ MMSYS_ROUTE(UFOE, 0, DPI, 1,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_UFOE_MOUT_EN_DPI1),
+ MMSYS_ROUTE(UFOE, 0, DPI, 1,
+ MT8167_DISP_REG_CONFIG_DISP_DPI1_SEL_IN, MT8167_DPI1_SEL_IN_MASK,
+ MT8167_DPI1_SEL_IN_UFOE),
+
+ /* UFOE<->WDMA0 */
+ MMSYS_ROUTE(UFOE, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_UFOE_MOUT_EN_WDMA0),
+ MMSYS_ROUTE(UFOE, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_WDMA0_SEL_IN_MASK,
+ MT8167_WDMA0_SEL_IN_UFOE),
+
+ /* RDMA0<->UFOE */
+ MMSYS_ROUTE(RDMA, 0, UFOE, 0,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN, MT8167_RDMA0_SOUT_MASK,
+ MT8167_RDMA0_SOUT_UFOE),
+ MMSYS_ROUTE(RDMA, 0, UFOE, 0,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_SEL_IN, MT8167_UFOE_SEL_IN_MASK,
+ MT8167_UFOE_SEL_IN_RDMA0),
+
+ /* RDMA0->COLOR0 */
+ MMSYS_ROUTE(RDMA, 0, COLOR, 0,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN, MT8167_RDMA0_SOUT_MASK,
+ MT8167_RDMA0_SOUT_COLOR0),
+ MMSYS_ROUTE(RDMA, 0, COLOR, 0,
+ MT8167_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN, MT8167_COLOR0_SEL_IN_MASK,
+ MT8167_COLOR0_SEL_IN_RDMA0),
+
+ /* RDMA0<->DSI0 */
MMSYS_ROUTE(RDMA, 0, DSI, 0,
MT8167_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN, MT8167_RDMA0_SOUT_MASK,
MT8167_RDMA0_SOUT_DSI0),
+ MMSYS_ROUTE(RDMA, 0, DSI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DSI0_SEL_IN, MT8167_DSI0_SEL_IN_MASK,
+ MT8167_DSI0_SEL_IN_RDMA0),
+
+ /* RDMA0<->DPI0 */
+ MMSYS_ROUTE(RDMA, 0, DPI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN, MT8167_RDMA0_SOUT_MASK,
+ MT8167_RDMA0_SOUT_DPI0),
+ MMSYS_ROUTE(RDMA, 0, DPI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DPI0_SEL_IN, MT8167_DPI0_SEL_IN_MASK,
+ MT8167_DPI0_SEL_IN_RDMA0),
+
+ /* RDMA0<->DPI1 */
+ MMSYS_ROUTE(RDMA, 0, DPI, 1,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN, MT8167_RDMA0_SOUT_MASK,
+ MT8167_RDMA0_SOUT_DPI1),
+ MMSYS_ROUTE(RDMA, 0, DPI, 1,
+ MT8167_DISP_REG_CONFIG_DISP_DPI1_SEL_IN, MT8167_DPI1_SEL_IN_MASK,
+ MT8167_DPI1_SEL_IN_RDMA0),
+
+ /* RDMA1<->DSI0 */
+ MMSYS_ROUTE(RDMA, 1, DSI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA1_SOUT_SEL_IN, MT8167_RDMA1_SOUT_MASK,
+ MT8167_RDMA1_SOUT_DSI0),
+ MMSYS_ROUTE(RDMA, 1, DSI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DSI0_SEL_IN, MT8167_DSI0_SEL_IN_MASK,
+ MT8167_DSI0_SEL_IN_RDMA1),
+
+ /* RDMA1<->DPI0 */
+ MMSYS_ROUTE(RDMA, 1, DPI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA1_SOUT_SEL_IN, MT8167_RDMA1_SOUT_MASK,
+ MT8167_RDMA1_SOUT_DPI0),
+ MMSYS_ROUTE(RDMA, 1, DPI, 0,
+ MT8167_DISP_REG_CONFIG_DISP_DPI0_SEL_IN, MT8167_DPI0_SEL_IN_MASK,
+ MT8167_DPI0_SEL_IN_RDMA1),
+
+ /* RDMA1<->DPI1 */
+ MMSYS_ROUTE(RDMA, 1, DPI, 1,
+ MT8167_DISP_REG_CONFIG_DISP_RDMA1_SOUT_SEL_IN, MT8167_RDMA1_SOUT_MASK,
+ MT8167_RDMA1_SOUT_DPI1),
+ MMSYS_ROUTE(RDMA, 1, DPI, 1,
+ MT8167_DISP_REG_CONFIG_DISP_DPI1_SEL_IN, MT8167_DPI1_SEL_IN_MASK,
+ MT8167_DPI1_SEL_IN_RDMA1),
};
#endif /* __SOC_MEDIATEK_MT8167_MMSYS_H */
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-09-21 11:38 [PATCH v2 0/4] Add support for the mt8167 display pipeline Luca Leonardo Scorcia
` (2 preceding siblings ...)
2026-09-21 11:38 ` [PATCH v2 3/4] soc: mediatek: mt8167-mmsys: add routes for all display paths Luca Leonardo Scorcia
@ 2026-09-21 11:38 ` Luca Leonardo Scorcia
2026-11-17 12:35 ` Krzysztof Kozlowski
3 siblings, 1 reply; 19+ messages in thread
From: Luca Leonardo Scorcia @ 2026-09-21 11:38 UTC (permalink / raw)
To: linux-mediatek
Cc: Luca Leonardo Scorcia, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, David Airlie, Simona Vetter, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
1 file changed, 369 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
index 27cf32d7ae35..a50bae4307c1 100644
--- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
@@ -16,6 +16,22 @@
/ {
compatible = "mediatek,mt8167";
+ aliases {
+ aal0 = &aal;
+ ccorr0 = &ccorr;
+ color0 = &color;
+ dither0 = &dither;
+ dpi0 = &dpi0;
+ dpi1 = &dpi1;
+ dsi0 = &dsi;
+ gamma0 = γ
+ ovl0 = &ovl0;
+ pwm0 = &disp_pwm;
+ rdma0 = &rdma0;
+ rdma1 = &rdma1;
+ wdma0 = &wdma;
+ };
+
soc {
topckgen: topckgen@10000000 {
compatible = "mediatek,mt8167-topckgen", "syscon";
@@ -120,10 +136,325 @@ iommu: m4u@10203000 {
#iommu-cells = <1>;
};
+ disp_pwm: pwm@1100f000 {
+ compatible = "mediatek,mt8167-disp-pwm", "mediatek,mt8173-disp-pwm";
+ reg = <0 0x1100f000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_PWM_26M>, <&mmsys CLK_MM_DISP_PWM_MM>;
+ clock-names = "main", "mm";
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
mmsys: syscon@14000000 {
compatible = "mediatek,mt8167-mmsys", "syscon";
reg = <0 0x14000000 0 0x1000>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
#clock-cells = <1>;
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mmsys_main: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&ovl0_in>;
+ };
+
+ mmsys_ext: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&rdma1_in>;
+ };
+ };
+ };
+
+ ovl0: ovl0@14007000 {
+ compatible = "mediatek,mt8167-disp-ovl";
+ reg = <0 0x14007000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_OVL0>;
+ interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_LOW>;
+ iommus = <&iommu M4U_PORT_DISP_OVL0>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ovl0_in: endpoint {
+ remote-endpoint = <&mmsys_main>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ ovl0_out: endpoint {
+ remote-endpoint = <&color_in>;
+ };
+ };
+ };
+ };
+
+ rdma0: rdma0@14009000 {
+ compatible = "mediatek,mt8167-disp-rdma", "mediatek,mt2701-disp-rdma";
+ reg = <0 0x14009000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA0>;
+ interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_LOW>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA0>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ rdma0_in: endpoint {
+ remote-endpoint = <&dither_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ rdma0_out: endpoint { };
+ };
+ };
+ };
+
+ rdma1: rdma1@1400a000 {
+ compatible = "mediatek,mt8167-disp-rdma", "mediatek,mt2701-disp-rdma";
+ reg = <0 0x1400a000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA1>;
+ interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA1>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ rdma1_in: endpoint {
+ remote-endpoint = <&mmsys_ext>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ rdma1_out: endpoint { };
+ };
+ };
+ };
+
+ wdma: wdma0@1400b000 {
+ compatible = "mediatek,mt8167-disp-wdma", "mediatek,mt8173-disp-wdma";
+ reg = <0 0x1400b000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_WDMA>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_LOW>;
+ iommus = <&iommu M4U_PORT_DISP_WDMA0>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+ };
+
+ color: color@1400c000 {
+ compatible = "mediatek,mt8167-disp-color";
+ reg = <0 0x1400c000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_COLOR>;
+ interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ color_in: endpoint {
+ remote-endpoint = <&ovl0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ color_out: endpoint {
+ remote-endpoint = <&ccorr_in>;
+ };
+ };
+ };
+ };
+
+ ccorr: ccorr@1400d000 {
+ compatible = "mediatek,mt8167-disp-ccorr", "mediatek,mt8183-disp-ccorr";
+ reg = <0 0x1400d000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_CCORR>;
+ interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ccorr_in: endpoint {
+ remote-endpoint = <&color_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ ccorr_out: endpoint {
+ remote-endpoint = <&aal_in>;
+ };
+ };
+ };
+ };
+
+ aal: aal@1400e000 {
+ compatible = "mediatek,mt8167-disp-aal", "mediatek,mt8173-disp-aal";
+ reg = <0 0x1400e000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_AAL>;
+ interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ aal_in: endpoint {
+ remote-endpoint = <&ccorr_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ aal_out: endpoint {
+ remote-endpoint = <&gamma_in>;
+ };
+ };
+ };
+ };
+
+ gamma: gamma@1400f000 {
+ compatible = "mediatek,mt8167-disp-gamma", "mediatek,mt8173-disp-gamma";
+ reg = <0 0x1400f000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_GAMMA>;
+ interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ gamma_in: endpoint {
+ remote-endpoint = <&aal_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ gamma_out: endpoint {
+ remote-endpoint = <&dither_in>;
+ };
+ };
+ };
+ };
+
+ dither: dither@14010000 {
+ compatible = "mediatek,mt8167-disp-dither", "mediatek,mt8183-disp-dither";
+ reg = <0 0x14010000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_DITHER>;
+ interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dither_in: endpoint {
+ remote-endpoint = <&gamma_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dither_out: endpoint {
+ remote-endpoint = <&rdma0_in>;
+ };
+ };
+ };
+ };
+
+ dsi: dsi@14012000 {
+ compatible = "mediatek,mt8167-dsi";
+ reg = <0 0x14012000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DSI_ENGINE>, <&mmsys CLK_MM_DSI_DIGITAL>,
+ <&mipi_tx>;
+ clock-names = "engine", "digital", "hs";
+ interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_LOW>;
+ phys = <&mipi_tx>;
+ phy-names = "dphy";
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+ status = "disabled";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsi_in: endpoint { };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsi_out: endpoint { };
+ };
+ };
+ };
+
+ dpi0: dpi@14013000 {
+ compatible = "mediatek,mt8167-dpi";
+ reg = <0 0x14013000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DPI0_PXL>, <&mmsys CLK_MM_DPI0_ENGINE>,
+ <&apmixedsys CLK_APMIXED_LVDSPLL>;
+ clock-names = "pixel", "engine", "pll";
+ interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpi0_in: endpoint { };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpi0_out: endpoint { };
+ };
+ };
+ };
+
+ mutex: mutex@14015000 {
+ compatible = "mediatek,mt8167-disp-mutex";
+ reg = <0 0x14015000 0 0x1000>;
+ interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
};
larb0: larb@14016000 {
@@ -145,6 +476,44 @@ smi_common: smi@14017000 {
power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
};
+ mipi_tx: dsi-phy@14018000 {
+ compatible = "mediatek,mt8167-mipi-tx", "mediatek,mt2701-mipi-tx";
+ reg = <0 0x14018000 0 0x90>;
+ clocks = <&topckgen CLK_TOP_MIPI_26M_DBG>;
+ clock-output-names = "mipi_tx0_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ dpi1: dpi1@14019000 {
+ compatible = "mediatek,mt8167-dpi";
+ reg = <0 0x14019000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DPI1_PXL>, <&mmsys CLK_MM_DPI1_ENGINE>,
+ <&apmixedsys CLK_APMIXED_TVDPLL>;
+ clock-names = "pixel", "engine", "pll";
+ interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dpi1_in: endpoint { };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ dpi1_out: endpoint { };
+ };
+ };
+ };
+
imgsys: syscon@15000000 {
compatible = "mediatek,mt8167-imgsys", "syscon";
reg = <0 0x15000000 0 0x1000>;
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
@ 2026-09-25 13:24 ` Krzysztof Kozlowski
2026-11-17 12:52 ` Krzysztof Kozlowski
2026-11-16 15:01 ` Chun-Kuang Hu
2026-11-17 12:52 ` Krzysztof Kozlowski
2 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-25 13:24 UTC (permalink / raw)
To: Luca Leonardo Scorcia
Cc: linux-mediatek, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On Mon, Sep 21, 2026 at 01:38:55PM +0200, Luca Leonardo Scorcia wrote:
> MediaTek mt8167 SoC has two Digital Parallel Interface (DPI) blocks,
> one can be routed to a DPI display while the other is wired to the HDMI
> block. They are not compatible with any other device, so add a new
> compatible to describe them in the device tree.
>
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
2026-09-25 13:24 ` Krzysztof Kozlowski
@ 2026-11-16 15:01 ` Chun-Kuang Hu
2026-11-17 12:52 ` Krzysztof Kozlowski
2 siblings, 0 replies; 19+ messages in thread
From: Chun-Kuang Hu @ 2026-11-16 15:01 UTC (permalink / raw)
To: Luca Leonardo Scorcia
Cc: linux-mediatek, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
Luca Leonardo Scorcia <l.scorcia@gmail.com> 於 2026年9月21日週一 上午11:39寫道:
>
> MediaTek mt8167 SoC has two Digital Parallel Interface (DPI) blocks,
> one can be routed to a DPI display while the other is wired to the HDMI
> block. They are not compatible with any other device, so add a new
> compatible to describe them in the device tree.
Applied to mediatek-drm-next [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
Regards,
Chun-Kuang.
>
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface
2026-09-21 11:38 ` [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface Luca Leonardo Scorcia
@ 2026-11-16 15:05 ` Chun-Kuang Hu
0 siblings, 0 replies; 19+ messages in thread
From: Chun-Kuang Hu @ 2026-11-16 15:05 UTC (permalink / raw)
To: Luca Leonardo Scorcia
Cc: linux-mediatek, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, David Airlie, Simona Vetter, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
Luca Leonardo Scorcia <l.scorcia@gmail.com> 於 2026年9月21日週一 上午11:39寫道:
>
> Add support for the two DPI blocks found in the mt8167 SoCs. One of them
> can be routed to a DPI connector and another is directly connected to the
> HDMI IP.
Applied to mediatek-drm-next [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
Regards,
Chun-Kuang.
>
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-09-21 11:38 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes Luca Leonardo Scorcia
@ 2026-11-17 12:35 ` Krzysztof Kozlowski
2026-11-17 12:53 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 12:35 UTC (permalink / raw)
To: Luca Leonardo Scorcia, linux-mediatek
Cc: AngeloGioacchino Del Regno, Chun-Kuang Hu, Philipp Zabel,
David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, CK Hu, Jitao shi, dri-devel,
devicetree, linux-kernel, linux-arm-kernel
On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
> Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
>
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
> 1 file changed, 369 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> index 27cf32d7ae35..a50bae4307c1 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> @@ -16,6 +16,22 @@
> / {
> compatible = "mediatek,mt8167";
>
> + aliases {
> + aal0 = &aal;
> + ccorr0 = &ccorr;
> + color0 = &color;
> + dither0 = &dither;
> + dpi0 = &dpi0;
> + dpi1 = &dpi1;
> + dsi0 = &dsi;
> + gamma0 = γ
> + ovl0 = &ovl0;
> + pwm0 = &disp_pwm;
> + rdma0 = &rdma0;
> + rdma1 = &rdma1;
> + wdma0 = &wdma;
Folks, what is happening here? Why Mediatek is adding bunch of
undocumented aliases? This should have never been accepted to Mediatek SoC.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
2026-09-25 13:24 ` Krzysztof Kozlowski
2026-11-16 15:01 ` Chun-Kuang Hu
@ 2026-11-17 12:52 ` Krzysztof Kozlowski
2026-11-17 13:26 ` Luca Leonardo Scorcia
2 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 12:52 UTC (permalink / raw)
To: Luca Leonardo Scorcia, linux-mediatek
Cc: AngeloGioacchino Del Regno, Chun-Kuang Hu, Philipp Zabel,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, CK Hu, Jitao shi, dri-devel,
devicetree, linux-kernel, linux-arm-kernel
On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
> MediaTek mt8167 SoC has two Digital Parallel Interface (DPI) blocks,
> one can be routed to a DPI display while the other is wired to the HDMI
> block. They are not compatible with any other device, so add a new
> compatible to describe them in the device tree.
>
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index eb4f276e8dc4..6cd96a5cd4ae 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -21,6 +21,7 @@ properties:
> - enum:
> - mediatek,mt2701-dpi
> - mediatek,mt7623-dpi
> + - mediatek,mt8167-dpi
Turns out you bring here undocumented ABI. NAK.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-09-25 13:24 ` Krzysztof Kozlowski
@ 2026-11-17 12:52 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 12:52 UTC (permalink / raw)
To: Luca Leonardo Scorcia
Cc: linux-mediatek, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 25/09/2026 15:24, Krzysztof Kozlowski wrote:
> On Mon, Sep 21, 2026 at 01:38:55PM +0200, Luca Leonardo Scorcia wrote:
>> MediaTek mt8167 SoC has two Digital Parallel Interface (DPI) blocks,
>> one can be routed to a DPI display while the other is wired to the HDMI
>> block. They are not compatible with any other device, so add a new
>> compatible to describe them in the device tree.
>>
>> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> ---
>> .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
And un-acked. Undocumented ABI.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-11-17 12:35 ` Krzysztof Kozlowski
@ 2026-11-17 12:53 ` AngeloGioacchino Del Regno
2026-11-17 12:55 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-11-17 12:53 UTC (permalink / raw)
To: Krzysztof Kozlowski, Luca Leonardo Scorcia, linux-mediatek
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 11/17/26 13:35, Krzysztof Kozlowski wrote:
> On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
>> Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
>>
>> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> ---
>> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
>> 1 file changed, 369 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>> index 27cf32d7ae35..a50bae4307c1 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>> @@ -16,6 +16,22 @@
>> / {
>> compatible = "mediatek,mt8167";
>>
>> + aliases {
>> + aal0 = &aal;
>> + ccorr0 = &ccorr;
>> + color0 = &color;
>> + dither0 = &dither;
>> + dpi0 = &dpi0;
>> + dpi1 = &dpi1;
>> + dsi0 = &dsi;
>> + gamma0 = γ
>> + ovl0 = &ovl0;
>> + pwm0 = &disp_pwm;
>> + rdma0 = &rdma0;
>> + rdma1 = &rdma1;
>> + wdma0 = &wdma;
>
> Folks, what is happening here? Why Mediatek is adding bunch of
> undocumented aliases? This should have never been accepted to Mediatek SoC.
>
It's always been like this on MediaTek from day 1, what's up with that!?
Btw, in this case the aliases are useless.
Cheers,
Angelo
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-11-17 12:53 ` AngeloGioacchino Del Regno
@ 2026-11-17 12:55 ` Krzysztof Kozlowski
2026-11-17 13:00 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 12:55 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Luca Leonardo Scorcia, linux-mediatek
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 17/11/2026 13:53, AngeloGioacchino Del Regno wrote:
> On 11/17/26 13:35, Krzysztof Kozlowski wrote:
>> On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
>>> Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
>>>
>>> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
>>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>> ---
>>> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
>>> 1 file changed, 369 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>> index 27cf32d7ae35..a50bae4307c1 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>> @@ -16,6 +16,22 @@
>>> / {
>>> compatible = "mediatek,mt8167";
>>>
>>> + aliases {
>>> + aal0 = &aal;
>>> + ccorr0 = &ccorr;
>>> + color0 = &color;
>>> + dither0 = &dither;
>>> + dpi0 = &dpi0;
>>> + dpi1 = &dpi1;
>>> + dsi0 = &dsi;
>>> + gamma0 = γ
>>> + ovl0 = &ovl0;
>>> + pwm0 = &disp_pwm;
>>> + rdma0 = &rdma0;
>>> + rdma1 = &rdma1;
>>> + wdma0 = &wdma;
>>
>> Folks, what is happening here? Why Mediatek is adding bunch of
>> undocumented aliases? This should have never been accepted to Mediatek SoC.
>>
>
> It's always been like this on MediaTek from day 1, what's up with that!?
I wrote what is wrong - they are undocumented. You were never allowed to
add undocumented ABI, never. Even 10 years ago.
I don't know what is day 1 in this context, but for a few (5-8 years?)
we do not allow more custom aliases. Neither new DTS users of these.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-11-17 12:55 ` Krzysztof Kozlowski
@ 2026-11-17 13:00 ` AngeloGioacchino Del Regno
2026-11-17 13:12 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-11-17 13:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Luca Leonardo Scorcia, linux-mediatek
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 11/17/26 13:55, Krzysztof Kozlowski wrote:
> On 17/11/2026 13:53, AngeloGioacchino Del Regno wrote:
>> On 11/17/26 13:35, Krzysztof Kozlowski wrote:
>>> On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
>>>> Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
>>>>
>>>> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
>>>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>> ---
>>>> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
>>>> 1 file changed, 369 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>> index 27cf32d7ae35..a50bae4307c1 100644
>>>> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>> @@ -16,6 +16,22 @@
>>>> / {
>>>> compatible = "mediatek,mt8167";
>>>>
>>>> + aliases {
>>>> + aal0 = &aal;
>>>> + ccorr0 = &ccorr;
>>>> + color0 = &color;
>>>> + dither0 = &dither;
>>>> + dpi0 = &dpi0;
>>>> + dpi1 = &dpi1;
>>>> + dsi0 = &dsi;
>>>> + gamma0 = γ
>>>> + ovl0 = &ovl0;
>>>> + pwm0 = &disp_pwm;
>>>> + rdma0 = &rdma0;
>>>> + rdma1 = &rdma1;
>>>> + wdma0 = &wdma;
>>>
>>> Folks, what is happening here? Why Mediatek is adding bunch of
>>> undocumented aliases? This should have never been accepted to Mediatek SoC.
>>>
>>
>> It's always been like this on MediaTek from day 1, what's up with that!?
>
> I wrote what is wrong - they are undocumented. You were never allowed to
> add undocumented ABI, never. Even 10 years ago.
>
Well, that's right.
> I don't know what is day 1 in this context, but for a few (5-8 years?)
> we do not allow more custom aliases. Neither new DTS users of these.
>
That actually poses a severe issue, as mediatek-drm relies on aliases to find out
the instance number of the display controller components, on all SoCs.
Any advice on how to possibly resolve this without rewriting the entire thing?
Mapping that by mmio address in the driver seems too stupid/dirty/bad/etc.
Thanks,
Angelo
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-11-17 13:00 ` AngeloGioacchino Del Regno
@ 2026-11-17 13:12 ` Krzysztof Kozlowski
2026-11-17 14:21 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 13:12 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Luca Leonardo Scorcia, linux-mediatek
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 17/11/2026 14:00, AngeloGioacchino Del Regno wrote:
> On 11/17/26 13:55, Krzysztof Kozlowski wrote:
>> On 17/11/2026 13:53, AngeloGioacchino Del Regno wrote:
>>> On 11/17/26 13:35, Krzysztof Kozlowski wrote:
>>>> On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
>>>>> Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
>>>>>
>>>>> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
>>>>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>>> ---
>>>>> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
>>>>> 1 file changed, 369 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>>> index 27cf32d7ae35..a50bae4307c1 100644
>>>>> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>>> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>>> @@ -16,6 +16,22 @@
>>>>> / {
>>>>> compatible = "mediatek,mt8167";
>>>>>
>>>>> + aliases {
>>>>> + aal0 = &aal;
>>>>> + ccorr0 = &ccorr;
>>>>> + color0 = &color;
>>>>> + dither0 = &dither;
>>>>> + dpi0 = &dpi0;
>>>>> + dpi1 = &dpi1;
>>>>> + dsi0 = &dsi;
>>>>> + gamma0 = γ
>>>>> + ovl0 = &ovl0;
>>>>> + pwm0 = &disp_pwm;
>>>>> + rdma0 = &rdma0;
>>>>> + rdma1 = &rdma1;
>>>>> + wdma0 = &wdma;
>>>>
>>>> Folks, what is happening here? Why Mediatek is adding bunch of
>>>> undocumented aliases? This should have never been accepted to Mediatek SoC.
>>>>
>>>
>>> It's always been like this on MediaTek from day 1, what's up with that!?
>>
>> I wrote what is wrong - they are undocumented. You were never allowed to
>> add undocumented ABI, never. Even 10 years ago.
>>
>
> Well, that's right.
>
>> I don't know what is day 1 in this context, but for a few (5-8 years?)
>> we do not allow more custom aliases. Neither new DTS users of these.
>>
>
> That actually poses a severe issue, as mediatek-drm relies on aliases to find out
> the instance number of the display controller components, on all SoCs.
If someone sent these for DT maintainers review, we would provide review
telling they are not allowed and you need to use other methods. The
problem is that someone sneaked undocumented ABI.
Instance IDs are not allowed in DT - neither as aliases nor as properties.
If the graph topology or phandles do not point to proper relation
between components, then the recommended way I know (happy to learn more
myself) is to map instances to IDs in the drivers. For example
Qualcomm/MSM is doing that.
>
> Any advice on how to possibly resolve this without rewriting the entire thing?
>
> Mapping that by mmio address in the driver seems too stupid/dirty/bad/etc.
Driver needs that, so why exactly stupid? You do not represent any
actual hardware information in DT with these aliases. You want to tell
drivers how drivers should behave - that's not a job for DT, that's job
for driver data. Of course if there is smarter way than MMIO->ID, I am
all in.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-11-17 12:52 ` Krzysztof Kozlowski
@ 2026-11-17 13:26 ` Luca Leonardo Scorcia
2026-11-17 15:09 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Luca Leonardo Scorcia @ 2026-11-17 13:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-mediatek, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
> Turns out you bring here undocumented ABI. NAK.
Hi, I'm sorry but I don't see the relation between this commit you
just NAKed and the bigger issue about mediatek-drm alias usage. It's
not like I'm introducing anything new in these DPI specific patches
and the individual display block drivers do not depend on the aliases
(they're used by mediatek-drm for building the pipeline).
I understand why the commit to the dtsi that includes the aliases is
NAKed, and the eventual fix is going to require a change in all of
Mediatek SoCs dtsi. I am fine with the dtsi changes being blocked
until an appropriate solution is found. I just don't understand the
NAKs on the DPI components.
Thank you for your help
--
Luca Leonardo Scorcia
l.scorcia@gmail.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-11-17 13:12 ` Krzysztof Kozlowski
@ 2026-11-17 14:21 ` AngeloGioacchino Del Regno
2026-11-17 16:00 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-11-17 14:21 UTC (permalink / raw)
To: Krzysztof Kozlowski, Luca Leonardo Scorcia, linux-mediatek
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 11/17/26 14:12, Krzysztof Kozlowski wrote:
> On 17/11/2026 14:00, AngeloGioacchino Del Regno wrote:
>> On 11/17/26 13:55, Krzysztof Kozlowski wrote:
>>> On 17/11/2026 13:53, AngeloGioacchino Del Regno wrote:
>>>> On 11/17/26 13:35, Krzysztof Kozlowski wrote:
>>>>> On 21/09/2026 13:38, Luca Leonardo Scorcia wrote:
>>>>>> Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.
>>>>>>
>>>>>> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
>>>>>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>>>> ---
>>>>>> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 369 +++++++++++++++++++++++
>>>>>> 1 file changed, 369 insertions(+)
>>>>>>
>>>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>>>> index 27cf32d7ae35..a50bae4307c1 100644
>>>>>> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>>>> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
>>>>>> @@ -16,6 +16,22 @@
>>>>>> / {
>>>>>> compatible = "mediatek,mt8167";
>>>>>>
>>>>>> + aliases {
>>>>>> + aal0 = &aal;
>>>>>> + ccorr0 = &ccorr;
>>>>>> + color0 = &color;
>>>>>> + dither0 = &dither;
>>>>>> + dpi0 = &dpi0;
>>>>>> + dpi1 = &dpi1;
>>>>>> + dsi0 = &dsi;
>>>>>> + gamma0 = γ
>>>>>> + ovl0 = &ovl0;
>>>>>> + pwm0 = &disp_pwm;
>>>>>> + rdma0 = &rdma0;
>>>>>> + rdma1 = &rdma1;
>>>>>> + wdma0 = &wdma;
>>>>>
>>>>> Folks, what is happening here? Why Mediatek is adding bunch of
>>>>> undocumented aliases? This should have never been accepted to Mediatek SoC.
>>>>>
>>>>
>>>> It's always been like this on MediaTek from day 1, what's up with that!?
>>>
>>> I wrote what is wrong - they are undocumented. You were never allowed to
>>> add undocumented ABI, never. Even 10 years ago.
>>>
>>
>> Well, that's right.
>>
>>> I don't know what is day 1 in this context, but for a few (5-8 years?)
>>> we do not allow more custom aliases. Neither new DTS users of these.
>>>
>>
>> That actually poses a severe issue, as mediatek-drm relies on aliases to find out
>> the instance number of the display controller components, on all SoCs.
>
> If someone sent these for DT maintainers review, we would provide review
> telling they are not allowed and you need to use other methods. The
> problem is that someone sneaked undocumented ABI.
>
> Instance IDs are not allowed in DT - neither as aliases nor as properties.
>
Okay.
> If the graph topology or phandles do not point to proper relation
> between components, then the recommended way I know (happy to learn more
> myself) is to map instances to IDs in the drivers. For example
> Qualcomm/MSM is doing that.
>
They do point to proper relation between components, but connecting one IP to
another is one thing, knowing the fixed hardware instance number (so how many of
those hardware IPs are there, and which one is that exact one) is another.
>>
>> Any advice on how to possibly resolve this without rewriting the entire thing?
>>
>> Mapping that by mmio address in the driver seems too stupid/dirty/bad/etc.
>
> Driver needs that, so why exactly stupid?
Really feels like going back to the days when devicetree was not a thing and all of
the MMIOs (on ARM at least) were added into a mach file.
>
> You do not represent any
> actual hardware information in DT with these aliases.
That depends on how you see it (as in, on the point of view), really, because well
technically the second ReadDMA IP is ... not the ... primary, as it's the secondary
one - as much as the third DPI is not the primary one (even though DRM can make it
so that it can be used as a primary output, but that's a software thing, not HW).
So... well, with that point of view... those aliases *are* representing information
about the hardware.
But I know that you're not complaining just about this, and this reply is not a way
to argue all that much, just a bit of thinking out loud.
>
> You want to tell
> drivers how drivers should behave - that's not a job for DT,
I want to tell drivers what is the first or the second or the third hardware
instance of the same IP, I don't want to tell drivers how drivers should behave
from devicetree.
The drivers are behaving differently with different hardware (read as: hardware
that is *physically* located in front of something else, or somewhere else anyway)
as in with different hardware instances.
> that's job
> for driver data. Of course if there is smarter way than MMIO->ID, I am
> all in.
You can't imagine how much I was hoping for you to say something about an
alternative solution to that.
As I said, it feels a bit like pre-DT times, but what I get from you is that this
is cleaner than just adding information about the real hardware instance number in
devicetree (no that's not just MediaTek, qcom also had similar issues as you said).
Cheers,
Angelo
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167
2026-11-17 13:26 ` Luca Leonardo Scorcia
@ 2026-11-17 15:09 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 15:09 UTC (permalink / raw)
To: Luca Leonardo Scorcia
Cc: linux-mediatek, AngeloGioacchino Del Regno, Chun-Kuang Hu,
Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 17/11/2026 14:26, Luca Leonardo Scorcia wrote:
>> Turns out you bring here undocumented ABI. NAK.
>
> Hi, I'm sorry but I don't see the relation between this commit you
> just NAKed and the bigger issue about mediatek-drm alias usage. It's
> not like I'm introducing anything new in these DPI specific patches
> and the individual display block drivers do not depend on the aliases
> (they're used by mediatek-drm for building the pipeline).
To clarify: you do introduce a new compatible here and in the DTS. Here
it is documented. This is correct.
However your DTS introduces also new usage of the ABI - aliases - and
that part is not documented. New DTS cannot use undocumented ABI. This
means that the binding was not complete. There is a mismatch or missing
pieces between the binding and DTS.
>
> I understand why the commit to the dtsi that includes the aliases is
> NAKed, and the eventual fix is going to require a change in all of
> Mediatek SoCs dtsi. I am fine with the dtsi changes being blocked
> until an appropriate solution is found. I just don't understand the
> NAKs on the DPI components.
Because this binding in relation to your DTS is incomplete. Of course if
you drop the aliases from your DTS and this will be your final and
working solution (bindings and DTS should be complete) then this NAK is
not relevant and can be ignored. But in current form your bindings are
incomplete and DTS after correcting won't work...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
2026-11-17 14:21 ` AngeloGioacchino Del Regno
@ 2026-11-17 16:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-17 16:00 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Luca Leonardo Scorcia, linux-mediatek
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, CK Hu,
Jitao shi, dri-devel, devicetree, linux-kernel, linux-arm-kernel
On 17/11/2026 15:21, AngeloGioacchino Del Regno wrote:
>
>>>
>>> Any advice on how to possibly resolve this without rewriting the entire thing?
>>>
>>> Mapping that by mmio address in the driver seems too stupid/dirty/bad/etc.
>>
>> Driver needs that, so why exactly stupid?
>
> Really feels like going back to the days when devicetree was not a thing and all of
> the MMIOs (on ARM at least) were added into a mach file.
Well, adding an alias just to tell that device node with MMIO address
0xdeadbeef is ID 0 is very similar, just placed differently. The
"aliases" are the mapping between MMIO and ID. Driver code also can do
the mapping between MMIO and ID.
>
> >
>> You do not represent any
>> actual hardware information in DT with these aliases.
>
> That depends on how you see it (as in, on the point of view), really, because well
> technically the second ReadDMA IP is ... not the ... primary, as it's the secondary
> one - as much as the third DPI is not the primary one (even though DRM can make it
> so that it can be used as a primary output, but that's a software thing, not HW).
>
> So... well, with that point of view... those aliases *are* representing information
> about the hardware.
>
> But I know that you're not complaining just about this, and this reply is not a way
> to argue all that much, just a bit of thinking out loud.
Being simply "second" is not alone useful information. It's pointless,
it does not matter neither to hardware nor to drivers. If it matters,
then probably that "second" has some other meaning and it maps to an
actual hardware topology difference, then often it deserves its own
compatible or property, depending on the difference.
>
> >
>> You want to tell
>> drivers how drivers should behave - that's not a job for DT,
>
> I want to tell drivers what is the first or the second or the third hardware
> instance of the same IP, I don't want to tell drivers how drivers should behave
> from devicetree.
> The drivers are behaving differently with different hardware (read as: hardware
> that is *physically* located in front of something else, or somewhere else anyway)
> as in with different hardware instances.
Then alias is not the way to represent these differences.
>
>> that's job
>> for driver data. Of course if there is smarter way than MMIO->ID, I am
>> all in.
>
> You can't imagine how much I was hoping for you to say something about an
> alternative solution to that.
>
> As I said, it feels a bit like pre-DT times, but what I get from you is that this
> is cleaner than just adding information about the real hardware instance number in
> devicetree (no that's not just MediaTek, qcom also had similar issues as you said).
Sure, I understand. This is an workaround and might be less applicable
here. It might be possible that your hardware needs a dedicated
property. Unfortunately, this cannot be a custom per-device alias.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-11-17 16:00 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 11:38 [PATCH v2 0/4] Add support for the mt8167 display pipeline Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
2026-09-25 13:24 ` Krzysztof Kozlowski
2026-11-17 12:52 ` Krzysztof Kozlowski
2026-11-16 15:01 ` Chun-Kuang Hu
2026-11-17 12:52 ` Krzysztof Kozlowski
2026-11-17 13:26 ` Luca Leonardo Scorcia
2026-11-17 15:09 ` Krzysztof Kozlowski
2026-09-21 11:38 ` [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface Luca Leonardo Scorcia
2026-11-16 15:05 ` Chun-Kuang Hu
2026-09-21 11:38 ` [PATCH v2 3/4] soc: mediatek: mt8167-mmsys: add routes for all display paths Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes Luca Leonardo Scorcia
2026-11-17 12:35 ` Krzysztof Kozlowski
2026-11-17 12:53 ` AngeloGioacchino Del Regno
2026-11-17 12:55 ` Krzysztof Kozlowski
2026-11-17 13:00 ` AngeloGioacchino Del Regno
2026-11-17 13:12 ` Krzysztof Kozlowski
2026-11-17 14:21 ` AngeloGioacchino Del Regno
2026-11-17 16:00 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®