Skip to content

Commit

Permalink
feat: rk3588: add two i2s2 sound card
Browse files Browse the repository at this point in the history
Co-authored-by: ZHANG Yuntian <[email protected]>
  • Loading branch information
CodeChenL and RadxaYuntian committed Aug 28, 2024
1 parent cfc96d0 commit 9b778dc
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ dtb-$(CONFIG_CLK_RK3588) += \
rk3588-i2c8-m2.dtbo \
rk3588-i2c8-m4.dtbo \
rk3588-i2s1-8ch-m0.dtbo \
rk3588-i2s2-2ch-m1.dtbo \
rk3588-i2s2-2ch-m1-hifiberry-dac.dtbo \
rk3588-mali-enable.dtbo \
rk3588-pwm0-m1.dtbo \
rk3588-pwm0-m2.dtbo \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/dts-v1/;
/plugin/;
/ {
metadata {
title = "Enable HiFiBerry DAC+ Light on I2S2-M1";
compatible = "radxa,rock-5b", "radxa,rock-5b-plus";
category = "audio";
description = "Enable HiFiBerry DAC+ Light on I2S2-M1.";
exclusive = "GPIO3_B5", "GPIO3_B6", "GPIO3_B2", "GPIO3_B3", "i2s2_2ch";
};
};

&{/} {
pcm5102a_codec: pcm5102a-codec {
compatible = "ti,pcm5102a";
#sound-dai-cells = <0>;
status = "okay";
};

sound_ext_card: sound-ext-card {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,name = "snd_rpi_hifiberry_dac";
simple-audio-card,dai-link@0 {
reg = <0>;
format = "i2s";
cpu {
sound-dai = <&i2s2_2ch>;
};
codec {
sound-dai = <&pcm5102a_codec>;
};
};
};
};

&i2s2_2ch {
pinctrl-0 = <&i2s2m1_lrck &i2s2m1_sclk &i2s2m1_sdi &i2s2m1_sdo>;
status = "okay";
};
48 changes: 48 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rk3588-i2s2-2ch-m1.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/dts-v1/;
/plugin/;

/ {
metadata {
title = "Enable I2S2-M1 2-channel dummy sound card";
compatible = "radxa,rock-5b", "radxa,rock-5b-plus";
category = "misc";
description = "Enable I2S2-M1 2-channel dummy sound card.
This overlay is only for demonstration purpose.
It does not support any specific hardware device.";
exclusive = "GPIO3_B5", "GPIO3_B6", "GPIO3_B2", "GPIO3_B3", "i2s2_2ch";
};
};

&{/} {
i2s2_dummy_codec: i2s2-dummy-codec {
compatible = "rockchip,dummy-codec";
#sound-dai-cells = <0>;
};

i2s2_dummy_sound: i2s2-dummy-sound {
#address-cells = <1>;
#size-cells = <0>;
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "dummy-card";
simple-audio-card,mclk-fs = <256>;
status = "okay";

simple-audio-card,dai-link@0 {
reg = <0>;
format = "i2s";
cpu {
sound-dai = <&i2s2_2ch>;
};

codec {
sound-dai = <&i2s2_dummy_codec>;
};
};
};
};

&i2s2_2ch {
pinctrl-0 = <&i2s2m1_lrck &i2s2m1_sclk &i2s2m1_sdi &i2s2m1_sdo>;
status = "okay";
};

0 comments on commit 9b778dc

Please sign in to comment.