[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251124183056.B853068C4E@verein.lst.de>
Date: Mon, 24 Nov 2025 19:30:56 +0100 (CET)
From: Torsten Duwe <duwe@....de>
To: Heiko Stuebner <heiko@...ech.de>, Conor Dooley <conor+dt@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Rob Herring <robh@...nel.org>, Jianfeng Liu <liujianfeng1994@...il.com>, Sebastian Reichel <sebastian.reichel@...labora.com>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, Andy Yan <andy.yan@...k-chips.com>
Cc: devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] arm64: dts: rockchip: enable SPDIF audio on Rock 5 ITX
The Rock5 ITX has an S/PDIF (TOSLINK) socket in its I/O-shield, whose
TX signal is wired to GPIO4 C1. Activate SPDIF TX unit 1 and select
the proper pinmux (M2).
Signed-off-by: Torsten Duwe <duwe@....de>
---
For Linux, activating spdif_tx1 only creates a "component", see
/sys/kernel/debug/asoc/components. ALSA needs a "simple-audio-card"
pseudo device wrapper along with a "dummy transmitter" (?!) in order
to turn it into a functioning audio output. This is not really
intuitive and IMHO does not belong in a hardware description.
But well, so be it.
Torsten
---
rk3588-rock-5-itx.dts | 23 +++++++++++++++++++++++
1 file changed, 23 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 bc8140883de4..6780fbb26efb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
@@ -147,6 +147,24 @@ sdio_pwrseq: sdio-pwrseq {
reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
};
+ spdif_dit: spdif-dit {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ };
+
+ spdif_sound: spdif-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "SPDIF";
+
+ simple-audio-card,cpu {
+ sound-dai = <&spdif_tx1>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&spdif_dit>;
+ };
+ };
+
typec_vin: regulator-typec-vin {
compatible = "regulator-fixed";
enable-active-high;
@@ -839,6 +857,11 @@ spi_flash: flash@0 {
};
};
+&spdif_tx1 {
+ pinctrl-0 = <&spdif1m2_tx>;
+ status = "okay";
+};
+
&spi2 {
status = "okay";
assigned-clocks = <&cru CLK_SPI2>;
Powered by blists - more mailing lists