* [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards
@ 2025-12-29 10:11 Alexey Charkov
2025-12-29 10:11 ` [PATCH 1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5 Alexey Charkov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alexey Charkov @ 2025-12-29 10:11 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
John Clark
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Alexey Charkov, stable
Here are some device tree updates to improve sound output on RK3576
boards.
The first two patches fix analog audio output on FriendlyElec NanoPi M5,
as it doesn't work with the current device tree.
The third one is purely cosmetic, to present a more user-friendly sound
card name to the userspace on NanoPi M5.
The rest add new functionality: HDMI sound output on three boards that
didn't enable it, and analog sound on RK3576 EVB1.
Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
Alexey Charkov (7):
arm64: dts: rockchip: Fix headphones widget name on NanoPi M5
arm64: dts: rockchip: Configure MCLK for analog sound on NanoPi M5
arm64: dts: rockchip: Use a readable audio card name on NanoPi M5
arm64: dts: rockchip: Enable HDMI sound on FriendlyElec NanoPi M5
arm64: dts: rockchip: Enable HDMI sound on Luckfox Core3576
arm64: dts: rockchip: Enable HDMI sound on RK3576 EVB1
arm64: dts: rockchip: Enable analog sound on RK3576 EVB1
arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 107 +++++++++++++++++++++
.../boot/dts/rockchip/rk3576-luckfox-core3576.dtsi | 8 ++
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 22 ++++-
3 files changed, 132 insertions(+), 5 deletions(-)
---
base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251222-rk3576-sound-0c26e3b16924
Best regards,
--
Alexey Charkov <alchark@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5
2025-12-29 10:11 [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Alexey Charkov
@ 2025-12-29 10:11 ` Alexey Charkov
2025-12-29 10:11 ` [PATCH 2/7] arm64: dts: rockchip: Configure MCLK for analog sound " Alexey Charkov
2026-01-06 18:41 ` [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Heiko Stuebner
2 siblings, 0 replies; 5+ messages in thread
From: Alexey Charkov @ 2025-12-29 10:11 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
John Clark
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Alexey Charkov, stable
Fix the mismatch between the simple-audio-card routing table vs. widget
names, which caused the following error at boot preventing the sound
card from getting added:
[ 6.625634] asoc-simple-card sound: ASoC: DAPM unknown pin Headphones
[ 6.627247] asoc-simple-card sound: ASoC: Failed to add route HPOL -> Headphones(*)
[ 6.627988] asoc-simple-card sound: ASoC: Failed to add route HPOR -> Headphones(*)
Fixes: 96cbdfdd3ac2 ("arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
index cce34c541f7c..37184913f918 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
@@ -211,7 +211,7 @@ sound {
"Headphones", "HPOR",
"IN1P", "Microphone Jack";
simple-audio-card,widgets =
- "Headphone", "Headphone Jack",
+ "Headphone", "Headphones",
"Microphone", "Microphone Jack";
simple-audio-card,codec {
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/7] arm64: dts: rockchip: Configure MCLK for analog sound on NanoPi M5
2025-12-29 10:11 [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Alexey Charkov
2025-12-29 10:11 ` [PATCH 1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5 Alexey Charkov
@ 2025-12-29 10:11 ` Alexey Charkov
2026-01-06 18:41 ` [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Heiko Stuebner
2 siblings, 0 replies; 5+ messages in thread
From: Alexey Charkov @ 2025-12-29 10:11 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
John Clark
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Alexey Charkov, stable
NanoPi M5 derives its analog sound signal from SAI2 in M0 pin mode, so the
MCLK pin should be configured accordingly for the sound codec to get its
I2S signal from the SoC. Request the required pin config.
The clock itself should also be CLK_SAI2_MCLKOUT_TO_IO for the sound to
work (otherwise there is only silence out of the audio out jack).
Fixes: 96cbdfdd3ac2 ("arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
index 37184913f918..bb2cc2814b83 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
@@ -201,6 +201,7 @@ sound {
pinctrl-names = "default";
pinctrl-0 = <&hp_det_l>;
+ simple-audio-card,bitclock-master = <&masterdai>;
simple-audio-card,format = "i2s";
simple-audio-card,hp-det-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
simple-audio-card,mclk-fs = <256>;
@@ -218,8 +219,9 @@ simple-audio-card,codec {
sound-dai = <&rt5616>;
};
- simple-audio-card,cpu {
+ masterdai: simple-audio-card,cpu {
sound-dai = <&sai2>;
+ system-clock-frequency = <12288000>;
};
};
};
@@ -727,10 +729,12 @@ &i2c5 {
rt5616: audio-codec@1b {
compatible = "realtek,rt5616";
reg = <0x1b>;
- assigned-clocks = <&cru CLK_SAI2_MCLKOUT>;
+ assigned-clocks = <&cru CLK_SAI2_MCLKOUT_TO_IO>;
assigned-clock-rates = <12288000>;
- clocks = <&cru CLK_SAI2_MCLKOUT>;
+ clocks = <&cru CLK_SAI2_MCLKOUT_TO_IO>;
clock-names = "mclk";
+ pinctrl-0 = <&sai2m0_mclk>;
+ pinctrl-names = "default";
#sound-dai-cells = <0>;
};
};
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards
2025-12-29 10:11 [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Alexey Charkov
2025-12-29 10:11 ` [PATCH 1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5 Alexey Charkov
2025-12-29 10:11 ` [PATCH 2/7] arm64: dts: rockchip: Configure MCLK for analog sound " Alexey Charkov
@ 2026-01-06 18:41 ` Heiko Stuebner
2026-01-06 18:47 ` Heiko Stuebner
2 siblings, 1 reply; 5+ messages in thread
From: Heiko Stuebner @ 2026-01-06 18:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, John Clark,
Alexey Charkov
Cc: Heiko Stuebner, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, stable
On Mon, 29 Dec 2025 14:11:57 +0400, Alexey Charkov wrote:
> Here are some device tree updates to improve sound output on RK3576
> boards.
>
> The first two patches fix analog audio output on FriendlyElec NanoPi M5,
> as it doesn't work with the current device tree.
>
> The third one is purely cosmetic, to present a more user-friendly sound
> card name to the userspace on NanoPi M5.
>
> [...]
Applied, thanks!
[1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5
commit: 5ab3dd9d0a63af66377f58633fec9dad650e6827
[2/7] arm64: dts: rockchip: Configure MCLK for analog sound on NanoPi M5
commit: 3e4a81881c0929b21a0577bc6e69514c09da5c3f
[3/7] arm64: dts: rockchip: Use a readable audio card name on NanoPi M5
commit: 309598fca339abd4e8eef0efe0d630714ca79ac9
[4/7] arm64: dts: rockchip: Enable HDMI sound on FriendlyElec NanoPi M5
commit: bde555926b61740c6256a38a9cf5a4833be345cc
[5/7] arm64: dts: rockchip: Enable HDMI sound on Luckfox Core3576
commit: 87af7643234a2b4cb49a97dfe7fb455633b3185d
[6/7] arm64: dts: rockchip: Enable HDMI sound on RK3576 EVB1
commit: f5c9549964adbac931e163693bd17db872976679
[7/7] arm64: dts: rockchip: Enable analog sound on RK3576 EVB1
commit: d8872b9dd9208c493f1f3811d42997fb968de064
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards
2026-01-06 18:41 ` [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Heiko Stuebner
@ 2026-01-06 18:47 ` Heiko Stuebner
0 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2026-01-06 18:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, John Clark,
Alexey Charkov
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
stable
Am Dienstag, 6. Januar 2026, 19:41:55 Mitteleuropäische Normalzeit schrieb Heiko Stuebner:
>
> On Mon, 29 Dec 2025 14:11:57 +0400, Alexey Charkov wrote:
> > Here are some device tree updates to improve sound output on RK3576
> > boards.
> >
> > The first two patches fix analog audio output on FriendlyElec NanoPi M5,
> > as it doesn't work with the current device tree.
> >
> > The third one is purely cosmetic, to present a more user-friendly sound
> > card name to the userspace on NanoPi M5.
> >
> > [...]
>
> Applied, thanks!
>
> [1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5
> commit: 5ab3dd9d0a63af66377f58633fec9dad650e6827
> [2/7] arm64: dts: rockchip: Configure MCLK for analog sound on NanoPi M5
> commit: 3e4a81881c0929b21a0577bc6e69514c09da5c3f
> [3/7] arm64: dts: rockchip: Use a readable audio card name on NanoPi M5
> commit: 309598fca339abd4e8eef0efe0d630714ca79ac9
> [4/7] arm64: dts: rockchip: Enable HDMI sound on FriendlyElec NanoPi M5
> commit: bde555926b61740c6256a38a9cf5a4833be345cc
> [5/7] arm64: dts: rockchip: Enable HDMI sound on Luckfox Core3576
> commit: 87af7643234a2b4cb49a97dfe7fb455633b3185d
> [6/7] arm64: dts: rockchip: Enable HDMI sound on RK3576 EVB1
> commit: f5c9549964adbac931e163693bd17db872976679
> [7/7] arm64: dts: rockchip: Enable analog sound on RK3576 EVB1
> commit: d8872b9dd9208c493f1f3811d42997fb968de064
Forgot to add, thankfully the fixes + enablement don't depend on each
other, so I've applied patches 1+2 to my fixes branch for 6.19
and the rest for 6.20.
Heiko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-06 18:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29 10:11 [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Alexey Charkov
2025-12-29 10:11 ` [PATCH 1/7] arm64: dts: rockchip: Fix headphones widget name on NanoPi M5 Alexey Charkov
2025-12-29 10:11 ` [PATCH 2/7] arm64: dts: rockchip: Configure MCLK for analog sound " Alexey Charkov
2026-01-06 18:41 ` [PATCH 0/7] arm64: dts: rockchip: Sound fixes and additions on RK3576 boards Heiko Stuebner
2026-01-06 18:47 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox