From: Yaozhong Li <yaozhonguwl@gmail.com>
To: heiko@sntech.de
Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] arm64: dts: rockchip: disable unused i2s0 on rk3399-firefly
Date: Mon, 21 Sep 2026 14:34:29 +0800 [thread overview]
Message-ID: <20260921063431.103-3-yaozhonguwl@gmail.com> (raw)
In-Reply-To: <20260921063431.103-1-yaozhonguwl@gmail.com>
The board file enables i2s0, but no sound card references it: the
on-board RT5640 is wired to i2s1 and the S/PDIF transmitter has its own
controller. Keeping it enabled starves the other controllers.
The pl330 instance that serves the audio block has six channels:
dma-pl330 ff6d0000.dma-controller: DBUFF-32x8bytes Num_Chans-6 \
Num_Peri-12 Num_Events-12
snd_dmaengine_pcm_register() requests the channels named in "dmas" when
the controller probes and holds them until it goes away, so this is
decided per controller and not per card. The demand is i2s0 2 + i2s1 2
+ i2s2 2 + spdif 1 = 7, one controller always loses, and which one
depends on probe order:
rockchip-spdif ff870000.spdif: Missing dma channel for stream: 0
i2s0 cannot simply be dropped, though. Its pin groups also list
GPIO4_A0, which carries SCLK_I2S_8CH_OUT, the MCLK the codec runs on,
rather than an i2s0 data, bit clock or frame clock signal:
i2s0-8ch-bus ... <4 RK_PA0 1 &pcfg_pull_none>
i2s0-8ch-bus-bclk-off ... <4 RK_PA0 1 &pcfg_pull_none>
i2s1-2ch-bus ... GPIO4_A3..A7 only
rt5640: rt5640@1c {
clocks = <&cru SCLK_I2S_8CH_OUT>;
clock-names = "mclk";
};
Removing the &i2s0 override on its own would therefore leave that pin
unmuxed and analog audio dead. Both changes are required in one step:
disabling i2s0 without splitting out the MCLK pin leaves GPIO4_A0
unmuxed, while giving the new group to i2s1 without disabling i2s0
makes the two controllers contend for the same pin.
rk3399-roc-pc-plus.dts already carries the same i2s_8ch_mclk_pin split.
Measured on a Firefly-RK3399. The pin moves to the controller that
actually drives the codec:
pin 128 (gpio4-0): ff890000.i2s function i2s1 group i2s-8ch-mclk-pin
The RT5640 and S/PDIF cards then register with no DMA errors, and a
1 kHz tone measured through the codec's internal HPOL/HPOR loopback is
unchanged (L 2135 -> 2138, R 2202 -> 2203), confirming that MCLK still
reaches the codec.
Fixes: 171582e00db1 ("arm64: dts: rockchip: add support for firefly-rk3399 board")
Assisted-by: LLM
Signed-off-by: Yaozhong Li <yaozhonguwl@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index 2fdfdd3..dbc38dd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -628,13 +628,9 @@ accelerometer@68 {
};
};
-&i2s0 {
- rockchip,playback-channels = <8>;
- rockchip,capture-channels = <8>;
- status = "okay";
-};
-
&i2s1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>;
rockchip,playback-channels = <2>;
rockchip,capture-channels = <2>;
status = "okay";
@@ -689,6 +685,12 @@ ir_int: ir-int {
};
};
+ i2s1 {
+ i2s_8ch_mclk_pin: i2s-8ch-mclk-pin {
+ rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
+ };
+ };
+
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.55.0.windows.3
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-09-21 6:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 6:34 [PATCH v2 0/3] arm64: dts: rockchip: fix audio on Firefly-RK3399 Yaozhong Li
2026-09-21 6:34 ` [PATCH v2 1/3] arm64: dts: rockchip: fix analog headphone output on rk3399-firefly Yaozhong Li
2026-09-21 6:34 ` Yaozhong Li [this message]
2026-09-21 6:34 ` [PATCH v2 3/3] arm64: dts: rockchip: enable HDMI audio " Yaozhong Li
2026-10-04 21:17 ` [PATCH v2 0/3] arm64: dts: rockchip: fix audio on Firefly-RK3399 Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921063431.103-3-yaozhonguwl@gmail.com \
--to=yaozhonguwl@gmail.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox