[PATCH v2] arm64: dts: rockchip: configure hdmirx in Rock 5 ITX

Pedro Alves posted 1 patch 1 month ago
There is a newer version of this series
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
[PATCH v2] arm64: dts: rockchip: configure hdmirx in Rock 5 ITX
Posted by Pedro Alves 1 month ago
The Radxa Rock 5 ITX board exposes an HDMI input exactly the same way as
the Rock 5B, but this was not reflected in its DTS.

Change the rk3588-rock-5-itx to configure and enable the hdmi_receiver
and hdmi_receiver_cma nodes.

The hot-plug detection (HPD) pin keeps the hdmirx_det name rather than
the hdmirx_hpd name used in other boards since that is what matches the
official schematics (HDMIIRX_DET_L).

The configurations were confirmed to be identical on the downstream
Radxa kernel, and this has been tested to work on a Rock 5 ITX board
running kernel 6.19.3.

Signed-off-by: Pedro Alves <pta2002@pta2002.com>
---
Tested with the following commands:

v4l2-ctl --verbose -d /dev/video4 \
  --set-fmt-video=width=3840,height=2160,pixelformat='BGR3' \
  --stream-mmap=4 --stream-skip=3 --stream-count=20 \
  --stream-to=hdmiin.raw --stream-poll

ffmpeg -f rawvideo -vcodec rawvideo -s 3840x2160 -r 30 -pix_fmt bgr24 \
  -i hdmiin.raw output.mp4
---
Changes in v2:
- Updated dts spacing to match coding style
- Reverted pin naming to hdmirx_det to match schematics
  - Didn't end up changing other boards to match. There are quite a few
    others, so I'll probably send a separate patch for that.

- Link to v1: https://lore.kernel.org/r/20260304-radxa-r5-itx-hdmirx-v1-1-f77bf1f7ce03@pta2002.com
---
 arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
index 172aeabba72a..8e0eead7d223 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
@@ -349,6 +349,18 @@ &hdmi1_sound {
 	status = "okay";
 };
 
+&hdmi_receiver_cma {
+	status = "okay";
+};
+
+&hdmi_receiver {
+	pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_det>;
+	pinctrl-names = "default";
+	hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
+
+	status = "okay";
+};
+
 &hdptxphy1 {
 	status = "okay";
 };

---
base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
change-id: 20260303-radxa-r5-itx-hdmirx-f4645e64f8c3

Best regards,
-- 
Pedro Alves <pta2002@pta2002.com>
Re: [PATCH v2] arm64: dts: rockchip: configure hdmirx in Rock 5 ITX
Posted by Heiko Stuebner 1 month ago
Hi Pedro,

Am Mittwoch, 4. März 2026, 21:44:39 Mitteleuropäische Normalzeit schrieb Pedro Alves:
> The Radxa Rock 5 ITX board exposes an HDMI input exactly the same way as
> the Rock 5B, but this was not reflected in its DTS.
> 
> Change the rk3588-rock-5-itx to configure and enable the hdmi_receiver
> and hdmi_receiver_cma nodes.
> 
> The hot-plug detection (HPD) pin keeps the hdmirx_det name rather than
> the hdmirx_hpd name used in other boards since that is what matches the
> official schematics (HDMIIRX_DET_L).
> 
> The configurations were confirmed to be identical on the downstream
> Radxa kernel, and this has been tested to work on a Rock 5 ITX board
> running kernel 6.19.3.
> 
> Signed-off-by: Pedro Alves <pta2002@pta2002.com>

> +&hdmi_receiver {
> +	pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_det>;

are you sure the hdmim1_rx_hpdin is routed?
Because that is gpio3_D4 while your hpd-gpios below is gpio1_c6.

> +	pinctrl-names = "default";
> +	hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;

Also please provide a pinctrl setting for the gpio hpd pin.

Thanks a lot
Heiko

> +
> +	status = "okay";
> +};
> +
>  &hdptxphy1 {
>  	status = "okay";
>  };
> 
> ---
> base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
> change-id: 20260303-radxa-r5-itx-hdmirx-f4645e64f8c3
> 
> Best regards,
> 
Re: [PATCH v2] arm64: dts: rockchip: configure hdmirx in Rock 5 ITX
Posted by Pedro Alves 1 month ago
Hi again, sorry for the follow-up:

On 10/03/2026 08:48, Heiko Stuebner wrote:
> Am Mittwoch, 4. März 2026, 21:44:39 Mitteleuropäische Normalzeit schrieb Pedro Alves:
>> +	pinctrl-names = "default";
>> +	hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
> 
> Also please provide a pinctrl setting for the gpio hpd pin.

I might be missing something, but isn't this already present with the
hdmirx_det pin? It's configured as hdmirx_hpd in other boards, but for
this one I left the hdmirx_det pin name after discussion in v1 of this
patch to match the schematic.

If you mean something else, please let me know.

Thanks,
Pedro
Re: [PATCH v2] arm64: dts: rockchip: configure hdmirx in Rock 5 ITX
Posted by Pedro Alves 1 month ago
Hi,

Thanks for taking a look.

On 10/03/2026 08:48, Heiko Stuebner wrote:
> Am Mittwoch, 4. März 2026, 21:44:39 Mitteleuropäische Normalzeit schrieb Pedro Alves:
>> +&hdmi_receiver {
>> +    pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_det>;
>
> are you sure the hdmim1_rx_hpdin is routed?
> Because that is gpio3_D4 while your hpd-gpios below is gpio1_c6.

I took a look at both the Radxa 5 ITX schematic[1] and at the RK3588
datasheet[2]. As far as I can tell, the pin is indeed routed.

The schematic calls it HDMIIRX_HDPOUT_H, on gpio3_d4, and it seems to be
controlling pin 19 of the HDMI port via HDMI_RX_HPD_PORT (see page 31).
The hpd-gpios meanwhile is a GPIO that's used to detect when an HDMI
cable is plugged in (goes low when there's voltage on
VCC5V_HDMIRX_PORT), but since this has no fixed pin in hardware, the pin
choice seems like it can be rather arbitrary by Radxa, who wired it to
gpio1_c6.

>> +    pinctrl-names = "default";
>> +    hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
>
> Also please provide a pinctrl setting for the gpio hpd pin.

Sure, I'll take care of this and send a follow-up.

[1]: https://dl.radxa.com/rock5/5itx/v1110/radxa_rock_5itx_v1110_schematic.pdf
[2]: https://wiki.friendlyelec.com/wiki/images/e/ee/Rockchip_RK3588_Datasheet_V1.6-20231016.pdf

Regards,
Pedro