starfive: Add more audio codecs support in dts

This commit is contained in:
SW Multimedia 2021-09-03 21:15:33 +08:00 committed by Tekkaman Ninja
parent 736cae5ddf
commit 3a789e9325
6 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,34 @@
&sound {
/* i2s + ac108 */
simple-audio-card,dai-link@1 {
reg = <1>;
format = "i2s";
bitclock-master = <&sndcodec1>;
frame-master = <&sndcodec1>;
widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Speaker", "Speaker",
"Headphone", "Headphone Jack";
routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Speaker", "SPK_LP",
"Speaker", "SPK_LN",
"LINPUT1", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Mic Jack",
"RINPUT2", "Mic Jack";
cpu {
sound-dai = <&i2sadc0>;
};
sndcodec1: codec {
sound-dai = <&ac108_a>;
clocks = <&ac108_mclk>;
clock-names = "mclk";
};
};
};

View file

@ -0,0 +1,17 @@
&sound {
/* pdm + i2s */
simple-audio-card,dai-link@1 {
reg = <1>;
format = "i2s";
bitclock-master = <&sndcodec1>;
frame-master = <&sndcodec1>;
cpu {
sound-dai = <&i2sadc0>;
};
sndcodec1: codec {
sound-dai = <&pdm>;
};
};
};

View file

@ -0,0 +1,16 @@
&sound {
/* spdif */
simple-audio-card,dai-link@1 {
reg = <1>;
format = "left_j";
bitclock-master = <&sndcpu1>;
frame-master = <&sndcpu1>;
sndcpu1: cpu {
sound-dai = <&spdif0>;
};
codec {
sound-dai = <&spdif_transmitter>;
};
};
};

View file

@ -0,0 +1,17 @@
&sound {
/* pdm + i2svad */
simple-audio-card,dai-link@1 {
reg = <1>;
format = "i2s";
bitclock-master = <&sndcodec1>;
frame-master = <&sndcodec1>;
cpu {
sound-dai = <&i2svad>;
};
sndcodec1: codec {
sound-dai = <&pdm>;
};
};
};

View file

@ -0,0 +1,38 @@
&sound{
/* i2s + wm8960 */
simple-audio-card,dai-link@1 {
reg = <1>;
status = "okay";
format = "i2s";
bitclock-master = <&sndcodec1>;
frame-master = <&sndcodec1>;
widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Speaker", "Speaker",
"Headphone", "Headphone Jack";
routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Speaker", "SPK_LP",
"Speaker", "SPK_LN",
"LINPUT1", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Mic Jack",
"RINPUT2", "Mic Jack";
cpu0 {
sound-dai = <&i2sdac0>;
};
cpu1 {
sound-dai = <&i2sadc0>;
};
sndcodec1:codec {
sound-dai = <&wm8960>;
clocks = <&wm8960_mclk>;
clock-names = "mclk";
};
};
};

View file

@ -487,3 +487,9 @@
dr_mode = "host";
status = "okay";
};
/* #include "codecs/sf_pdm.dtsi" */
/* #include "codecs/sf_spdif.dtsi" */
/* #include "codecs/sf_ac108.dtsi" */
/* #include "codecs/sf_wm8960.dtsi" */
/* #include "codecs/sf_vad.dtsi" */