Skip to content

Commit

Permalink
feat: amlogic: add radxa-zero-i2s-hifiberry-dac
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed Dec 23, 2024
1 parent d8f0805 commit 7f3c06d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/amlogic/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_MESON) += \
meson-g12-watchdog.dtbo \
radxa-zero-emmc-full-speed.dtbo \
radxa-zero-enable-vddio_c.dtbo \
radxa-zero-i2s-hifiberry-dac.dtbo \
radxa-zero-led-8-off.dtbo \
radxa-zero-led-10-off.dtbo \
radxa-zero-spi-b-waveshare13.dtbo \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
#include <dt-bindings/clock/axg-audio-clkc.h>
#include <dt-bindings/sound/meson-g12a-toacodec.h>

/ {
metadata {
title = "Enable HiFiBerry DAC+ Light on TDMA";
compatible = "radxa,zero";
category = "audio";
description = "Enable HiFiBerry DAC+ Light on TDMA.";
exclusive = "GPIOX_9", "GPIOX_10", "GPIOX_11", "tdmif_a";
};
};

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

sound {
audio-aux-devs = <&tdmout_a>, <&tdmout_b>;
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
"TDMOUT_A IN 1", "FRDDR_B OUT 0",
"TDMOUT_A IN 2", "FRDDR_C OUT 0",
"TDM_A Playback", "TDMOUT_A OUT",
"TDMOUT_B IN 0", "FRDDR_A OUT 1",
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT";

dai-link@5 {
sound-dai = <&tdmif_a>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
mclk-fs = <256>;

codec@0 {
sound-dai = <&pcm5102a_codec>;
};

codec@1 {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
};
};
};
};

&tdmif_a {
pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>;
pinctrl-names = "default";
status = "okay";

assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>,
<&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>;
assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
<&clkc_audio AUD_CLKID_MST_A_LRCLK>;
assigned-clock-rates = <0>, <0>;
};

&tdmout_a {
status = "okay";
};

0 comments on commit 7f3c06d

Please sign in to comment.