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/st,stm32-mdma.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: STMicroelectronics STM32 MDMA Controller bindings
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cidescription: |
108c2ecf20Sopenharmony_ci  The STM32 MDMA is a general-purpose direct memory access controller capable of
118c2ecf20Sopenharmony_ci  supporting 64 independent DMA channels with 256 HW requests.
128c2ecf20Sopenharmony_ci  DMA clients connected to the STM32 MDMA controller must use the format
138c2ecf20Sopenharmony_ci  described in the dma.txt file, using a five-cell specifier for each channel:
148c2ecf20Sopenharmony_ci  a phandle to the MDMA controller plus the following five integer cells:
158c2ecf20Sopenharmony_ci    1. The request line number
168c2ecf20Sopenharmony_ci    2. The priority level
178c2ecf20Sopenharmony_ci      0x0: Low
188c2ecf20Sopenharmony_ci      0x1: Medium
198c2ecf20Sopenharmony_ci      0x2: High
208c2ecf20Sopenharmony_ci      0x3: Very high
218c2ecf20Sopenharmony_ci    3. A 32bit mask specifying the DMA channel configuration
228c2ecf20Sopenharmony_ci      -bit 0-1: Source increment mode
238c2ecf20Sopenharmony_ci        0x0: Source address pointer is fixed
248c2ecf20Sopenharmony_ci        0x2: Source address pointer is incremented after each data transfer
258c2ecf20Sopenharmony_ci        0x3: Source address pointer is decremented after each data transfer
268c2ecf20Sopenharmony_ci      -bit 2-3: Destination increment mode
278c2ecf20Sopenharmony_ci        0x0: Destination address pointer is fixed
288c2ecf20Sopenharmony_ci        0x2: Destination address pointer is incremented after each data transfer
298c2ecf20Sopenharmony_ci        0x3: Destination address pointer is decremented after each data transfer
308c2ecf20Sopenharmony_ci      -bit 8-9: Source increment offset size
318c2ecf20Sopenharmony_ci        0x0: byte (8bit)
328c2ecf20Sopenharmony_ci        0x1: half-word (16bit)
338c2ecf20Sopenharmony_ci        0x2: word (32bit)
348c2ecf20Sopenharmony_ci        0x3: double-word (64bit)
358c2ecf20Sopenharmony_ci      -bit 10-11: Destination increment offset size
368c2ecf20Sopenharmony_ci        0x0: byte (8bit)
378c2ecf20Sopenharmony_ci        0x1: half-word (16bit)
388c2ecf20Sopenharmony_ci        0x2: word (32bit)
398c2ecf20Sopenharmony_ci        0x3: double-word (64bit)
408c2ecf20Sopenharmony_ci      -bit 25-18: The number of bytes to be transferred in a single transfer
418c2ecf20Sopenharmony_ci                  (min = 1 byte, max = 128 bytes)
428c2ecf20Sopenharmony_ci      -bit 29:28: Trigger Mode
438c2ecf20Sopenharmony_ci        0x00: Each MDMA request triggers a buffer transfer (max 128 bytes)
448c2ecf20Sopenharmony_ci        0x1: Each MDMA request triggers a block transfer (max 64K bytes)
458c2ecf20Sopenharmony_ci        0x2: Each MDMA request triggers a repeated block transfer
468c2ecf20Sopenharmony_ci        0x3: Each MDMA request triggers a linked list transfer
478c2ecf20Sopenharmony_ci    4. A 32bit value specifying the register to be used to acknowledge the request
488c2ecf20Sopenharmony_ci       if no HW ack signal is used by the MDMA client
498c2ecf20Sopenharmony_ci    5. A 32bit mask specifying the value to be written to acknowledge the request
508c2ecf20Sopenharmony_ci       if no HW ack signal is used by the MDMA client
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_cimaintainers:
538c2ecf20Sopenharmony_ci  - Amelie Delaunay <amelie.delaunay@st.com>
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciallOf:
568c2ecf20Sopenharmony_ci  - $ref: "dma-controller.yaml#"
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciproperties:
598c2ecf20Sopenharmony_ci  "#dma-cells":
608c2ecf20Sopenharmony_ci    const: 5
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci  compatible:
638c2ecf20Sopenharmony_ci    const: st,stm32h7-mdma
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci  reg:
668c2ecf20Sopenharmony_ci    maxItems: 1
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci  clocks:
698c2ecf20Sopenharmony_ci    maxItems: 1
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci  interrupts:
728c2ecf20Sopenharmony_ci    maxItems: 1
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci  resets:
758c2ecf20Sopenharmony_ci    maxItems: 1
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci  st,ahb-addr-masks:
788c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32-array
798c2ecf20Sopenharmony_ci    description: Array of u32 mask to list memory devices addressed via AHB bus.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_cirequired:
828c2ecf20Sopenharmony_ci  - compatible
838c2ecf20Sopenharmony_ci  - reg
848c2ecf20Sopenharmony_ci  - clocks
858c2ecf20Sopenharmony_ci  - interrupts
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ciunevaluatedProperties: false
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ciexamples:
908c2ecf20Sopenharmony_ci  - |
918c2ecf20Sopenharmony_ci    #include <dt-bindings/interrupt-controller/arm-gic.h>
928c2ecf20Sopenharmony_ci    #include <dt-bindings/clock/stm32mp1-clks.h>
938c2ecf20Sopenharmony_ci    #include <dt-bindings/reset/stm32mp1-resets.h>
948c2ecf20Sopenharmony_ci    dma-controller@52000000 {
958c2ecf20Sopenharmony_ci      compatible = "st,stm32h7-mdma";
968c2ecf20Sopenharmony_ci      reg = <0x52000000 0x1000>;
978c2ecf20Sopenharmony_ci      interrupts = <122>;
988c2ecf20Sopenharmony_ci      clocks = <&timer_clk>;
998c2ecf20Sopenharmony_ci      resets = <&rcc 992>;
1008c2ecf20Sopenharmony_ci      #dma-cells = <5>;
1018c2ecf20Sopenharmony_ci      dma-channels = <16>;
1028c2ecf20Sopenharmony_ci      dma-requests = <32>;
1038c2ecf20Sopenharmony_ci      st,ahb-addr-masks = <0x20000000>, <0x00000000>;
1048c2ecf20Sopenharmony_ci    };
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci...
1078c2ecf20Sopenharmony_ci
108