b5e624a810be6841611a0108146155207a6c9800
[openwrt/staging/robimarko.git] /
1 From e6afcd3974550086b86bbd09ed1f5231d31757a3 Mon Sep 17 00:00:00 2001
2 From: Matt Flax <flatmax@flatmax.org>
3 Date: Tue, 12 Apr 2022 02:28:07 +1000
4 Subject: [PATCH] Add support for the AudioInjector.net bare i2s sound
5 card
6
7 Signed-off-by: Matt Flax <flatmax@flatmax.org>
8 ---
9 arch/arm/boot/dts/overlays/Makefile | 1 +
10 arch/arm/boot/dts/overlays/README | 6 +++
11 .../audioinjector-bare-i2s-overlay.dts | 50 +++++++++++++++++++
12 3 files changed, 57 insertions(+)
13 create mode 100644 arch/arm/boot/dts/overlays/audioinjector-bare-i2s-overlay.dts
14
15 --- a/arch/arm/boot/dts/overlays/Makefile
16 +++ b/arch/arm/boot/dts/overlays/Makefile
17 @@ -25,6 +25,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
18 applepi-dac.dtbo \
19 at86rf233.dtbo \
20 audioinjector-addons.dtbo \
21 + audioinjector-bare-i2s.dtbo \
22 audioinjector-isolated-soundcard.dtbo \
23 audioinjector-ultra.dtbo \
24 audioinjector-wm8731-audio.dtbo \
25 --- a/arch/arm/boot/dts/overlays/README
26 +++ b/arch/arm/boot/dts/overlays/README
27 @@ -601,6 +601,12 @@ Params: non-stop-clocks Keeps th
28 is paused or stopped (default off)
29
30
31 +Name: audioinjector-bare-i2s
32 +Info: Configures the audioinjector.net audio bare i2s soundcard
33 +Load: dtoverlay=audioinjector-bare-i2s
34 +Params: <None>
35 +
36 +
37 Name: audioinjector-isolated-soundcard
38 Info: Configures the audioinjector.net isolated soundcard
39 Load: dtoverlay=audioinjector-isolated-soundcard
40 --- /dev/null
41 +++ b/arch/arm/boot/dts/overlays/audioinjector-bare-i2s-overlay.dts
42 @@ -0,0 +1,50 @@
43 +// Definitions for audioinjector.net audio soundcard
44 +/dts-v1/;
45 +/plugin/;
46 +
47 +/ {
48 + compatible = "brcm,bcm2835";
49 +
50 + fragment@0 {
51 + target = <&i2s>;
52 + __overlay__ {
53 + status = "okay";
54 + };
55 + };
56 +
57 + fragment@1 {
58 + target-path = "/";
59 + __overlay__ {
60 + codec_bare: codec_bare {
61 + compatible = "linux,spdif-dit";
62 + #sound-dai-cells = <0>;
63 + status = "okay";
64 + };
65 + };
66 + };
67 +
68 + fragment@2 {
69 + target = <&sound>;
70 + __overlay__ {
71 + compatible = "simple-audio-card";
72 + i2s-controller = <&i2s>;
73 + status = "okay";
74 +
75 + simple-audio-card,name = "audioinjector-bare";
76 + simple-audio-card,format = "i2s";
77 +
78 + simple-audio-card,bitclock-master = <&dailink0_master>;
79 + simple-audio-card,frame-master = <&dailink0_master>;
80 +
81 + dailink0_master: simple-audio-card,cpu {
82 + sound-dai = <&i2s>;
83 + dai-tdm-slot-num = <2>;
84 + dai-tdm-slot-width = <32>;
85 + };
86 +
87 + snd_codec: simple-audio-card,codec {
88 + sound-dai = <&codec_bare>;
89 + };
90 + };
91 + };
92 +};