3e4ba5bf10f974e44683f8e4a57c170399c9f688
[openwrt/staging/nbd.git] /
1 From b8c6c136971c0e9750eec89f367529b2854d3a3c Mon Sep 17 00:00:00 2001
2 From: Detlev Casanova <detlev.casanova@collabora.com>
3 Date: Mon, 17 Feb 2025 16:47:41 -0500
4 Subject: arm64: dts: rockchip: Add HDMI audio outputs for rk3588
5
6 For hdmi0_sound, use the simple-audio-card driver with the hdmi0 QP node
7 as CODEC and the i2s5 device as CPU.
8
9 Similarly for hdmi1_sound, the CODEC is the hdmi1 node and the CPU is
10 i2s6, but only added in the rk3588-extra.dtsi device tree as the second
11 TX HDMI port is not available on base versions of the SoC.
12
13 The simple-audio-card,mclk-fs value is set to 128 as it is done in
14 the downstream driver.
15
16 The #sound-dai-cells value is set to 0 in the hdmi0 and hdmi1 nodes so
17 that they can be used as audio codec nodes.
18
19 Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger Haikou
20 Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
21 Fixes: 419d1918105e ("ASoC: simple-card-utils: use __free(device_node) for device node")
22 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
23 Link: https://lore.kernel.org/r/20250217215641.372723-3-detlev.casanova@collabora.com
24 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
25
26 --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
27 +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
28 @@ -382,6 +382,22 @@
29 };
30 };
31
32 + hdmi0_sound: hdmi0-sound {
33 + compatible = "simple-audio-card";
34 + simple-audio-card,format = "i2s";
35 + simple-audio-card,mclk-fs = <128>;
36 + simple-audio-card,name = "hdmi0";
37 + status = "disabled";
38 +
39 + simple-audio-card,codec {
40 + sound-dai = <&hdmi0>;
41 + };
42 +
43 + simple-audio-card,cpu {
44 + sound-dai = <&i2s5_8ch>;
45 + };
46 + };
47 +
48 pmu-a55 {
49 compatible = "arm,cortex-a55-pmu";
50 interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_partition0>;
51 @@ -1396,6 +1412,7 @@
52 reset-names = "ref", "hdp";
53 rockchip,grf = <&sys_grf>;
54 rockchip,vo-grf = <&vo1_grf>;
55 + #sound-dai-cells = <0>;
56 status = "disabled";
57
58 ports {
59 --- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
60 +++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
61 @@ -7,6 +7,22 @@
62 #include "rk3588-extra-pinctrl.dtsi"
63
64 / {
65 + hdmi1_sound: hdmi1-sound {
66 + compatible = "simple-audio-card";
67 + simple-audio-card,format = "i2s";
68 + simple-audio-card,mclk-fs = <128>;
69 + simple-audio-card,name = "hdmi1";
70 + status = "disabled";
71 +
72 + simple-audio-card,codec {
73 + sound-dai = <&hdmi1>;
74 + };
75 +
76 + simple-audio-card,cpu {
77 + sound-dai = <&i2s6_8ch>;
78 + };
79 + };
80 +
81 usb_host1_xhci: usb@fc400000 {
82 compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
83 reg = <0x0 0xfc400000 0x0 0x400000>;
84 @@ -165,6 +181,7 @@
85 reset-names = "ref", "hdp";
86 rockchip,grf = <&sys_grf>;
87 rockchip,vo-grf = <&vo1_grf>;
88 + #sound-dai-cells = <0>;
89 status = "disabled";
90
91 ports {