18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/dma/ingenic,dma.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: Ingenic SoCs DMA Controller DT bindings
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - Paul Cercueil <paul@crapouillou.net>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciallOf:
138c2ecf20Sopenharmony_ci  - $ref: "dma-controller.yaml#"
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciproperties:
168c2ecf20Sopenharmony_ci  compatible:
178c2ecf20Sopenharmony_ci    enum:
188c2ecf20Sopenharmony_ci      - ingenic,jz4740-dma
198c2ecf20Sopenharmony_ci      - ingenic,jz4725b-dma
208c2ecf20Sopenharmony_ci      - ingenic,jz4770-dma
218c2ecf20Sopenharmony_ci      - ingenic,jz4780-dma
228c2ecf20Sopenharmony_ci      - ingenic,x1000-dma
238c2ecf20Sopenharmony_ci      - ingenic,x1830-dma
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci  reg:
268c2ecf20Sopenharmony_ci    items:
278c2ecf20Sopenharmony_ci      - description: Channel-specific registers
288c2ecf20Sopenharmony_ci      - description: System control registers
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci  interrupts:
318c2ecf20Sopenharmony_ci    maxItems: 1
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci  clocks:
348c2ecf20Sopenharmony_ci    maxItems: 1
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci  "#dma-cells":
378c2ecf20Sopenharmony_ci    const: 2
388c2ecf20Sopenharmony_ci    description: >
398c2ecf20Sopenharmony_ci      DMA clients must use the format described in dma.txt, giving a phandle
408c2ecf20Sopenharmony_ci      to the DMA controller plus the following 2 integer cells:
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci      - Request type: The DMA request type for transfers to/from the
438c2ecf20Sopenharmony_ci        device on the allocated channel, as defined in the SoC documentation.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci      - Channel: If set to 0xffffffff, any available channel will be allocated
468c2ecf20Sopenharmony_ci        for the client. Otherwise, the exact channel specified will be used.
478c2ecf20Sopenharmony_ci        The channel should be reserved on the DMA controller using the
488c2ecf20Sopenharmony_ci        ingenic,reserved-channels property.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci  ingenic,reserved-channels:
518c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#definitions/uint32
528c2ecf20Sopenharmony_ci    description: >
538c2ecf20Sopenharmony_ci      Bitmask of channels to reserve for devices that need a specific
548c2ecf20Sopenharmony_ci      channel. These channels will only be assigned when explicitely
558c2ecf20Sopenharmony_ci      requested by a client. The primary use for this is channels 0 and
568c2ecf20Sopenharmony_ci      1, which can be configured to have special behaviour for NAND/BCH
578c2ecf20Sopenharmony_ci      when using programmable firmware.
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_cirequired:
608c2ecf20Sopenharmony_ci  - compatible
618c2ecf20Sopenharmony_ci  - reg
628c2ecf20Sopenharmony_ci  - interrupts
638c2ecf20Sopenharmony_ci  - clocks
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciunevaluatedProperties: false
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciexamples:
688c2ecf20Sopenharmony_ci  - |
698c2ecf20Sopenharmony_ci    #include <dt-bindings/clock/jz4780-cgu.h>
708c2ecf20Sopenharmony_ci    dma: dma-controller@13420000 {
718c2ecf20Sopenharmony_ci      compatible = "ingenic,jz4780-dma";
728c2ecf20Sopenharmony_ci      reg = <0x13420000 0x400>, <0x13421000 0x40>;
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci      interrupt-parent = <&intc>;
758c2ecf20Sopenharmony_ci      interrupts = <10>;
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci      clocks = <&cgu JZ4780_CLK_PDMA>;
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci      #dma-cells = <2>;
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci      ingenic,reserved-channels = <0x3>;
828c2ecf20Sopenharmony_ci    };
83