xref: /freebsd/sys/contrib/device-tree/Bindings/dma/snps,dma-spear1340.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/dma/snps,dma-spear1340.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Synopsys Designware DMA Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Viresh Kumar <vireshk@kernel.org>
11c66ec88fSEmmanuel Vadot  - Andy Shevchenko <andriy.shevchenko@linux.intel.com>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel VadotallOf:
14cb7aa33aSEmmanuel Vadot  - $ref: dma-controller.yaml#
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadotproperties:
17c66ec88fSEmmanuel Vadot  compatible:
18d5b0e70fSEmmanuel Vadot    oneOf:
19d5b0e70fSEmmanuel Vadot      - const: snps,dma-spear1340
20d5b0e70fSEmmanuel Vadot      - items:
21d5b0e70fSEmmanuel Vadot          - enum:
22d5b0e70fSEmmanuel Vadot              - renesas,r9a06g032-dma
23d5b0e70fSEmmanuel Vadot          - const: renesas,rzn1-dma
24d5b0e70fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot
26c66ec88fSEmmanuel Vadot  "#dma-cells":
276be33864SEmmanuel Vadot    minimum: 3
286be33864SEmmanuel Vadot    maximum: 4
29c66ec88fSEmmanuel Vadot    description: |
30c66ec88fSEmmanuel Vadot      First cell is a phandle pointing to the DMA controller. Second one is
31c66ec88fSEmmanuel Vadot      the DMA request line number. Third cell is the memory master identifier
32c66ec88fSEmmanuel Vadot      for transfers on dynamically allocated channel. Fourth cell is the
336be33864SEmmanuel Vadot      peripheral master identifier for transfers on an allocated channel. Fifth
346be33864SEmmanuel Vadot      cell is an optional mask of the DMA channels permitted to be allocated
356be33864SEmmanuel Vadot      for the corresponding client device.
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot  reg:
38c66ec88fSEmmanuel Vadot    maxItems: 1
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  interrupts:
41c66ec88fSEmmanuel Vadot    maxItems: 1
42c66ec88fSEmmanuel Vadot
43c66ec88fSEmmanuel Vadot  clocks:
44c66ec88fSEmmanuel Vadot    maxItems: 1
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot  clock-names:
47c66ec88fSEmmanuel Vadot    description: AHB interface reference clock.
48c66ec88fSEmmanuel Vadot    const: hclk
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  dma-channels:
51c66ec88fSEmmanuel Vadot    description: |
52c66ec88fSEmmanuel Vadot      Number of DMA channels supported by the controller. In case if
53c66ec88fSEmmanuel Vadot      not specified the driver will try to auto-detect this and
54c66ec88fSEmmanuel Vadot      the rest of the optional parameters.
55c66ec88fSEmmanuel Vadot    minimum: 1
56c66ec88fSEmmanuel Vadot    maximum: 8
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  dma-requests:
59c66ec88fSEmmanuel Vadot    minimum: 1
60c66ec88fSEmmanuel Vadot    maximum: 16
61c66ec88fSEmmanuel Vadot
62c66ec88fSEmmanuel Vadot  dma-masters:
635def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
64c66ec88fSEmmanuel Vadot    description: |
65c66ec88fSEmmanuel Vadot      Number of DMA masters supported by the controller. In case if
66c66ec88fSEmmanuel Vadot      not specified the driver will try to auto-detect this and
67c66ec88fSEmmanuel Vadot      the rest of the optional parameters.
68c66ec88fSEmmanuel Vadot    minimum: 1
69c66ec88fSEmmanuel Vadot    maximum: 4
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot  chan_allocation_order:
725def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
73c66ec88fSEmmanuel Vadot    description: |
74c66ec88fSEmmanuel Vadot      DMA channels allocation order specifier. Zero means ascending order
75c66ec88fSEmmanuel Vadot      (first free allocated), while one - descending (last free allocated).
76c66ec88fSEmmanuel Vadot    default: 0
77c66ec88fSEmmanuel Vadot    enum: [0, 1]
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadot  chan_priority:
805def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
81c66ec88fSEmmanuel Vadot    description: |
82c66ec88fSEmmanuel Vadot      DMA channels priority order. Zero means ascending channels priority
83c66ec88fSEmmanuel Vadot      so the very first channel has the highest priority. While 1 means
84c66ec88fSEmmanuel Vadot      descending priority (the last channel has the highest priority).
85c66ec88fSEmmanuel Vadot    default: 0
86c66ec88fSEmmanuel Vadot    enum: [0, 1]
87c66ec88fSEmmanuel Vadot
88c66ec88fSEmmanuel Vadot  block_size:
895def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
90c66ec88fSEmmanuel Vadot    description: Maximum block size supported by the DMA controller.
91c66ec88fSEmmanuel Vadot    enum: [3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095]
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot  data-width:
94c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
95c66ec88fSEmmanuel Vadot    description: Data bus width per each DMA master in bytes.
96*7d0873ebSEmmanuel Vadot    minItems: 1
97c66ec88fSEmmanuel Vadot    maxItems: 4
98c66ec88fSEmmanuel Vadot    items:
99c66ec88fSEmmanuel Vadot      enum: [4, 8, 16, 32]
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot  data_width:
102c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
103c66ec88fSEmmanuel Vadot    deprecated: true
104c66ec88fSEmmanuel Vadot    description: |
105c66ec88fSEmmanuel Vadot      Data bus width per each DMA master in (2^n * 8) bits. This property is
106c66ec88fSEmmanuel Vadot      deprecated. It' usage is discouraged in favor of data-width one. Moreover
107c66ec88fSEmmanuel Vadot      the property incorrectly permits to define data-bus width of 8 and 16
108c66ec88fSEmmanuel Vadot      bits, which is impossible in accordance with DW DMAC IP-core data book.
109*7d0873ebSEmmanuel Vadot    minItems: 1
110c66ec88fSEmmanuel Vadot    maxItems: 4
111c66ec88fSEmmanuel Vadot    items:
112c66ec88fSEmmanuel Vadot      enum:
113c66ec88fSEmmanuel Vadot        - 0 # 8 bits
114c66ec88fSEmmanuel Vadot        - 1 # 16 bits
115c66ec88fSEmmanuel Vadot        - 2 # 32 bits
116c66ec88fSEmmanuel Vadot        - 3 # 64 bits
117c66ec88fSEmmanuel Vadot        - 4 # 128 bits
118c66ec88fSEmmanuel Vadot        - 5 # 256 bits
119c66ec88fSEmmanuel Vadot      default: 0
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel Vadot  multi-block:
122c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
123c66ec88fSEmmanuel Vadot    description: |
124c66ec88fSEmmanuel Vadot      LLP-based multi-block transfer supported by hardware per
125c66ec88fSEmmanuel Vadot      each DMA channel.
126*7d0873ebSEmmanuel Vadot    minItems: 1
127c66ec88fSEmmanuel Vadot    maxItems: 8
128c66ec88fSEmmanuel Vadot    items:
129c66ec88fSEmmanuel Vadot      enum: [0, 1]
130c66ec88fSEmmanuel Vadot      default: 1
131c66ec88fSEmmanuel Vadot
132c66ec88fSEmmanuel Vadot  snps,max-burst-len:
133c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
134c66ec88fSEmmanuel Vadot    description: |
135c66ec88fSEmmanuel Vadot      Maximum length of the burst transactions supported by the controller.
136c66ec88fSEmmanuel Vadot      This property defines the upper limit of the run-time burst setting
137c66ec88fSEmmanuel Vadot      (CTLx.SRC_MSIZE/CTLx.DST_MSIZE fields) so the allowed burst length
138c66ec88fSEmmanuel Vadot      will be from 1 to max-burst-len words. It's an array property with one
139c66ec88fSEmmanuel Vadot      cell per channel in the units determined by the value set in the
140c66ec88fSEmmanuel Vadot      CTLx.SRC_TR_WIDTH/CTLx.DST_TR_WIDTH fields (data width).
141*7d0873ebSEmmanuel Vadot    minItems: 1
142c66ec88fSEmmanuel Vadot    maxItems: 8
143c66ec88fSEmmanuel Vadot    items:
144c66ec88fSEmmanuel Vadot      enum: [4, 8, 16, 32, 64, 128, 256]
145c66ec88fSEmmanuel Vadot      default: 256
146c66ec88fSEmmanuel Vadot
147c66ec88fSEmmanuel Vadot  snps,dma-protection-control:
1485def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
149c66ec88fSEmmanuel Vadot    description: |
150c66ec88fSEmmanuel Vadot      Bits one-to-one passed to the AHB HPROT[3:1] bus. Each bit setting
151c66ec88fSEmmanuel Vadot      indicates the following features: bit 0 - privileged mode,
152c66ec88fSEmmanuel Vadot      bit 1 - DMA is bufferable, bit 2 - DMA is cacheable.
153c66ec88fSEmmanuel Vadot    default: 0
154c66ec88fSEmmanuel Vadot    minimum: 0
155c66ec88fSEmmanuel Vadot    maximum: 7
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel VadotunevaluatedProperties: false
158c66ec88fSEmmanuel Vadot
159c66ec88fSEmmanuel Vadotrequired:
160c66ec88fSEmmanuel Vadot  - compatible
161c66ec88fSEmmanuel Vadot  - "#dma-cells"
162c66ec88fSEmmanuel Vadot  - reg
163c66ec88fSEmmanuel Vadot  - interrupts
164c66ec88fSEmmanuel Vadot
165c66ec88fSEmmanuel Vadotexamples:
166c66ec88fSEmmanuel Vadot  - |
167c66ec88fSEmmanuel Vadot    dma-controller@fc000000 {
168c66ec88fSEmmanuel Vadot      compatible = "snps,dma-spear1340";
169c66ec88fSEmmanuel Vadot      reg = <0xfc000000 0x1000>;
170c66ec88fSEmmanuel Vadot      interrupt-parent = <&vic1>;
171c66ec88fSEmmanuel Vadot      interrupts = <12>;
172c66ec88fSEmmanuel Vadot
173c66ec88fSEmmanuel Vadot      dma-channels = <8>;
174c66ec88fSEmmanuel Vadot      dma-requests = <16>;
175c66ec88fSEmmanuel Vadot      dma-masters = <4>;
176c66ec88fSEmmanuel Vadot      #dma-cells = <3>;
177c66ec88fSEmmanuel Vadot
178c66ec88fSEmmanuel Vadot      chan_allocation_order = <1>;
179c66ec88fSEmmanuel Vadot      chan_priority = <1>;
180c66ec88fSEmmanuel Vadot      block_size = <0xfff>;
181c66ec88fSEmmanuel Vadot      data-width = <8 8>;
182c66ec88fSEmmanuel Vadot      multi-block = <0 0 0 0 0 0 0 0>;
183c66ec88fSEmmanuel Vadot      snps,max-burst-len = <16 16 4 4 4 4 4 4>;
184c66ec88fSEmmanuel Vadot    };
185c66ec88fSEmmanuel Vadot...
186