summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsw.multimedia <sw.multimedia@starfivetech.com>2021-09-03 16:15:33 +0300
committerTekkaman Ninja <tekkamanninja@163.com>2021-09-29 09:51:22 +0300
commita7fcd3962cc374d7dad5e7b5db3abb01683fa191 (patch)
tree3d713f089fd1676c524efbcc74c6a22a4bec37a0
parentea06b2709a0a47e1fb37faad856e38da4e987c38 (diff)
downloadu-boot-a7fcd3962cc374d7dad5e7b5db3abb01683fa191.tar.xz
starfive: Add more audio codecs support in dts
-rw-r--r--arch/riscv/dts/codecs/sf_ac108.dtsi34
-rw-r--r--arch/riscv/dts/codecs/sf_pdm.dtsi17
-rw-r--r--arch/riscv/dts/codecs/sf_spdif.dtsi16
-rw-r--r--arch/riscv/dts/codecs/sf_vad.dtsi17
-rw-r--r--arch/riscv/dts/codecs/sf_wm8960.dtsi38
-rw-r--r--arch/riscv/dts/jh7100-beaglev-starlight.dts6
6 files changed, 128 insertions, 0 deletions
diff --git a/arch/riscv/dts/codecs/sf_ac108.dtsi b/arch/riscv/dts/codecs/sf_ac108.dtsi
new file mode 100644
index 0000000000..96dea59315
--- /dev/null
+++ b/arch/riscv/dts/codecs/sf_ac108.dtsi
@@ -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";
+ };
+ };
+}; \ No newline at end of file
diff --git a/arch/riscv/dts/codecs/sf_pdm.dtsi b/arch/riscv/dts/codecs/sf_pdm.dtsi
new file mode 100644
index 0000000000..db191ee3ce
--- /dev/null
+++ b/arch/riscv/dts/codecs/sf_pdm.dtsi
@@ -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>;
+ };
+ };
+};
diff --git a/arch/riscv/dts/codecs/sf_spdif.dtsi b/arch/riscv/dts/codecs/sf_spdif.dtsi
new file mode 100644
index 0000000000..a72802aeb2
--- /dev/null
+++ b/arch/riscv/dts/codecs/sf_spdif.dtsi
@@ -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>;
+ };
+ };
+};
diff --git a/arch/riscv/dts/codecs/sf_vad.dtsi b/arch/riscv/dts/codecs/sf_vad.dtsi
new file mode 100644
index 0000000000..93c9153ad9
--- /dev/null
+++ b/arch/riscv/dts/codecs/sf_vad.dtsi
@@ -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>;
+ };
+ };
+};
diff --git a/arch/riscv/dts/codecs/sf_wm8960.dtsi b/arch/riscv/dts/codecs/sf_wm8960.dtsi
new file mode 100644
index 0000000000..505146b322
--- /dev/null
+++ b/arch/riscv/dts/codecs/sf_wm8960.dtsi
@@ -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";
+ };
+ };
+};
diff --git a/arch/riscv/dts/jh7100-beaglev-starlight.dts b/arch/riscv/dts/jh7100-beaglev-starlight.dts
index c9920ef6e0..c27779d1c5 100644
--- a/arch/riscv/dts/jh7100-beaglev-starlight.dts
+++ b/arch/riscv/dts/jh7100-beaglev-starlight.dts
@@ -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" */