brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0619-overlays-audremap-Support-GPIOs-18-19.patch
1 From f42cc245e1f3e586f1a26550e5760489b6c329ab Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 23 Jul 2019 12:55:07 +0100
4 Subject: [PATCH] overlays: audremap: Support GPIOs 18 & 19
5
6 PWM audio can also be used on GPIOs 18 and 19, so add the pins_18_19
7 parameter to select that location. pins_12_13 explicitly chooses GPIOs
8 12 and 13, although this is the default behaviour so is there only for
9 completeness.
10
11 See: https://github.com/raspberrypi/firmware/issues/1178
12
13 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
14 ---
15 arch/arm/boot/dts/overlays/README | 4 +++-
16 arch/arm/boot/dts/overlays/audremap-overlay.dts | 16 ++++++++++++++++
17 2 files changed, 19 insertions(+), 1 deletion(-)
18
19 --- a/arch/arm/boot/dts/overlays/README
20 +++ b/arch/arm/boot/dts/overlays/README
21 @@ -475,12 +475,14 @@ Params: <None>
22
23
24 Name: audremap
25 -Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)
26 +Info: Switches PWM sound output to GPIOs on the 40-pin header
27 Load: dtoverlay=audremap,<param>=<val>
28 Params: swap_lr Reverse the channel allocation, which will also
29 swap the audio jack outputs (default off)
30 enable_jack Don't switch off the audio jack output
31 (default off)
32 + pins_12_13 Select GPIOs 12 & 13 (default)
33 + pins_18_19 Select GPIOs 18 & 19
34
35
36 Name: balena-fin
37 --- a/arch/arm/boot/dts/overlays/audremap-overlay.dts
38 +++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts
39 @@ -7,13 +7,29 @@
40 fragment@0 {
41 target = <&audio_pins>;
42 frag0: __overlay__ {
43 + };
44 + };
45 +
46 + fragment@1 {
47 + target = <&audio_pins>;
48 + __overlay__ {
49 brcm,pins = < 12 13 >;
50 brcm,function = < 4 >; /* alt0 alt0 */
51 };
52 };
53
54 + fragment@2 {
55 + target = <&audio_pins>;
56 + __dormant__ {
57 + brcm,pins = < 18 19 >;
58 + brcm,function = < 2 >; /* alt5 alt5 */
59 + };
60 + };
61 +
62 __overrides__ {
63 swap_lr = <&frag0>, "swap_lr?";
64 enable_jack = <&frag0>, "enable_jack?";
65 + pins_12_13 = <0>,"+1-2";
66 + pins_18_19 = <0>,"-1+2";
67 };
68 };