1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/brcm2708/patches-4.14/0255-overlays-Add-overlay-for-PiBell-soundcard.patch
2018-03-23 21:58:08 +01:00

138 lines
3.9 KiB
Diff

From 7d53ce5c659f0821d090ff609956b24824b4f0c9 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 28 Feb 2018 21:29:42 +0000
Subject: [PATCH 255/277] overlays: Add overlay for PiBell soundcard
This overlay is presented as another example of using the simple card
driver.
See: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=99784&p=1279490#p1278971
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 7 +++
arch/arm/boot/dts/overlays/pibell-overlay.dts | 81 +++++++++++++++++++++++++++
3 files changed, 89 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/pibell-overlay.dts
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index b543b2f478ab..93d4d66c4c63 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -76,6 +76,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
pi3-disable-bt.dtbo \
pi3-disable-wifi.dtbo \
pi3-miniuart-bt.dtbo \
+ pibell.dtbo \
piscreen.dtbo \
piscreen2r.dtbo \
pisound.dtbo \
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index 4c3047a324cc..9a2509572a3e 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1182,6 +1182,13 @@ Load: dtoverlay=pi3-miniuart-bt
Params: <None>
+Name: pibell
+Info: Configures the pibell audio card.
+Load: dtoverlay=pibell,<param>=<val>
+Params: alsaname Set the name as it appears in ALSA (default
+ "PiBell")
+
+
Name: piscreen
Info: PiScreen display by OzzMaker.com
Load: dtoverlay=piscreen,<param>=<val>
diff --git a/arch/arm/boot/dts/overlays/pibell-overlay.dts b/arch/arm/boot/dts/overlays/pibell-overlay.dts
new file mode 100644
index 000000000000..6e71c159357a
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/pibell-overlay.dts
@@ -0,0 +1,81 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2708";
+
+ fragment@0 {
+ target-path = "/";
+ __overlay__ {
+ codec_out: spdif-transmitter {
+ #address-cells = <0>;
+ #size-cells = <0>;
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ status = "okay";
+ };
+
+ codec_in: card-codec {
+ #sound-dai-cells = <0>;
+ compatible = "invensense,ics43432";
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&i2s>;
+ __overlay__ {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ };
+ };
+
+ fragment@2 {
+ target = <&sound>;
+ snd: __overlay__ {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "PiBell";
+
+ status="okay";
+
+ capture_link: simple-audio-card,dai-link@0 {
+ format = "i2s";
+
+ r_cpu_dai: cpu {
+ sound-dai = <&i2s>;
+
+/* example TDM slot configuration
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+*/
+ };
+
+ r_codec_dai: codec {
+ sound-dai = <&codec_in>;
+ };
+ };
+
+ playback_link: simple-audio-card,dai-link@1 {
+ format = "i2s";
+
+ p_cpu_dai: cpu {
+ sound-dai = <&i2s>;
+
+/* example TDM slot configuration
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+*/
+ };
+
+ p_codec_dai: codec {
+ sound-dai = <&codec_out>;
+ };
+ };
+ };
+ };
+
+ __overrides__ {
+ alsaname = <&snd>, "simple-audio-card,name";
+ };
+};
--
2.16.1