From: Keguang Zhang <keguang.zhang@xxxxxxxxx> Add devicetree binding document for Loongson-1 DMA. Signed-off-by: Keguang Zhang <keguang.zhang@xxxxxxxxx> --- V5 -> V6: Change the compatible to the fallback Some minor fixes V4 -> V5: A newly added patch --- .../devicetree/bindings/dma/loongson,ls1x-dma.yaml | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/loongson,ls1x-dma.yaml b/Documentation/devicetree/bindings/dma/loongson,ls1x-dma.yaml new file mode 100644 index 000000000000..06358df725c6 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/loongson,ls1x-dma.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/loongson,ls1x-dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson-1 DMA Controller + +maintainers: + - Keguang Zhang <keguang.zhang@xxxxxxxxx> + +description: + Loongson-1 DMA controller provides 3 independent channels for + peripherals such as NAND and AC97. + +properties: + compatible: + oneOf: + - const: loongson,ls1b-dma + - items: + - enum: + - loongson,ls1c-dma + - const: loongson,ls1b-dma + + reg: + maxItems: 1 + + interrupts: + description: Each channel has a dedicated interrupt line. + minItems: 1 + maxItems: 3 + + interrupt-names: + minItems: 1 + items: + - pattern: ch0 + - pattern: ch1 + - pattern: ch2 + + '#dma-cells': + const: 1 + +required: + - compatible + - reg + - interrupts + - interrupt-names + - '#dma-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + dma-controller@1fd01160 { + compatible = "loongson,ls1b-dma"; + reg = <0x1fd01160 0x4>; + + interrupt-parent = <&intc0>; + interrupts = <13 IRQ_TYPE_EDGE_RISING>, + <14 IRQ_TYPE_EDGE_RISING>, + <15 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "ch0", "ch1", "ch2"; + + #dma-cells = <1>; + }; -- 2.40.1