Re: [PATCH v3 06/28] dt-bindings: dma: brcm,bcm2835-dma: Document dma-channel-mask and DREQ flags
From: Stefan Wahren
Date: Fri Nov 27 2026 - 13:23:37 EST
Hi Andrea,
Am 26.11.26 um 16:10 schrieb Andrea della Porta:
Hi Stefan,as I said I don't have strong opinion about this.
On 18:49 Mon 23 Nov , Stefan Wahren wrote:
Hi Andrea,Ack.
Am 23.11.26 um 15:56 schrieb Andrea della Porta:
The available channels are currently described by the vendor specificthis patch should before the bcm2835-dma patches which modify the dma-cell
brcm,dma-channel-mask property, while the generic dma-channel-mask
property from dma-common.yaml carries exactly the same information.
Allow the generic property and mark the vendor one as deprecated,
requiring at least one of them, so that device trees can provide both
for compatibility with older kernels.
The single specifier cell is also not limited to the DREQ number: the
driver interprets some of the upper bits as per-channel flags (AXI
priorities, wide accesses, burst and write-response handling). Document
the meaning of those bits.
Signed-off-by: Andrea della Porta <andrea.porta@xxxxxxxx>
behavior.
I agree it isn't pretty, but it is the encoding the downstream DTBs have been---No strong opinion, but mixing DREQ number with per-channel flags is ugly
.../bindings/dma/brcm,bcm2835-dma.yaml | 26 ++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
index c9b9a5490826..f619e395cf0d 100644
--- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
@@ -37,15 +37,30 @@ properties:
maxItems: 16
'#dma-cells':
- description: The single cell represents the DREQ number.
+ description: |
+ The single cell contains the DREQ number in bits 0-4, optionally
+ combined with the following per-channel flags:
+ bits 16-19: AXI priority
+ bits 20-23: AXI panic priority
+ bit 24: use wide (128-bit) source reads
+ bit 25: use wide (128-bit) destination writes
+ bit 27: do not wait for AXI write responses
+ bit 28: wait for outstanding writes before signalling completion
+ bit 29: do not pause the channel when the debug signal is asserted
+ bit 30: use multi-beat bursts
using for years. Switching to #dma-cells = <2> (or introducing new exotic properties)
would mean supporting both formats in the driver: I'm trying to play nice here in
order to not break compatibility with downstream DTBs, which I think should be wise.
The header I'll add in v4 with the definitions for these flags at least makes the
device trees readable.
Imho adding these configuration bits to the DREQ number was a downstream hack. Furthermore providing some kind of compatibility with downstream was never intended and cannot be guaranteed.
Best regards
Ack.const: 1I think, the dma-channel-mask stuff should be a separate change.
+ dma-channel-mask:
+ maxItems: 1
+
Regards,
Andrea
Best regards
brcm,dma-channel-mask:
$ref: /schemas/types.yaml#/definitions/uint32
+ deprecated: true
description:
Bitmask of available DMA channels in ascending order that are
not reserved by firmware and are available to the
kernel. i.e. first channel corresponds to LSB.
+ Use the generic dma-channel-mask property instead.
unevaluatedProperties: false
@@ -54,7 +69,12 @@ required:
- reg
- interrupts
- "#dma-cells"
- - brcm,dma-channel-mask
+
+anyOf:
+ - required:
+ - dma-channel-mask
+ - required:
+ - brcm,dma-channel-mask
examples:
- |
@@ -96,7 +116,7 @@ examples:
"dma14",
"dma-shared-all";
#dma-cells = <1>;
- brcm,dma-channel-mask = <0x7f35>;
+ dma-channel-mask = <0x7f35>;
};
...