bcm27xx: update 6.1 patches from RPi foundation
[openwrt/staging/xback.git] / target / linux / bcm27xx / patches-6.1 / 950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch
1 From d787ecf50d7a6ec32f8e1afcb8559600396c0f45 Mon Sep 17 00:00:00 2001
2 From: Ben Payne <ben@bluerocksoft.com>
3 Date: Tue, 13 Feb 2024 14:56:28 -0800
4 Subject: [PATCH 1277/1295] Add overlays needed for Interlude Audio Digital and
5 Analog hats
6
7 Adding 2 new overlays for use with
8 Interlude Audio's Digital and Analog hats
9 adding descriptions for both in README
10 adding changes to Makefile to include both DT's
11 ---
12 arch/arm/boot/dts/overlays/Makefile | 2 +
13 arch/arm/boot/dts/overlays/README | 12 +++
14 .../interludeaudio-analog-overlay.dts | 73 +++++++++++++++++++
15 .../interludeaudio-digital-overlay.dts | 49 +++++++++++++
16 4 files changed, 136 insertions(+)
17 create mode 100644 arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts
18 create mode 100644 arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts
19
20 --- a/arch/arm/boot/dts/overlays/Makefile
21 +++ b/arch/arm/boot/dts/overlays/Makefile
22 @@ -131,6 +131,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
23 imx477.dtbo \
24 imx519.dtbo \
25 imx708.dtbo \
26 + interludeaudio-analog.dtbo \
27 + interludeaudio-digital.dtbo \
28 iqaudio-codec.dtbo \
29 iqaudio-dac.dtbo \
30 iqaudio-dacplus.dtbo \
31 --- a/arch/arm/boot/dts/overlays/README
32 +++ b/arch/arm/boot/dts/overlays/README
33 @@ -2708,6 +2708,18 @@ Params: rotation Mounting
34 450000000 (default), 447000000, 453000000.
35
36
37 +Name: interludeaudio-analog
38 +Info: Configures Interlude Audio Analog Hat audio card
39 +Load: dtoverlay=interludeaudio-analog,<param>=<val>
40 +Params: gpiopin GPIO pin for codec reset
41 +
42 +
43 +Name: interludeaudio-digital
44 +Info: Configures Interlude Audio Digital Hat audio card
45 +Load: dtoverlay=interludeaudio-digital
46 +Params: <None>
47 +
48 +
49 Name: iqaudio-codec
50 Info: Configures the IQaudio Codec audio card
51 Load: dtoverlay=iqaudio-codec
52 --- /dev/null
53 +++ b/arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts
54 @@ -0,0 +1,73 @@
55 +// Definitions for Interlude audio analog hat
56 +/dts-v1/;
57 +/plugin/;
58 +
59 +/ {
60 + compatible = "brcm,bcm2835";
61 +
62 + fragment@0 {
63 + target = <&sound>;
64 + __overlay__ {
65 + compatible = "simple-audio-card";
66 + i2s-controller = <&i2s_clk_consumer>;
67 + status = "okay";
68 +
69 + simple-audio-card,name = "snd_IA_Analog_Hat";
70 +
71 + simple-audio-card,widgets =
72 + "Line", "Line In",
73 + "Line", "Line Out";
74 +
75 + simple-audio-card,routing =
76 + "Line Out","AOUTA+",
77 + "Line Out","AOUTA-",
78 + "Line Out","AOUTB+",
79 + "Line Out","AOUTB-",
80 + "AINA","Line In",
81 + "AINB","Line In";
82 +
83 + simple-audio-card,format = "i2s";
84 +
85 + simple-audio-card,bitclock-master = <&sound_master>;
86 + simple-audio-card,frame-master = <&sound_master>;
87 +
88 + simple-audio-card,cpu {
89 + sound-dai = <&i2s>;
90 + dai-tdm-slot-num = <2>;
91 + dai-tdm-slot-width = <32>;
92 + };
93 +
94 + sound_master: simple-audio-card,codec {
95 + sound-dai = <&cs4271>;
96 + system-clock-frequency = <24576000>;
97 + };
98 + };
99 + };
100 +
101 + fragment@1 {
102 + target = <&i2s_clk_consumer>;
103 + __overlay__ {
104 + status = "okay";
105 + };
106 + };
107 +
108 + fragment@2 {
109 + target = <&i2c1>;
110 + __overlay__ {
111 + #address-cells = <1>;
112 + #size-cells = <0>;
113 + status = "okay";
114 +
115 + cs4271: cs4271@10 {
116 + #sound-dai-cells = <0>;
117 + compatible = "cirrus,cs4271";
118 + reg = <0x10>;
119 + status = "okay";
120 + reset-gpio = <&gpio 24 0>; /* Pin 26, active high */
121 + };
122 + };
123 + };
124 + __overrides__ {
125 + gpiopin = <&cs4271>,"reset-gpio:4";
126 + };
127 +};
128 --- /dev/null
129 +++ b/arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts
130 @@ -0,0 +1,49 @@
131 +// Definitions for Interlude Audio Digital Hat
132 +/dts-v1/;
133 +/plugin/;
134 +
135 +/ {
136 + compatible = "brcm,bcm2835";
137 +
138 + fragment@0 {
139 + target = <&i2s_clk_consumer>;
140 + __overlay__ {
141 + status = "okay";
142 + };
143 + };
144 +
145 + fragment@1 {
146 + target = <&i2c1>;
147 + __overlay__ {
148 + #address-cells = <1>;
149 + #size-cells = <0>;
150 + status = "okay";
151 +
152 + wm8804@3b {
153 + #sound-dai-cells = <0>;
154 + compatible = "wlf,wm8804";
155 + reg = <0x3b>;
156 + PVDD-supply = <&vdd_3v3_reg>;
157 + DVDD-supply = <&vdd_3v3_reg>;
158 + status = "okay";
159 + };
160 + };
161 + };
162 +
163 +
164 + fragment@2 {
165 + target = <&sound>;
166 + __overlay__ {
167 + compatible = "interludeaudio,interludeaudio-digital";
168 + i2s-controller = <&i2s_clk_consumer>;
169 + status = "okay";
170 + clock44-gpio = <&gpio 22 0>;
171 + clock48-gpio = <&gpio 27 0>;
172 + led1-gpio = <&gpio 13 0>;
173 + led2-gpio = <&gpio 12 0>;
174 + led3-gpio = <&gpio 6 0>;
175 + reset-gpio = <&gpio 23 0>;
176 + };
177 + };
178 +
179 +};