Skip to content

Commit d98a8db

Browse files
Nicolas Saenz Julienneffainelli
authored andcommitted
ARM: dts: bcm2711: force CMA into first GB of memory
arm64 places the CMA in ZONE_DMA32, which is not good enough for the Raspberry Pi 4 since it contains peripherals that can only address the first GB of memory. Explicitly place the CMA into that area. Signed-off-by: Nicolas Saenz Julienne <[email protected]> Acked-by: Stefan Wahren <[email protected]> Signed-off-by: Florian Fainelli <[email protected]>
1 parent 4c365e2 commit d98a8db

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

arch/arm/boot/dts/bcm2711.dtsi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212

1313
interrupt-parent = <&gicv2>;
1414

15+
reserved-memory {
16+
#address-cells = <2>;
17+
#size-cells = <1>;
18+
ranges;
19+
20+
/*
21+
* arm64 reserves the CMA by default somewhere in ZONE_DMA32,
22+
* that's not good enough for the BCM2711 as some devices can
23+
* only address the lower 1G of memory (ZONE_DMA).
24+
*/
25+
linux,cma {
26+
compatible = "shared-dma-pool";
27+
size = <0x2000000>; /* 32MB */
28+
alloc-ranges = <0x0 0x00000000 0x40000000>;
29+
reusable;
30+
linux,cma-default;
31+
};
32+
};
33+
34+
1535
soc {
1636
/*
1737
* Defined ranges:

0 commit comments

Comments
 (0)