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
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.
13 Signed-off-by: j-schambacher <joerg@hifiberry.com>
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(-)
19 --- a/arch/arm/boot/dts/overlays/README
20 +++ b/arch/arm/boot/dts/overlays/README
21 @@ -1879,6 +1879,9 @@ Params: <None>
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
31 --- a/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
32 +++ b/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
34 +// SPDX-License-Identifier: GPL-2.0
35 // Definitions for HiFiBerry DAC8x
39 +#include <dt-bindings/gpio/gpio.h>
42 compatible = "brcm,bcm2712";
46 rp1_i2s0_dac8x: rp1_i2s0_dac8x {
48 - pins = "gpio18", "gpio19", "gpio21",
49 - "gpio23", "gpio25", "gpio27";
50 + pins = "gpio18", "gpio19", "gpio20",
51 + "gpio21", "gpio22", "gpio23",
52 + "gpio24", "gpio25", "gpio26",
63 #sound-dai-cells = <0>;
64 - compatible = "ti,pcm5102a";
65 + compatible = "snd-soc-dummy";
71 compatible = "hifiberry,hifiberry-dac8x";
72 i2s-controller = <&i2s_clk_producer>;
73 + hasadc-gpio = <&gpio 5 GPIO_ACTIVE_LOW>;