Skip to content

Commit

Permalink
dt-bindings: dma: convert bcm2835-dma bindings to YAML
Browse files Browse the repository at this point in the history
Convert the DT binding document for bcm2835-dma from .txt to YAML.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230617133620.53129-3-stefan.wahren@i2se.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Stefan Wahren authored and Vinod Koul committed Jul 12, 2023
1 parent fbac8ce commit dfcfe38
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 83 deletions.
83 changes: 0 additions & 83 deletions Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt

This file was deleted.

102 changes: 102 additions & 0 deletions Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/dma/brcm,bcm2835-dma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: BCM2835 DMA controller

maintainers:
- Nicolas Saenz Julienne <nsaenz@kernel.org>

description:
The BCM2835 DMA controller has 16 channels in total. Only the lower
13 channels have an associated IRQ. Some arbitrary channels are used by the
VideoCore firmware (1,3,6,7 in the current firmware version). The channels
0, 2 and 3 have special functionality and should not be used by the driver.

allOf:
- $ref: dma-controller.yaml#

properties:
compatible:
const: brcm,bcm2835-dma

reg:
maxItems: 1

interrupts:
description:
Should contain the DMA interrupts associated to the DMA channels in
ascending order.
minItems: 1
maxItems: 16

interrupt-names:
minItems: 1
maxItems: 16

'#dma-cells':
description: The single cell represents the DREQ number.
const: 1

brcm,dma-channel-mask:
$ref: /schemas/types.yaml#/definitions/uint32
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.

unevaluatedProperties: false

required:
- compatible
- reg
- interrupts
- "#dma-cells"
- brcm,dma-channel-mask

examples:
- |
dma-controller@7e007000 {
compatible = "brcm,bcm2835-dma";
reg = <0x7e007000 0xf00>;
interrupts = <1 16>,
<1 17>,
<1 18>,
<1 19>,
<1 20>,
<1 21>,
<1 22>,
<1 23>,
<1 24>,
<1 25>,
<1 26>,
/* dma channel 11-14 share one irq */
<1 27>,
<1 27>,
<1 27>,
<1 27>,
/* unused shared irq for all channels */
<1 28>;
interrupt-names = "dma0",
"dma1",
"dma2",
"dma3",
"dma4",
"dma5",
"dma6",
"dma7",
"dma8",
"dma9",
"dma10",
"dma11",
"dma12",
"dma13",
"dma14",
"dma-shared-all";
#dma-cells = <1>;
brcm,dma-channel-mask = <0x7f35>;
};
...

0 comments on commit dfcfe38

Please sign in to comment.