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