a742b30a345cfb657a34e17c0d56a6770ab48b8f
[openwrt/staging/linusw.git] /
1 From 2cdd83392ba025cc88072c0153d443fc59919960 Mon Sep 17 00:00:00 2001
2 From: j-schambacher <joerg@hifiberry.com>
3 Date: Mon, 10 Feb 2025 14:58:34 +0100
4 Subject: [PATCH] dtoverlays: adds support for Hifiberry ADC8x to the DAC8x
5
6 Allows the usage of ADC8x stacked on top of the DAC8x.
7 Activates all I2S pins and uses now the dummy-dai instead
8 of the formerly used pcm5102 to allow the use of a
9 capture device, too. The simple card driver will
10 probe for the ADC8x and may activate the 8 channel
11 capture. Uses GPIO5 for detection.
12
13 Signed-off-by: j-schambacher <joerg@hifiberry.com>
14 ---
15 arch/arm/boot/dts/overlays/README | 3 +++
16 .../boot/dts/overlays/hifiberry-dac8x-overlay.dts | 14 ++++++++++----
17 2 files changed, 13 insertions(+), 4 deletions(-)
18
19 --- a/arch/arm/boot/dts/overlays/README
20 +++ b/arch/arm/boot/dts/overlays/README
21 @@ -1879,6 +1879,9 @@ Params: <None>
22
23 Name: hifiberry-dac8x
24 Info: Configures the HifiBerry DAC8X audio cards (only on Pi5)
25 + This driver also detects a stacked ADC8x and activates the
26 + capture capabilities.
27 + Note: for standalone use of the ADC8x activate the ADC8x module.
28 Load: dtoverlay=hifiberry-dac8x
29 Params: <None>
30
31 --- a/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
32 +++ b/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
33 @@ -1,7 +1,10 @@
34 +// SPDX-License-Identifier: GPL-2.0
35 // Definitions for HiFiBerry DAC8x
36 /dts-v1/;
37 /plugin/;
38
39 +#include <dt-bindings/gpio/gpio.h>
40 +
41 / {
42 compatible = "brcm,bcm2712";
43
44 @@ -10,8 +13,10 @@
45 __overlay__ {
46 rp1_i2s0_dac8x: rp1_i2s0_dac8x {
47 function = "i2s0";
48 - pins = "gpio18", "gpio19", "gpio21",
49 - "gpio23", "gpio25", "gpio27";
50 + pins = "gpio18", "gpio19", "gpio20",
51 + "gpio21", "gpio22", "gpio23",
52 + "gpio24", "gpio25", "gpio26",
53 + "gpio27";
54 bias-disable;
55 status = "okay";
56 };
57 @@ -30,9 +35,9 @@
58 fragment@2 {
59 target-path = "/";
60 __overlay__ {
61 - pcm5102a-codec {
62 + dummy-codec {
63 #sound-dai-cells = <0>;
64 - compatible = "ti,pcm5102a";
65 + compatible = "snd-soc-dummy";
66 status = "okay";
67 };
68 };
69 @@ -43,6 +48,7 @@
70 __overlay__ {
71 compatible = "hifiberry,hifiberry-dac8x";
72 i2s-controller = <&i2s_clk_producer>;
73 + hasadc-gpio = <&gpio 5 GPIO_ACTIVE_LOW>;
74 status = "okay";
75 };
76 };