[PATCH v3 19/28] ARM: dts: broadcom: Describe the peripheral window in dma-ranges
From: Andrea della Porta
Date: Mon Nov 23 2026 - 09:55:48 EST
The DMA controllers of the BCM283x family and of BCM2711 see the
peripherals at their VideoCore bus addresses, i.e. at the child
addresses of the soc bus. This translation is not described by the
dma-ranges property, which only covers the RAM, so that the DMA engine
driver cannot translate the CPU physical addresses of the peripheral
FIFOs and had to rely on its clients providing bus addresses instead.
Add the peripheral window to dma-ranges, mirroring the ranges property
(minus the ARM local peripherals, which are not reachable by the DMA
controllers), so that dma_map_resource() can do the translation.
This does not change the bus DMA limit of the devices on these buses,
which is still given by the RAM window except on BCM2835, where it is
raised from 0x5fffffff to 0x7fffffff without affecting the DMA mask
derived from it.
Signed-off-by: Andrea della Porta <andrea.porta@xxxxxxxx>
---
arch/arm/boot/dts/broadcom/bcm2711.dtsi | 8 ++++++--
arch/arm/boot/dts/broadcom/bcm2835.dtsi | 3 ++-
arch/arm/boot/dts/broadcom/bcm2836.dtsi | 3 ++-
arch/arm/boot/dts/broadcom/bcm2837.dtsi | 3 ++-
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/broadcom/bcm2711.dtsi b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
index 5e3b4bb39396..f475422796d8 100644
--- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
@@ -41,8 +41,12 @@ soc {
ranges = <0x7e000000 0x0 0xfe000000 0x01800000>,
<0x7c000000 0x0 0xfc000000 0x02000000>,
<0x40000000 0x0 0xff800000 0x00800000>;
- /* Emulate a contiguous 30-bit address range for DMA */
- dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>;
+ /*
+ * Emulate a contiguous 30-bit address range for DMA, and
+ * let the DMA controllers reach the peripherals
+ */
+ dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>,
+ <0x7c000000 0x0 0xfc000000 0x03800000>;
/*
* This node is the provider for the enable-method for
diff --git a/arch/arm/boot/dts/broadcom/bcm2835.dtsi b/arch/arm/boot/dts/broadcom/bcm2835.dtsi
index 15cb331febbb..3a9719e2fadc 100644
--- a/arch/arm/boot/dts/broadcom/bcm2835.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2835.dtsi
@@ -35,7 +35,8 @@ cpu@0 {
soc {
ranges = <0x7e000000 0x20000000 0x02000000>;
- dma-ranges = <0x40000000 0x00000000 0x20000000>;
+ dma-ranges = <0x40000000 0x00000000 0x20000000>,
+ <0x7e000000 0x20000000 0x02000000>;
};
arm-pmu {
diff --git a/arch/arm/boot/dts/broadcom/bcm2836.dtsi b/arch/arm/boot/dts/broadcom/bcm2836.dtsi
index 783fe624ba68..4ab7769c056a 100644
--- a/arch/arm/boot/dts/broadcom/bcm2836.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2836.dtsi
@@ -8,7 +8,8 @@ / {
soc {
ranges = <0x7e000000 0x3f000000 0x1000000>,
<0x40000000 0x40000000 0x00001000>;
- dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
+ dma-ranges = <0xc0000000 0x00000000 0x3f000000>,
+ <0x7e000000 0x3f000000 0x01000000>;
local_intc: interrupt-controller@40000000 {
compatible = "brcm,bcm2836-l1-intc";
diff --git a/arch/arm/boot/dts/broadcom/bcm2837.dtsi b/arch/arm/boot/dts/broadcom/bcm2837.dtsi
index c281697142b1..ba44cfb07668 100644
--- a/arch/arm/boot/dts/broadcom/bcm2837.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2837.dtsi
@@ -7,7 +7,8 @@ / {
soc {
ranges = <0x7e000000 0x3f000000 0x1000000>,
<0x40000000 0x40000000 0x00001000>;
- dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
+ dma-ranges = <0xc0000000 0x00000000 0x3f000000>,
+ <0x7e000000 0x3f000000 0x01000000>;
local_intc: interrupt-controller@40000000 {
compatible = "brcm,bcm2836-l1-intc";
--
2.51.0