aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0488-overlays-Add-audremap-overlay.patch
blob: a46dee8e7bc10f83f9a44d80622c1300c9dac319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From e0db21bda68cda5dbc4525ca7fe9528c74866359 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Fri, 19 Aug 2016 11:26:57 +0100
Subject: [PATCH] overlays: Add audremap overlay

The audremap overlay switches the PWM audio outputs to GPIO pins
12 (L) and 13 (R).
---
 arch/arm/boot/dts/overlays/Makefile             |  1 +
 arch/arm/boot/dts/overlays/README               |  6 ++++++
 arch/arm/boot/dts/overlays/audremap-overlay.dts | 14 ++++++++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 arch/arm/boot/dts/overlays/audremap-overlay.dts

--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -18,6 +18,7 @@ dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo
 dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo
 dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo
 dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo
+dtbo-$(RPI_DT_OVERLAYS) += audremap.dtbo
 dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo
 dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo
 dtbo-$(RPI_DT_OVERLAYS) += dionaudio-loco.dtbo
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -253,6 +253,12 @@ Load:   dtoverlay=audioinjector-wm8731-a
 Params: <None>
 
 
+Name:   audremap
+Info:   Switches PWM sound output to pins 12 & 13
+Load:   dtoverlay=audremap
+Params: <None>
+
+
 Name:   bmp085_i2c-sensor
 Info:   Configures the BMP085/BMP180 digital barometric pressure and temperature
         sensors from Bosch Sensortec
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts
@@ -0,0 +1,14 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+        compatible = "brcm,bcm2708";
+
+        fragment@0 {
+                target = <&audio_pins>;
+                __overlay__ {
+                        brcm,pins = < 12 13 >;
+                        brcm,function = < 4 >; /* alt0 alt0 */
+                };
+        };
+};