0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-22 04:56:15 +00:00
openwrt/target/linux/bcm27xx/patches-6.6/950-1229-overlays-Add-overlay-for-Hifiberry-ADC.patch
Álvaro Fernández Rojas 538a1d740c bcm27xx: update to latest RPi patches
The patches were generated from the RPi repo with the following command:
git format-patch v6.6.58..rpi-6.6.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-10-31 13:44:23 +01:00

101 lines
2.8 KiB
Diff

From 2f656dc533b65ae7f23527c3dc176efa92add105 Mon Sep 17 00:00:00 2001
From: j-schambacher <joerg@hifiberry.com>
Date: Tue, 20 Aug 2024 10:24:10 +0200
Subject: [PATCH 1229/1350] overlays: Add overlay for Hifiberry ADC
Adds the DT overlay for the HiFiBerry ADC.
Signed-off-by: j-schambacher <joerg@hifiberry.com>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 7 +++
.../dts/overlays/hifiberry-adc-overlay.dts | 45 +++++++++++++++++++
sound/soc/bcm/Kconfig | 1 +
4 files changed, 54 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/hifiberry-adc-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -85,6 +85,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
hd44780-i2c-lcd.dtbo \
hd44780-lcd.dtbo \
hdmi-backlight-hwhack-gpio.dtbo \
+ hifiberry-adc.dtbo \
hifiberry-amp.dtbo \
hifiberry-amp100.dtbo \
hifiberry-amp3.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1771,6 +1771,13 @@ Params: gpio_pin GPIO pin
expects a high to switch it on.
+Name: hifiberry-adc
+Info: Configures the HifiBerry ADC audio card
+Load: dtoverlay=hifiberry-adc,<param>=<val>
+Params: leds_off If set to 'true' the onboard indicator LED
+ is switched off at all times.
+
+
Name: hifiberry-amp
Info: Configures the HifiBerry Amp and Amp+ audio cards
Load: dtoverlay=hifiberry-amp
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/hifiberry-adc-overlay.dts
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+// Definitions for HiFiBerry ADC, no onboard clocks
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&i2s_clk_producer>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&i2c1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ hb_adc: pcm186x@4a {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm1863";
+ reg = <0x4a>;
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&sound>;
+ hifiberry_adc: __overlay__ {
+ compatible = "hifiberry,hifiberry-adc";
+ audio-codec = <&hb_adc>;
+ i2s-controller = <&i2s_clk_producer>;
+ status = "okay";
+ };
+ };
+
+ __overrides__ {
+ leds_off = <&hifiberry_adc>,"hifiberry-adc,leds_off?";
+ };
+};
--- a/sound/soc/bcm/Kconfig
+++ b/sound/soc/bcm/Kconfig
@@ -45,6 +45,7 @@ config SND_BCM2708_SOC_HIFIBERRY_ADC
select SND_RPI_HIFIBERRY_ADC
help
Say Y or M if you want to add support for HifiBerry ADC.
+ Use this module for HiFiBerry's ADC-only sound cards
config SND_BCM2708_SOC_HIFIBERRY_DAC
tristate "Support for HifiBerry DAC and DAC8X"