overlays: audremap: Support GPIOs 18 & 19
authorPhil Elwell <phil@raspberrypi.org>
Tue, 23 Jul 2019 11:55:07 +0000 (12:55 +0100)
committerPhil Elwell <phil@raspberrypi.org>
Tue, 23 Jul 2019 12:04:42 +0000 (13:04 +0100)
PWM audio can also be used on GPIOs 18 and 19, so add the pins_18_19
parameter to select that location. pins_12_13 explicitly chooses GPIOs
12 and 13, although this is the default behaviour so is there only for
completeness.

See: https://github.com/raspberrypi/firmware/issues/1178

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/audremap-overlay.dts

index 568e711..f03065a 100644 (file)
@@ -475,12 +475,14 @@ Params: <None>
 
 
 Name:   audremap
-Info:   Switches PWM sound output to pins 12 (Right) & 13 (Left)
+Info:   Switches PWM sound output to GPIOs on the 40-pin header
 Load:   dtoverlay=audremap,<param>=<val>
 Params: swap_lr                 Reverse the channel allocation, which will also
                                 swap the audio jack outputs (default off)
         enable_jack             Don't switch off the audio jack output
                                 (default off)
+        pins_12_13              Select GPIOs 12 & 13 (default)
+        pins_18_19              Select GPIOs 18 & 19
 
 
 Name:   balena-fin
index 4a81820..d624bb3 100644 (file)
@@ -7,13 +7,29 @@
         fragment@0 {
                 target = <&audio_pins>;
                 frag0: __overlay__ {
+                };
+        };
+
+       fragment@1 {
+                target = <&audio_pins>;
+                __overlay__ {
                         brcm,pins = < 12 13 >;
                         brcm,function = < 4 >; /* alt0 alt0 */
                 };
         };
 
+       fragment@2 {
+               target = <&audio_pins>;
+               __dormant__ {
+                        brcm,pins = < 18 19 >;
+                        brcm,function = < 2 >; /* alt5 alt5 */
+               };
+       };
+
        __overrides__ {
                swap_lr = <&frag0>, "swap_lr?";
                enable_jack = <&frag0>, "enable_jack?";
+               pins_12_13 = <0>,"+1-2";
+               pins_18_19 = <0>,"-1+2";
        };
 };