[PATCH v2 00/14] mediatek: add HDMI pipeline support for MT8188 based boards
Julien Stephan <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <20260826-add-genio-510-and-genio-700-hdmi-v2-0-68ebb1bf17df@baylibre.com> |
This series adds HDMI support for MT8188 based boards, such as the Genio
510 and Genio 700 EVKs, in order to display a boot logo over HDMI. It
builds on top of the HDMI PHY driver [1], the DDC (I2C) driver [2], the
clock series [3] and a clock fix [4] already sent earlier.
The drivers here, were inspired by the corresponding kernel driver, but
were largely modified, mainly because U-Boot has no DRM framework and
the goal is only to display a framebuffer. The HDMI driver locates each
pipeline component through phandles in the hdmi node and programs them
directly. The framebuffer and splash screen live in dedicated
reserved-memory regions.
The video pipeline looks like this:
reserved-memory (framebuffer, in DRAM)
|
+------------+------------+
v v
mdp_rdma4 mdp_rdma5 two DMA read engines,
(left half) (right half) each fetching one frame half
| |
padding4 padding5 (bypass)
| |
+------------+------------+
v
vpp merge (merge3) recombine the two halves
|
v
ethdr mixer (ethdr0)
|
v
hdr back-end
|
v
vpp merge (merge5)
|
v
dpi1 timing generator -> HDMI TX
|
v
ddc/i2c ---> hdmi tx controller
(read EDID) |
v
hdmi phy
|
v
hdmi connector ---> sink
mutex1 : hardware SOF synchronization across the pipeline
vdosys1 : routing muxes (SEL_IN/SOUT) wiring the blocks above
The series adds the HDMI TX controller (UCLASS_VIDEO), a set of shared
display-component helpers and the individual pipeline components (mixer,
merge, mutex, padding, rdma, vdosys1, dpi1), and the device-tree glue
and config that enable the pipeline.
Tested on Genio 700 EVK: the U-Boot splash logo shows up on an HDMI display.
[1]: https://patchwork.ozlabs.org/project/uboot/patch/20260717-mt8188-add-hdmi-phy-driver-v1-1-4278457fe2cb@baylibre.com/
[2]: https://patchwork.ozlabs.org/project/uboot/cover/20260717-mt8188-add-ddc-i2c-driver-v1-0-e89ccd173567@baylibre.com/
[3]: https://patchwork.ozlabs.org/project/uboot/patch/20260715-mt8188-add-clk-add-display-related-clocks-v2-1-0aaf7accaeb0@baylibre.com/
[4]: https://patchwork.ozlabs.org/project/uboot/patch/20260728-mt8188-clk-fix-top0-gate-polarity-v1-1-56bc92ba6055@baylibre.com/
Signed-off-by: Julien Stephan <[email protected]>
---
Changes in v2:
- Add a common `get_unaligned_le24()` helper for reading 24-bit little-endian values, ported from kernel
- Add a common `linux/hdmi.h` header with HDMI colorspace and colorimetry enums, based on the corresponding Linux header.
- Refactor the HDMI driver to use the new common HDMI definitions and unaligned access helper.
- Rename the mixer component to ETHDR and configure the ETHDR before the remaining display pipeline components.
- Add the SMI LARB components and configure the VDOSYS1 routing directly from the HDMI driver.
- Switch display component lookup from phandles to DT aliases and add proper error unwinding for component clocks, HDMI PHY power, and clock resources.
- Refactor HDMI register access and InfoFrame handling.
- Improve HDMI mode handling, YUV420 downsampling, TMDS scrambling, deep-color handling, and InfoFrame generation.
- Move framebuffer/splash reserved-memory definitions to the Genio common U-Boot DTSI and add the corresponding HDMI override node for MT8390/Genio EVKs.
- Drop the dedicated MT8188 VDOSYS1 pipeline component and its corresponding DTS node, to avoid having 2 nodes with same reg address.
- Remove the unnecessary `dm_scan_fdt_dev` bind hook from the HDMI driver.
- Link to v1: https://patch.msgid.link/20260728-add-genio-510-and-genio-700-hdmi-v1-0-ac54bd75f960@baylibre.com
To: [email protected]
Cc: GSS_MTK_Uboot_upstream <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Anatolij Gustschin <[email protected]>
Cc: Ryder Lee <[email protected]>
Cc: Weijie Gao <[email protected]>
Cc: Chunfeng Yun <[email protected]>
Cc: Igor Belwon <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Julien Stephan <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Johan Jonker <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Pavlo Yadvychuk <[email protected]>
Cc: Macpaul Lin <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Carlo Caione <[email protected]>
---
Julien Stephan (14):
video: mediatek: add display pipeline component helpers
video: mediatek: add ethdr component
video: mediatek: add merge component
video: mediatek: add mutex component
video: mediatek: add padding component
video: mediatek: add rdma component
video: mediatek: add smi larb driver
video: mediatek: add dpi1 component
asm-generic: unaligned: add get_unaligned_le24()
include: linux/hdmi.h: add HDMI colorspace and colorimetry enums
video: mediatek: add new hdmi driver
arm: dts: mt8390: add framebuffer and splash reserved-memory
arm: dts: mt8390: add hdmi override node
configs: mediatek: mt8188: enable hdmi pipeline
arch/arm/dts/mt8370-genio-510-evk-u-boot.dtsi | 1 +
arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi | 1 +
arch/arm/dts/mt8390-genio-common-u-boot.dtsi | 43 +
configs/mt8188.config | 12 +
drivers/video/Kconfig | 1 +
drivers/video/Makefile | 1 +
drivers/video/mediatek/Kconfig | 21 +
drivers/video/mediatek/Makefile | 16 +
drivers/video/mediatek/mtk_disp_comp.c | 68 ++
drivers/video/mediatek/mtk_disp_comp.h | 30 +
drivers/video/mediatek/mtk_disp_merge.c | 106 +++
drivers/video/mediatek/mtk_disp_merge.h | 19 +
drivers/video/mediatek/mtk_disp_mutex.c | 63 ++
drivers/video/mediatek/mtk_disp_mutex.h | 14 +
drivers/video/mediatek/mtk_disp_padding.c | 37 +
drivers/video/mediatek/mtk_disp_padding.h | 16 +
drivers/video/mediatek/mtk_dpi.c | 379 +++++++++
drivers/video/mediatek/mtk_dpi.h | 20 +
drivers/video/mediatek/mtk_dpi_regs.h | 113 +++
drivers/video/mediatek/mtk_ethdr.c | 76 ++
drivers/video/mediatek/mtk_ethdr.h | 16 +
drivers/video/mediatek/mtk_hdmi.c | 1102 +++++++++++++++++++++++++
drivers/video/mediatek/mtk_mdp_rdma.c | 97 +++
drivers/video/mediatek/mtk_mdp_rdma.h | 20 +
drivers/video/mediatek/mtk_smi_larb.c | 30 +
include/asm-generic/unaligned.h | 7 +
include/linux/hdmi.h | 30 +
27 files changed, 2339 insertions(+)
---
base-commit: 3fc031686aa1d219a113c5a77c165fd0a656076d
change-id: 20260701-add-genio-510-and-genio-700-hdmi-ca62c6b8210c
Best regards,
--
Julien Stephan <[email protected]>