DTS overlay to activate I2S DAC 5102a on Armbian Buster 5.4.43
armbian-add-overlay sun50i-h5-i2s0-out.dts
If you don't have headers armbian-config (software->headers)
Manual install whithout headers
mkdir /boot/overlay-user/
dtc -I dts -O dtb sun50i-h5-i2s0-out-no-header.dts -o /boot/overlay-user/sun50i-h5-i2s0-out.dtbo
add user_overlays=sun50i-h5-i2s0-out to /boot/armbianEnv.txt
sun50i-h5-i2s0-out.dts
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun50i-h5";
fragment@0 {
target-path = "/";
__overlay__ {
pcm5102a: pcm5102a {
#sound-dai-cells = < 0x00 >;
compatible = "ti,pcm5102a";
status = "okay";
linux,phandle = < 0x26 >;
phandle = < 0x26 >;
pcm510x,format = "i2s";
};
};
};
fragment@1 {
target-path = "/aliases";
__overlay__ {
i2s0 = "/soc/i2s@1c22000";
};
};
fragment@2 {
target = <&i2s0>;
__overlay__ {
status = "okay";
pinctrl-0 = <&i2s0_pins>;
sound-dai = <&pcm5102a>;
pinctrl-names = "default";
};
};
fragment@3 {
target-path = "/";
__overlay__ {
sound_i2s {
compatible = "simple-audio-card";
simple-audio-card,name = "I2S-master";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,format = "i2s";
status = "okay";
simple-audio-card,cpu {
sound-dai = <&i2s0>;
};
simple-audio-card,codec {
sound-dai = <&pcm5102a>;
};
};
};
};
};
sun50i-h5-i2s0-out-no-header.dts
/dts-v1/;
/ {
compatible = "allwinner,sun50i-h5";
fragment@0 {
target-path = [ 2f 00 ];
__overlay__ {
pcm5102a {
#sound-dai-cells = < 0x00 >;
compatible = "ti,pcm5102a";
status = "okay";
linux,phandle = < 0x26 >;
phandle = < 0x26 >;
pcm510x,format = "i2s";
};
};
};
fragment@1 {
target-path = "/aliases";
__overlay__ {
i2s0 = "/soc/i2s@1c22000";
};
};
fragment@2 {
target = < 0xffffffff >;
__overlay__ {
status = "okay";
pinctrl-0 = < 0xffffffff >;
sound-dai = < 0x26 >;
pinctrl-names = "default";
};
};
fragment@3 {
target-path = [ 2f 00 ];
__overlay__ {
sound_i2s {
compatible = "simple-audio-card";
simple-audio-card,name = "I2S-master";
simple-audio-card,mclk-fs = < 0x100 >;
simple-audio-card,format = "i2s";
status = "okay";
simple-audio-card,cpu {
sound-dai = < 0xffffffff >;
};
simple-audio-card,codec {
sound-dai = < 0x26 >;
};
};
};
};
__symbols__ {
pcm5102a = "/fragment@0/__overlay__/pcm5102a";
};
__fixups__ {
i2s0 = "/fragment@2:target:0\0/fragment@3/__overlay__/sound_i2s/simple-audio-card,cpu:sound-dai:0";
i2s0_pins = "/fragment@2/__overlay__:pinctrl-0:0";
};
__local_fixups__ {
fragment@2 {
__overlay__ {
sound-dai = < 0x00 >;
};
};
fragment@3 {
__overlay__ {
sound_i2s {
simple-audio-card,codec {
sound-dai = < 0x00 >;
};
};
};
};
};
};