Skip to content

Commit 6a747c3

Browse files
RodrigoRosmaninhopopcornmix
authored andcommitted
Add pcie-32bit-dma-overlay-pi5 to enable 32bit DMA on the Pi 5's external PCIe
Changes dma-ranges in the pcie1 component of the bcm2712 dts in order to ensure that the DMA addressing space is 32bits, at the expense of having to bounce buffers. Signed-off-by: Rodrigo Rosmaninho <[email protected]>
1 parent 4184c4f commit 6a747c3

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
183183
pca953x.dtbo \
184184
pcf857x.dtbo \
185185
pcie-32bit-dma.dtbo \
186+
pcie-32bit-dma-pi5.dtbo \
186187
pibell.dtbo \
187188
pifacedigital.dtbo \
188189
pifi-40.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3394,6 +3394,12 @@ Load: dtoverlay=pcie-32bit-dma
33943394
Params: <None>
33953395

33963396

3397+
Name: pcie-32bit-dma-pi5
3398+
Info: Force PCIe config to support 32bit DMA addresses at the expense of
3399+
having to bounce buffers (on the Pi 5).
3400+
Load: dtoverlay=pcie-32bit-dma-pi5
3401+
Params: <None>
3402+
33973403
[ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ]
33983404

33993405

arch/arm/boot/dts/overlays/overlay_map.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@
185185

186186
pcie-32bit-dma {
187187
bcm2711;
188+
bcm2712 = "pcie-32bit-dma-pi5";
189+
};
190+
191+
pcie-32bit-dma-pi5 {
192+
bcm2712;
188193
};
189194

190195
pi3-act-led {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* pcie-32bit-dma-pi5-overlay.dts
3+
*/
4+
5+
/dts-v1/;
6+
/plugin/;
7+
8+
/ {
9+
compatible = "brcm,bcm2712";
10+
11+
fragment@0 {
12+
target = <&pcie1>;
13+
__overlay__ {
14+
/*
15+
* The size of the range is rounded up to a power of 2,
16+
* so the range ends up being 0-4GB, and the MSI vector
17+
* gets pushed beyond 4GB.
18+
*/
19+
#address-cells = <3>;
20+
#size-cells = <2>;
21+
dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000
22+
0x0 0x80000000>;
23+
};
24+
};
25+
26+
};

0 commit comments

Comments
 (0)