arm64: dts: allwinner: h616: add HDMI device tree nodes
Subsystems (2)
cover arm64: dts: allwinner: h616: add HDMI device tree nodes
Hi all,
These two patches add the device tree nodes needed for HDMI output on the Allwinner H616 family. Tested on an Orange Pi Zero 3 (H618, 4GB), which drives a 1920x1080@60Hz desktop with these applied.
Mainline already has DE33 mixer support in the sun4i driver, but there are no display nodes at all in sun50i-h616.dtsi, so nothing probes. Ryan Walklin's "arm64: dts: allwinner: h616: add LCD timing controller and display engine support" series adds the display engine, bus, mixer and TCON nodes, but states that HDMI output is not provided. These patches are the missing HDMI half.
Every register address, clock index and reset line was read out of the vendor device tree shipped with the board and translated to the mainline dt-bindings macros; the clock and reset numbering was verified identical between the vendor and mainline CCU headers before substitution.
Two things I would appreciate guidance on:
1. Patch 1 currently also adds the display engine, bus, mixer and TCON nodes, because Ryan's series has not landed and the HDMI nodes need something to attach to. If his series is merged first, I am happy to respin this as an HDMI-only delta on top of it. That is probably the right shape; I did not want to post a series that applies to nothing in the meantime.
2. These nodes alone are not sufficient for a picture. Two driver changes are also needed: an H616 variant in sun8i_hdmi_phy.c (only a83t/h3/r40/a64/h6 exist today), and setting the TCON pad select bit in sun4i_tcon.c. Both exist in the Armbian sunxi-6.12 tree, authored by The-going. I have deliberately not included them here, because I cannot provide a Signed-off-by on another developer's work. If someone in a position to carry those forward would like to, I am happy to help test. Without them these nodes probe but produce no output.
checkpatch is clean apart from one 103-column warning on a remote-endpoint line in patch 1; the identical construct at the same width already exists in sun50i-h6.dtsi:183, so I left it matching the surrounding convention.
One implementation note worth recording, since it cost a boot cycle: the DE33 mixer's three register regions must be named "layers", "top" and "display". The driver fetches the latter two by name, so a wrong name here surfaces as "invalid resource (null)" and a -EINVAL bind failure several layers away from the cause.
Result on the board, with the two driver patches also applied:
sun4i-drm display-engine: bound 1100000.mixer (ops sun8i_mixer_ops) sun4i-drm display-engine: bound 6510000.tcon-top (ops sun8i_tcon_top_ops) sun4i-drm display-engine: bound 6515000.lcd-controller (ops sun4i_tcon_ops) sun8i-dw-hdmi 6000000.hdmi: Detected HDMI TX controller v2.12a with HDCP sun4i-drm display-engine: bound 6000000.hdmi (ops sun8i_dw_hdmi_ops) [drm] Initialized sun4i-drm 1.0.0 for display-engine on minor 0
with the connector reading "connected", EDID read correctly from the sink, and 1920x1080 among the reported modes.
Full boot logs, the decompiled vendor device tree the nodes were derived from, and a photo of the running desktop are at:
https://github.com/BarzinL/h616-hdmi-mainline
Based on mainline a500db7819c5.
Barzin Lotfabadi (2):
arm64: dts: allwinner: h616: add display engine and HDMI nodes
arm64: dts: allwinner: orangepi-zero3: enable HDMI output
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 191 +++++++++++++++++++++ .../dts/allwinner/sun50i-h618-orangepi-zero3.dts | 25 +++ 2 files changed, 216 insertions(+)
Signature · 1 line
2.51.0
PATCH 1/2 arm64: dts: allwinner: h616: add display engine and HDMI nodes
The H616 and its variants (H618, H700, T507) carry a Display Engine 3.3 (DE33) block feeding a TCON TOP, a TV TCON and a DesignWare HDMI 2.0 transmitter with an Allwinner-specific PHY. None of this is described in the SoC .dtsi, so nothing probes and the HDMI port stays dark even though the DE33 mixer support is present in the sun4i DRM driver.
Add the display pipeline:
display-engine - the DRM pipeline root
bus@1000000 - DE33 bus, holding the display clock controller
and the mixer
clock@8000 - display clock controller mixer@100000 - DE33 mixer 0 tcon-top@6510000 - TCON TOP, muxing the mixer onto the TCONs
lcd-controller@6515000 - TCON TV 0
hdmi@6000000 - DesignWare HDMI TX controller v2.12a
hdmi-phy@6010000 - Allwinner H616 HDMI PHY
All register addresses, clock indices and reset lines were read from the vendor device tree shipped with the board and translated to the mainline dt-bindings macros; the clock and reset numbering was verified identical between the vendor and mainline CCU headers.
The mixer's three register regions are named "layers", "top" and "display". On DE33 the global control registers moved out of the mixer block into separate windows, and the driver looks up the latter two by name, so these names are load-bearing rather than decorative.
Everything is left disabled; boards opt in.
---
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +191 -0
@@ -7,7 +7,10 @@ #include <dt-bindings/clock/sun50i-h616-ccu.h> #include <dt-bindings/clock/sun50i-h6-r-ccu.h> #include <dt-bindings/clock/sun6i-rtc.h> +#include <dt-bindings/clock/sun8i-de2.h> +#include <dt-bindings/clock/sun8i-tcon-top.h> #include <dt-bindings/reset/sun50i-h616-ccu.h> +#include <dt-bindings/reset/sun8i-de2.h> #include <dt-bindings/reset/sun50i-h6-r-ccu.h> #include <dt-bindings/thermal/thermal.h>
@@ -94,6 +97,12 @@ l2_cache: l2-cache { }; }; + de: display-engine { + compatible = "allwinner,sun50i-h6-display-engine"; + allwinner,pipelines = <&mixer0>; + status = "disabled"; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>;
@@ -965,6 +974,188 @@ ohci3: usb@5311400 { status = "disabled"; }; + bus: bus@1000000 { + compatible = "allwinner,sun50i-h616-de33", + "allwinner,sun50i-a64-de2"; + reg = <0x1000000 0x400000>; + allwinner,sram = <&sram_c 1>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x1000000 0x400000>; + + display_clocks: clock@8000 { + compatible = "allwinner,sun50i-h616-de33-clk"; + reg = <0x8000 0x100>; + clocks = <&ccu CLK_DE>, + <&ccu CLK_BUS_DE>; + clock-names = "mod", "bus"; + resets = <&ccu RST_BUS_DE>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + mixer0: mixer@100000 { + compatible = "allwinner,sun50i-h616-de33-mixer-0"; + reg = <0x100000 0x100000>, + <0x8100 0x40>, + <0x280000 0x20000>; + reg-names = "layers", "top", "display"; + clocks = <&display_clocks CLK_BUS_MIXER0>, + <&display_clocks CLK_MIXER0>; + clock-names = "bus", "mod"; + resets = <&display_clocks RST_MIXER0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + mixer0_out: port@1 { + reg = <1>; + + mixer0_out_tcon_top_mixer0: endpoint { + remote-endpoint = <&tcon_top_mixer0_in_mixer0>; + }; + }; + }; + }; + }; + + tcon_top: tcon-top@6510000 { + compatible = "allwinner,sun50i-h6-tcon-top"; + reg = <0x6510000 0x1000>; + clocks = <&ccu CLK_BUS_TCON_TOP>, + <&ccu CLK_TCON_TV0>; + clock-names = "bus", "tcon-tv0"; + clock-output-names = "tcon-top-tv0"; + resets = <&ccu RST_BUS_TCON_TOP>; + #clock-cells = <1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + tcon_top_mixer0_in: port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + tcon_top_mixer0_in_mixer0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mixer0_out_tcon_top_mixer0>; + }; + }; + + tcon_top_mixer0_out: port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + tcon_top_mixer0_out_tcon_tv: endpoint@2 { + reg = <2>; + remote-endpoint = <&tcon_tv_in_tcon_top_mixer0>; + }; + }; + + tcon_top_hdmi_in: port@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + + tcon_top_hdmi_in_tcon_tv: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon_tv_out_tcon_top_hdmi>; + }; + }; + + tcon_top_hdmi_out: port@5 { + reg = <5>; + + tcon_top_hdmi_out_hdmi: endpoint { + remote-endpoint = <&hdmi_in_tcon_top>; + }; + }; + }; + }; + + tcon_tv: lcd-controller@6515000 { + compatible = "allwinner,sun50i-h6-tcon-tv", + "allwinner,sun8i-r40-tcon-tv"; + reg = <0x6515000 0x1000>; + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_TCON_TV0>, + <&tcon_top CLK_TCON_TOP_TV0>; + clock-names = "ahb", "tcon-ch1"; + resets = <&ccu RST_BUS_TCON_TV0>; + reset-names = "lcd"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + tcon_tv_in: port@0 { + reg = <0>; + + tcon_tv_in_tcon_top_mixer0: endpoint { + remote-endpoint = <&tcon_top_mixer0_out_tcon_tv>; + }; + }; + + tcon_tv_out: port@1 { + reg = <1>; + + tcon_tv_out_tcon_top_hdmi: endpoint { + remote-endpoint = <&tcon_top_hdmi_in_tcon_tv>; + }; + }; + }; + }; + + hdmi: hdmi@6000000 { + compatible = "allwinner,sun50i-h616-dw-hdmi", + "allwinner,sun50i-h6-dw-hdmi"; + reg = <0x6000000 0x10000>; + reg-io-width = <1>; + interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_HDMI>, + <&ccu CLK_HDMI_SLOW>, + <&ccu CLK_HDMI>, + <&ccu CLK_HDMI_CEC>; + clock-names = "iahb", "isfr", "tmds", "cec"; + resets = <&ccu RST_BUS_HDMI_SUB>; + reset-names = "ctrl"; + phys = <&hdmi_phy>; + phy-names = "phy"; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + hdmi_in: port@0 { + reg = <0>; + + hdmi_in_tcon_top: endpoint { + remote-endpoint = <&tcon_top_hdmi_out_hdmi>; + }; + }; + + hdmi_out: port@1 { + reg = <1>; + }; + }; + }; + + hdmi_phy: hdmi-phy@6010000 { + compatible = "allwinner,sun50i-h616-hdmi-phy"; + reg = <0x6010000 0x10000>; + clocks = <&ccu CLK_BUS_HDMI>, + <&ccu CLK_HDMI_SLOW>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_HDMI>; + reset-names = "phy"; + #phy-cells = <0>; + }; + rtc: rtc@7000000 { compatible = "allwinner,sun50i-h616-rtc"; reg = <0x07000000 0x400>;
Signature · 1 line
2.51.0
PATCH 2/2 arm64: dts: allwinner: orangepi-zero3: enable HDMI output
In reply to Barzin LotfabadiThe Orange Pi Zero 3 exposes the H618 HDMI transmitter on a micro-HDMI connector. Add the connector node, wire it to the HDMI transmitter's output port, and enable the display pipeline.
Tested on an Orange Pi Zero 3 (H618, 4GB): the sink's EDID is read correctly and the board drives a 1920x1080@60Hz desktop.
---
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts +25 -0
@@ -11,6 +11,17 @@ / { model = "OrangePi Zero3"; compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618"; + + hdmi-connector { + compatible = "hdmi-connector"; + type = "d"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; }; &cpu0 {
@@ -103,3 +114,17 @@ &pio { vcc-ph-supply = <®_dldo1>; vcc-pi-supply = <®_dldo1>; }; + +&de { + status = "okay"; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +};
Signature · 1 line
2.51.0
Dne petek, 4. september 2026 ob 23:33:27 Srednjeevropski poletni čas je Barzin Lotfabadi napisal(a):
Quoted 58 lines
Hi all,
These two patches add the device tree nodes needed for HDMI output on the Allwinner H616 family. Tested on an Orange Pi Zero 3 (H618, 4GB), which drives a 1920x1080@60Hz desktop with these applied.
Mainline already has DE33 mixer support in the sun4i driver, but there are no display nodes at all in
sun50i-h616.dtsi, so nothing probes. Ryan Walklin's "arm64: dts: allwinner: h616: add LCD timing controller and display engine support" series adds the display engine, bus, mixer and TCON nodes, but states that HDMI output is not provided. These patches are the missing HDMI half.Every register address, clock index and reset line was read out of the vendor device tree shipped with the board and translated to the mainline dt-bindings macros; the clock and reset numbering was verified identical between the vendor and mainline CCU headers before substitution.
Two things I would appreciate guidance on:
1. Patch 1 currently also adds the display engine, bus, mixer and TCON nodes, because Ryan's series has not landed and the HDMI nodes need something to attach to. If his series is merged first, I am happy to respin this as an HDMI-only delta on top of it. That is probably the right shape; I did not want to post a series that applies to nothing in the meantime.
2. These nodes alone are not sufficient for a picture. Two driver changes are also needed: an H616 variant in
sun8i_hdmi_phy.c(only a83t/h3/r40/a64/h6 exist today), and setting the TCON pad select bit insun4i_tcon.c. Both exist in the Armbian sunxi-6.12 tree, authored by The-going. I have deliberately not included them here, because I cannot provide a Signed-off-by on another developer's work. If someone in a position to carry those forward would like to, I am happy to help test. Without them these nodes probe but produce no output.checkpatch is clean apart from one 103-column warning on a remote-endpoint line in patch 1; the identical construct at the same width already exists in sun50i-h6.dtsi:183, so I left it matching the surrounding convention.
One implementation note worth recording, since it cost a boot cycle: the DE33 mixer's three register regions must be named "layers", "top" and "display". The driver fetches the latter two by name, so a wrong name here surfaces as "invalid resource (null)" and a
-EINVALbind failure several layers away from the cause.Result on the board, with the two driver patches also applied:
sun4i-drm display-engine: bound 1100000.mixer (ops
sun8i_mixer_ops) sun4i-drm display-engine: bound 6510000.tcon-top (opssun8i_tcon_top_ops) sun4i-drm display-engine: bound 6515000.lcd-controller (opssun4i_tcon_ops) sun8i-dw-hdmi 6000000.hdmi: Detected HDMI TX controller v2.12a with HDCP sun4i-drm display-engine: bound 6000000.hdmi (opssun8i_dw_hdmi_ops) [drm] Initialized sun4i-drm 1.0.0 for display-engine on minor 0with the connector reading "connected", EDID read correctly from the sink, and 1920x1080 among the reported modes.
Quoted 6 lines
Full boot logs, the decompiled vendor device tree the nodes were derived from, and a photo of the running desktop are at:
https://github.com/BarzinL/h616-hdmi-mainline
Based on mainline
a500db7819c5.
NACK.
This uses old, improper description of HW. That's why it was never merged. Two mixers would never work with it. Also, TCON_TOP isn't directly compatible with H6.
Here is newer work:
https://lore.kernel.org/linux-sunxi/[email protected]/
Best regards,
Jernej
Quoted 10 lines
Barzin Lotfabadi (2):
arm64: dts: allwinner: h616: add display engine and HDMI nodes
arm64: dts: allwinner: orangepi-zero3: enable HDMI outputarch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 191 +++++++++++++++++++++ .../dts/allwinner/sun50i-h618-orangepi-zero3.dts | 25 +++ 2 files changed, 216 insertions(+)