diff mbox series

[v4,07/14] video: mediatek: add smi larb driver

Message ID 20260902-add-genio-510-and-genio-700-hdmi-v4-7-7c3b4f068a56@baylibre.com
State Superseded
Delegated to: David Lechner
Headers show
Series mediatek: add HDMI pipeline support for MT8188 based boards | expand

Commit Message

Julien Stephan Sept. 2, 2026, 2:15 p.m. UTC
The SMI local arbiters (larbs) gate a subsystem's access to DRAM. On the
MT8188 the display data path feeds through the VDO1 larbs (larb2 and
larb3), whose clocks must be ungated for the HDMI pipeline to reach the
framebuffer.

There is no dedicated SMI larb driver upstream, as Linux handles the
larbs through its SMI/IOMMU framework. Add a minimal U-Boot driver that
binds the "mediatek,mt8188-smi-larb" nodes and ungates their clocks,
reusing the display pipeline component helpers for the register window
and clock bulk.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
 drivers/video/mediatek/mtk_smi_larb.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff mbox series

Patch

diff --git a/drivers/video/mediatek/mtk_smi_larb.c b/drivers/video/mediatek/mtk_smi_larb.c
new file mode 100644
index 00000000000..9e4440ce294
--- /dev/null
+++ b/drivers/video/mediatek/mtk_smi_larb.c
@@ -0,0 +1,30 @@ 
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * MediaTek SMI local arbiter (larb) driver
+ *
+ * Copyright (c) 2026 BayLibre, SAS.
+ * Author: Julien Stephan <jstephan@baylibre.com>
+ */
+
+#include <dm.h>
+
+#include "mtk_disp_comp.h"
+
+/*
+ * The SMI larbs gate a subsystem's access to DRAM. They have no dedicated
+ * driver upstream (the SMI/IOMMU framework handles them), so bind a minimal
+ * driver that just ungates their clocks, reusing the display component
+ * helpers for the register window and clock bulk.
+ */
+static const struct udevice_id mtk_smi_larb_ids[] = {
+	{ .compatible = "mediatek,mt8188-smi-larb" },
+	{}
+};
+
+U_BOOT_DRIVER(mtk_smi_larb) = {
+	.name	   = "mtk_smi_larb",
+	.id	   = UCLASS_MISC,
+	.of_match  = mtk_smi_larb_ids,
+	.probe	   = mtk_disp_comp_probe,
+	.priv_auto = sizeof(struct mtk_disp_comp_priv),
+};