bcm27xx: switch to 5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0593-overlays-Add-ugreen-dabboard-overlay.patch
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
5
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.
10
11 See: https://github.com/raspberrypi/linux/issues/4304
12
13 Signed-off-by: Christoph Orth <c.orth@ugreen.eu>
14 ---
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
20
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) += \
24 uart4.dtbo \
25 uart5.dtbo \
26 udrc.dtbo \
27 + ugreen-dabboard.dtbo \
28 upstream.dtbo \
29 upstream-pi4.dtbo \
30 vc4-fkms-v3d.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")
35
36
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.
45 +
46 +
47 Name: upstream
48 Info: Allow usage of downstream .dtb with upstream kernel. Comprises the
49 vc4-kms-v3d and dwc2 overlays.
50 --- /dev/null
51 +++ b/arch/arm/boot/dts/overlays/ugreen-dabboard-overlay.dts
52 @@ -0,0 +1,49 @@
53 +// Definitions for the ugreen dabboard I2S
54 +/dts-v1/;
55 +/plugin/;
56 +
57 +/ {
58 + compatible = "brcm,bcm2835";
59 +
60 + fragment@0 {
61 + target = <&i2s>;
62 + __overlay__ {
63 + status = "okay";
64 + };
65 + };
66 +
67 + fragment@1 {
68 + target-path = "/";
69 + __overlay__ {
70 + dmic_codec: dmic-codec {
71 + #sound-dai-cells = <0>;
72 + compatible = "dmic-codec";
73 + status = "okay";
74 + };
75 + };
76 + };
77 +
78 + fragment@2 {
79 + target = <&sound>;
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";
87 + status = "okay";
88 + simple-audio-card,cpu {
89 + sound-dai = <&i2s>;
90 + };
91 + dailink0_slave: simple-audio-card,codec {
92 + #sound-dai-cells = <0>;
93 + sound-dai = <&dmic_codec>;
94 + };
95 + };
96 + };
97 +
98 + __overrides__ {
99 + card-name = <&sound_overlay>,"simple-audio-card,name";
100 + };
101 +};