arm64: dts: rockchip: drop unused i2s0 from rk3399-firefly
Subsystems (2)
PATCH 1/2 arm64: dts: rockchip: drop unused i2s0 from rk3399-firefly
rk3399-firefly.dts enables i2s0, but no sound card on this board references it: the on-board rt5640 codec is wired to i2s1 and the S/PDIF transmitter has its own controller. i2s0 is left over and serves no purpose here.
Leaving it enabled is not free. The pl330 instance that serves the audio block only has six channels:
dma-pl330 ff6d0000.dma-controller: DBUFF-32x8bytes Num_Chans-6 \
Num_Peri-12 Num_Events-12i2s0 claims two of them for its unused tx/rx pair, so only four are left for i2s1 (2), i2s2 (2) and spdif (1). i2s2 loses out and cannot get a channel for capture:
rockchip-i2s ff8a0000.i2s: Missing dma channel for stream: 1
rockchip-i2s ff8a0000.i2s: ASoC error (-22): at \
snd_soc_pcm_component_new() on ff8a0000.i2swhich makes any card bound to i2s2 fail to probe. This is what currently prevents HDMI audio from working on this board.
i2s0 is disabled in rk3399-base.dtsi, so simply drop the override. With it gone, i2s1, i2s2 and spdif all get the channels they ask for.
Tested on a Firefly-RK3399 board.
--- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 6 ------ 1 file changed, 6 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +0 -6
@@ -618,12 +618,6 @@ accelerometer@68 { }; }; -&i2s0 { - rockchip,playback-channels = <8>; - rockchip,capture-channels = <8>; - status = "okay"; -}; - &i2s1 { rockchip,playback-channels = <2>; rockchip,capture-channels = <2>;
Signature · 7 lines
2.55.0.windows.3 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 2/2 arm64: dts: rockchip: enable HDMI audio on rk3399-firefly
The Firefly-RK3399 exposes audio over its HDMI 2.0 connector, but hdmi_sound is left disabled, so the only outputs available are the analog rt5640 jacks and S/PDIF.
Enable it. This depends on i2s0 no longer being enabled, otherwise i2s2 cannot get a DMA channel for capture and the card fails to probe.
Tested on a Firefly-RK3399 board with a 1920x1080 display attached:
the hdmi-sound card is registered and plays at both 44.1 and 48 kHz, alongside the existing rt5640 and S/PDIF cards.
--- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +4 -0
@@ -311,6 +311,10 @@ &hdmi { status = "okay"; }; +&hdmi_sound { + status = "okay"; +}; + &i2c0 { clock-frequency = <400000>; i2c-scl-rising-time-ns = <168>;
Signature · 7 lines
2.55.0.windows.3 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Please drop this series.
The commit message claims that nothing on this board uses i2s0. That is true for the DAI, but I missed that its pin groups also list GPIO4_A0:
i2s0-8ch-bus ... <4 RK_PA0 1 &pcfg_pull_none>
i2s0-8ch-bus-bclk-off ... <4 RK_PA0 1 &pcfg_pull_none>
That pin carries SCLK_I2S_8CH_OUT, the MCLK the RT5640 runs on:
rt5640: rt5640@1c {
clocks = <&cru SCLK_I2S_8CH_OUT>;
clock-names = "mclk";
};Dropping the whole &i2s0 override therefore leaves the codec clock pin without its mux configuration and analog audio stops working. I have reproduced that on the board. Sorry for not catching it before sending.
The correct change must split the MCLK pin into its own group, attach that group to i2s1, and disable the otherwise unused i2s0 controller in the same patch.
Patch 2/2 depends on this one - with i2s0 still enabled there is no pl330 channel left for i2s2 - so it cannot stand on its own either. It is resent unchanged as part of the v2 series rather than separately.
Could you please mark both patches as superseded in patchwork.
Sorry for the noise.