-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dts: overlays: Enable RP1 Audio Out using audremap-pi5-overlay
Since RP1 Audio Out can only work on GPIOs 12, 13 which would previously have needed dtoverlay=audremap, overload it both to enable and pin-map the block (do not enable for other pinouts). At the same time, generate a default "codec" and "sound card". Signed-off-by: Nick Hollinghurst <[email protected]>
- Loading branch information
1 parent
5c070cf
commit 37d7eca
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
/* | ||
* Raspberry Pi 5 has a different Audio Out hardware from earlier Raspberry Pis. | ||
* It can output only to GPIOs 12 and 13. We therefore enable it *only* when | ||
* that particular GPIO mapping is requested here. To make it work with ASOC | ||
* we must also define a "dummy" codec and a generic audio card. | ||
*/ | ||
|
||
/ { | ||
compatible = "brcm,bcm2712"; | ||
|
||
fragment@0 { | ||
target = <&rp1_audio_out>; | ||
frag0: __overlay__ { | ||
pinctrl-0 = <&rp1_audio_out_12_13>; | ||
pinctrl-names = "default"; | ||
status = "ok"; | ||
}; | ||
}; | ||
|
||
fragment@1 { | ||
target-path = "/"; | ||
__overlay__ { | ||
|
||
simple_audio_codec: simple-audio-codec { | ||
compatible = "linux,spdif-dit"; | ||
#sound-dai-cells = <0>; | ||
status = "ok"; | ||
}; | ||
|
||
audio_out_card { | ||
compatible = "simple-audio-card"; | ||
simple-audio-card,name = "RP1-Audio-Out"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "ok"; | ||
|
||
simple-audio-card,dai-link@0 { | ||
reg = <0>; | ||
format = "left_j"; | ||
bitclock-master = <&sndcpu0>; | ||
frame-master = <&sndcpu0>; | ||
|
||
sndcpu0: cpu { | ||
sound-dai = <&rp1_audio_out>; | ||
}; | ||
|
||
codec { | ||
sound-dai = <&simple_audio_codec>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
swap_lr = <&frag0>, "swap_lr?"; | ||
pins_12_13 = <0>, "+0+1"; /* this is the default */ | ||
pins_18_19 = <0>, "-0-1"; /* sorry not supported */ | ||
pins_40_41 = <0>, "-0-1"; /* sorry not supported */ | ||
pins_40_45 = <0>, "-0-1"; /* sorry not supported */ | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
audremap { | ||
bcm2835; | ||
bcm2711; | ||
bcm2712 = "audremap-pi5"; | ||
}; | ||
|
||
balena-fin { | ||
|