]> git.ipfire.org Git - thirdparty/openwrt.git/blob
0dff678d934fc23c22dbf04b1cb36f526c043d31
[thirdparty/openwrt.git] /
1 From 77773aec03f65758c760ec5b43a79ad6edeb211b Mon Sep 17 00:00:00 2001
2 From: j-schambacher <joerg@hifiberry.com>
3 Date: Thu, 12 Sep 2024 16:44:12 +0200
4 Subject: [PATCH 1263/1350] dtoverlays: adds the definitions for the HiFiBerry
5 8-channel ADC
6
7 Additions and changes for the 8 channel ADC card. This card uses only
8 HW-controlled devices which allows the uses of the 'dummy-dai'.
9 It will run only on a PI5 as it requires the designware I2S0 module.
10
11 The necessary output lanes I2S0_DI[0..3] are claimed from within the
12 DT overlay.
13
14 Signed-off-by: j-schambacher <joerg@hifiberry.com>
15 ---
16 arch/arm/boot/dts/overlays/Makefile | 1 +
17 arch/arm/boot/dts/overlays/README | 6 +++
18 .../dts/overlays/hifiberry-adc8x-overlay.dts | 50 +++++++++++++++++++
19 arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++
20 4 files changed, 61 insertions(+)
21 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-adc8x-overlay.dts
22
23 --- a/arch/arm/boot/dts/overlays/Makefile
24 +++ b/arch/arm/boot/dts/overlays/Makefile
25 @@ -86,6 +86,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
26 hd44780-lcd.dtbo \
27 hdmi-backlight-hwhack-gpio.dtbo \
28 hifiberry-adc.dtbo \
29 + hifiberry-adc8x.dtbo \
30 hifiberry-amp.dtbo \
31 hifiberry-amp100.dtbo \
32 hifiberry-amp3.dtbo \
33 --- a/arch/arm/boot/dts/overlays/README
34 +++ b/arch/arm/boot/dts/overlays/README
35 @@ -1778,6 +1778,12 @@ Params: leds_off If set t
36 is switched off at all times.
37
38
39 +Name: hifiberry-adc8x
40 +Info: Configures the HifiBerry ADC8X audio card (only on Pi5)
41 +Load: dtoverlay=hifiberry-adc8x
42 +Params: <None>
43 +
44 +
45 Name: hifiberry-amp
46 Info: Configures the HifiBerry Amp and Amp+ audio cards
47 Load: dtoverlay=hifiberry-amp
48 --- /dev/null
49 +++ b/arch/arm/boot/dts/overlays/hifiberry-adc8x-overlay.dts
50 @@ -0,0 +1,50 @@
51 +// Definitions for HiFiBerry ADC8x
52 +/dts-v1/;
53 +/plugin/;
54 +
55 +/ {
56 + compatible = "brcm,bcm2712";
57 +
58 + fragment@0 {
59 + target = <&gpio>;
60 + __overlay__ {
61 + rp1_i2s0_adc8x: rp1_i2s0_adc8x {
62 + function = "i2s0";
63 + pins = "gpio18", "gpio19", "gpio20",
64 + "gpio22", "gpio24", "gpio26";
65 + bias-disable;
66 + status = "okay";
67 + };
68 + };
69 + };
70 +
71 + fragment@1 {
72 + target = <&i2s_clk_producer>;
73 + __overlay__ {
74 + pinctrl-names = "default";
75 + pinctrl-0 = <&rp1_i2s0_adc8x>;
76 + status = "okay";
77 + };
78 + };
79 +
80 + fragment@2 {
81 + target-path = "/";
82 + __overlay__ {
83 + dummy-codec {
84 + #sound-dai-cells = <0>;
85 + compatible = "snd-soc-dummy";
86 + status = "okay";
87 + };
88 + };
89 + };
90 +
91 + fragment@3 {
92 + target = <&sound>;
93 + __overlay__ {
94 + compatible = "hifiberry,hifiberry-adc8x";
95 + i2s-controller = <&i2s_clk_producer>;
96 + status = "okay";
97 + };
98 + };
99 +
100 +};
101 --- a/arch/arm/boot/dts/overlays/overlay_map.dts
102 +++ b/arch/arm/boot/dts/overlays/overlay_map.dts
103 @@ -48,6 +48,10 @@
104 bcm2712;
105 };
106
107 + hifiberry-adc8x {
108 + bcm2712;
109 + };
110 +
111 hifiberry-dac8x {
112 bcm2712;
113 };