[PATCH 6/7] arm64: dts: rockchip: Improve sound config on NanoPC-T6
From: Diederik de Haas
Date: Fri Aug 28 2026 - 07:47:07 EST
The kernel can manage the I2S MCLK output gates since commit
02b9b0bb6269 ("clk: rockchip: rk3588: add GATE_GRF clocks for I2S MCLK output to IO")
So switch to I2S0_8CH_MCLKOUT_TO_IO to do exactly that.
The audio ports are used in audio-graph-card, but simple-audio-card uses
sound-dai phandles to establish the DAI links. So drop the pointless ports.
Add a label to the soundcard to be used by tools like alsamixer.
Sort the various properties according to the DTS coding standard.
Signed-off-by: Diederik de Haas <diederik@xxxxxxxxxxxxxx>
---
.../boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 35 +++++--------------
1 file changed, 9 insertions(+), 26 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index e42b2a14fc82..eb0eb124c4cd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -100,14 +100,14 @@ fan: pwm-fan {
sound {
compatible = "simple-audio-card";
- pinctrl-names = "default";
+ label = "Onboard Analog Realtek ALC5616";
pinctrl-0 = <&hp_det>;
+ pinctrl-names = "default";
- simple-audio-card,name = "realtek,rt5616-codec";
simple-audio-card,format = "i2s";
- simple-audio-card,mclk-fs = <256>;
-
simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,name = "realtek,rt5616-codec";
simple-audio-card,widgets =
"Headphone", "Headphones",
@@ -121,6 +121,7 @@ sound {
simple-audio-card,cpu {
sound-dai = <&i2s0_8ch>;
};
+
simple-audio-card,codec {
sound-dai = <&rt5616>;
};
@@ -551,17 +552,11 @@ &i2c7 {
rt5616: codec@1b {
compatible = "realtek,rt5616";
reg = <0x1b>;
- clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT_TO_IO>;
+ assigned-clock-rates = <12288000>;
+ clocks = <&cru I2S0_8CH_MCLKOUT_TO_IO>;
clock-names = "mclk";
#sound-dai-cells = <0>;
- assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
- assigned-clock-rates = <12288000>;
-
- port {
- rt5616_p0_0: endpoint {
- remote-endpoint = <&i2s0_8ch_p0_0>;
- };
- };
};
/* connected with MIPI-CSI1 */
@@ -573,21 +568,9 @@ &i2c8 {
};
&i2s0_8ch {
+ pinctrl-0 = <&i2s0_lrck &i2s0_mclk &i2s0_sclk &i2s0_sdi0 &i2s0_sdo0>;
pinctrl-names = "default";
- pinctrl-0 = <&i2s0_lrck
- &i2s0_mclk
- &i2s0_sclk
- &i2s0_sdi0
- &i2s0_sdo0>;
status = "okay";
-
- i2s0_8ch_p0: port {
- i2s0_8ch_p0_0: endpoint {
- dai-format = "i2s";
- mclk-fs = <256>;
- remote-endpoint = <&rt5616_p0_0>;
- };
- };
};
&i2s5_8ch {
--
2.55.0