1 From d7a810374597774f0e01eedfc30074772f4e9f85 Mon Sep 17 00:00:00 2001
2 From: Christoph <c.orth@ugreen.eu>
3 Date: Wed, 28 Apr 2021 20:30:44 +0200
4 Subject: [PATCH] overlays: Add ugreen-dabboard overlay
6 This is a simple overlay based on the simple-audio-card and the dmic
7 codec. It has the speciality that it is configured to use the codec
8 as a master I2S device. It works for example with the Si468x DAB
9 receiver on the uGreen DABBoard.
11 See: https://github.com/raspberrypi/linux/issues/4304
13 Signed-off-by: Christoph Orth <c.orth@ugreen.eu>
15 arch/arm/boot/dts/overlays/Makefile | 1 +
16 arch/arm/boot/dts/overlays/README | 10 ++++
17 .../dts/overlays/ugreen-dabboard-overlay.dts | 49 +++++++++++++++++++
18 3 files changed, 60 insertions(+)
19 create mode 100644 arch/arm/boot/dts/overlays/ugreen-dabboard-overlay.dts
21 --- a/arch/arm/boot/dts/overlays/Makefile
22 +++ b/arch/arm/boot/dts/overlays/Makefile
23 @@ -209,6 +209,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
27 + ugreen-dabboard.dtbo \
31 --- a/arch/arm/boot/dts/overlays/README
32 +++ b/arch/arm/boot/dts/overlays/README
33 @@ -3130,6 +3130,16 @@ Load: dtoverlay=udrc,<param>=<val>
34 Params: alsaname Name of the ALSA audio device (default "udrc")
37 +Name: ugreen-dabboard
38 +Info: Configures the ugreen-dabboard I2S overlay
39 + This is a simple overlay based on the simple-audio-card and the dmic
40 + codec. It has the speciality that it is configured to use the codec
41 + as a master I2S device. It works for example with the Si468x DAB
42 + receiver on the uGreen DABBoard.
43 +Load: dtoverlay=ugreen-dabboard,<param>=<val>
44 +Params: card-name Override the default, "dabboard", card name.
48 Info: Allow usage of downstream .dtb with upstream kernel. Comprises the
49 vc4-kms-v3d and dwc2 overlays.
51 +++ b/arch/arm/boot/dts/overlays/ugreen-dabboard-overlay.dts
53 +// Definitions for the ugreen dabboard I2S
58 + compatible = "brcm,bcm2835";
70 + dmic_codec: dmic-codec {
71 + #sound-dai-cells = <0>;
72 + compatible = "dmic-codec";
80 + sound_overlay: __overlay__ {
81 + compatible = "simple-audio-card";
82 + simple-audio-card,format = "i2s";
83 + simple-audio-card,name = "dabboard";
84 + simple-audio-card,bitclock-master = <&dailink0_slave>;
85 + simple-audio-card,frame-master = <&dailink0_slave>;
86 + simple-audio-card,widgets = "Microphone", "Microphone Jack";
88 + simple-audio-card,cpu {
91 + dailink0_slave: simple-audio-card,codec {
92 + #sound-dai-cells = <0>;
93 + sound-dai = <&dmic_codec>;
99 + card-name = <&sound_overlay>,"simple-audio-card,name";