openwrt/target/linux/bcm27xx/patches-6.6/950-0916-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch
Álvaro Fernández Rojas 8c405cdccc bcm27xx: add 6.6 kernel patches
The patches were generated from the RPi repo with the following command:
git format-patch v6.6.34..rpi-6.1.y

Some patches needed rebasing and, as usual, the applied and reverted, wireless
drivers, Github workflows, READMEs and defconfigs patches were removed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-18 18:52:49 +02:00

114 lines
2.7 KiB
Diff

From 99e6cb05eaa2b133d9a2b7cb031fef2c19577cc1 Mon Sep 17 00:00:00 2001
From: j-schambacher <joerg@hifiberry.com>
Date: Wed, 28 Feb 2024 11:34:05 +0100
Subject: [PATCH 0916/1085] Overlays: Add definitions for HiFiBerry 8 channel
DAC8X
Dedicated overlay claiming all 4 data lanes of the designware
I2S0 module to drive 4x PCM5102. THe devices share BCLK and
LRCLK, therefore all outputs will always run at the same
samplerate and format.
Compatible only with PI5!
Signed-off-by: j-schambacher <joerg@hifiberry.com>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 6 +++
.../dts/overlays/hifiberry-dac8x-overlay.dts | 50 +++++++++++++++++++
arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++
4 files changed, 61 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -89,6 +89,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
hifiberry-amp3.dtbo \
hifiberry-amp4pro.dtbo \
hifiberry-dac.dtbo \
+ hifiberry-dac8x.dtbo \
hifiberry-dacplus.dtbo \
hifiberry-dacplusadc.dtbo \
hifiberry-dacplusadcpro.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1778,6 +1778,12 @@ Load: dtoverlay=hifiberry-dac
Params: <None>
+Name: hifiberry-dac8x
+Info: Configures the HifiBerry DAC8X audio cards (only on PI5)
+Load: dtoverlay=hifiberry-dac8x
+Params: <None>
+
+
Name: hifiberry-dacplus
Info: Configures the HifiBerry DAC+ audio card
Load: dtoverlay=hifiberry-dacplus,<param>=<val>
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
@@ -0,0 +1,50 @@
+// Definitions for HiFiBerry DAC8x
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2712";
+
+ fragment@0 {
+ target = <&gpio>;
+ __overlay__ {
+ rp1_i2s0_dac8x: rp1_i2s0_dac8x {
+ function = "i2s0";
+ pins = "gpio18", "gpio19", "gpio21",
+ "gpio23", "gpio25", "gpio27";
+ bias-disable;
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&i2s_clk_producer>;
+ __overlay__ {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rp1_i2s0_dac8x>;
+ status = "okay";
+ };
+ };
+
+ fragment@2 {
+ target-path = "/";
+ __overlay__ {
+ pcm5102a-codec {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5102a";
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@3 {
+ target = <&sound>;
+ __overlay__ {
+ compatible = "hifiberry,hifiberry-dac8x";
+ i2s-controller = <&i2s_clk_producer>;
+ status = "okay";
+ };
+ };
+
+};
--- a/arch/arm/boot/dts/overlays/overlay_map.dts
+++ b/arch/arm/boot/dts/overlays/overlay_map.dts
@@ -48,6 +48,10 @@
bcm2712;
};
+ hifiberry-dac8x {
+ bcm2712;
+ };
+
highperi {
bcm2711;
};