[PATCH v3 06/28] dt-bindings: dma: brcm,bcm2835-dma: Document dma-channel-mask and DREQ flags

Stefan Wahren wahrenst at gmx.net
Fri Nov 27 13:31:47 PST 2026


Hi Andrea,

Am 27.11.26 um 19:58 schrieb Andrea della Porta:
> Hi Stefan,
>
> On 19:23 Fri 27 Nov     , Stefan Wahren wrote:
>> Hi Andrea,
>>
>> Am 26.11.26 um 16:10 schrieb Andrea della Porta:
>>> Hi Stefan,
>>>
>>> On 18:49 Mon 23 Nov     , Stefan Wahren wrote:
>>>> Hi Andrea,
>>>>
>>>> Am 23.11.26 um 15:56 schrieb Andrea della Porta:
>>>>> The available channels are currently described by the vendor specific
>>>>> 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 at suse.com>
>>>> this patch should before the bcm2835-dma patches which modify the dma-cell
>>>> behavior.
>>> Ack.
>>>
>>>>> ---
>>>>>     .../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
>>>> No strong opinion, but mixing DREQ number with per-channel flags is ugly
>>> I agree it isn't pretty, but it is the encoding the downstream DTBs have been
>>> 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.
>> as I said I don't have strong opinion about this.
>>
>> 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.
> Fine then, let's move those flags to teh second dma cell.
since I'm not a maintainer, maybe we should wait for at least one of them.

Best regards
>
> Thanks,
> Andrea
>
>> Best regards
>>>>>         const: 1
>>>>> +  dma-channel-mask:
>>>>> +    maxItems: 1
>>>>> +
>>>> I think, the dma-channel-mask stuff should be a separate change.
>>> Ack.
>>>
>>> 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>;
>>>>>         };
>>>>>     ...




More information about the linux-arm-kernel mailing list