Skip to content

Commit e5df586

Browse files
Phil Elwellpopcornmix
authored andcommitted
overlays: audremap: Support GPIOs 18 & 19
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: raspberrypi/firmware#1178 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
1 parent b6038e8 commit e5df586

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎arch/arm/boot/dts/overlays/README‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,14 @@ Params: <None>
475475

476476

477477
Name: audremap
478-
Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)
478+
Info: Switches PWM sound output to GPIOs on the 40-pin header
479479
Load: dtoverlay=audremap,<param>=<val>
480480
Params: swap_lr Reverse the channel allocation, which will also
481481
swap the audio jack outputs (default off)
482482
enable_jack Don't switch off the audio jack output
483483
(default off)
484+
pins_12_13 Select GPIOs 12 & 13 (default)
485+
pins_18_19 Select GPIOs 18 & 19
484486

485487

486488
Name: balena-fin

‎arch/arm/boot/dts/overlays/audremap-overlay.dts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,29 @@
77
fragment@0 {
88
target = <&audio_pins>;
99
frag0: __overlay__ {
10+
};
11+
};
12+
13+
fragment@1 {
14+
target = <&audio_pins>;
15+
__overlay__ {
1016
brcm,pins = < 12 13 >;
1117
brcm,function = < 4 >; /* alt0 alt0 */
1218
};
1319
};
1420

21+
fragment@2 {
22+
target = <&audio_pins>;
23+
__dormant__ {
24+
brcm,pins = < 18 19 >;
25+
brcm,function = < 2 >; /* alt5 alt5 */
26+
};
27+
};
28+
1529
__overrides__ {
1630
swap_lr = <&frag0>, "swap_lr?";
1731
enable_jack = <&frag0>, "enable_jack?";
32+
pins_12_13 = <0>,"+1-2";
33+
pins_18_19 = <0>,"-1+2";
1834
};
1935
};

0 commit comments

Comments
 (0)