Merge tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / dma / ti / k3-bcdma.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/dma/ti/k3-bcdma.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Texas Instruments K3 DMSS BCDMA Device Tree Bindings
8
9 maintainers:
10   - Peter Ujfalusi <peter.ujfalusi@ti.com>
11
12 description: |
13   The Block Copy DMA (BCDMA) is intended to perform similar functions as the TR
14   mode channels of K3 UDMA-P.
15   BCDMA includes block copy channels and Split channels.
16
17   Block copy channels mainly used for memory to memory transfers, but with
18   optional triggers a block copy channel can service peripherals by accessing
19   directly to memory mapped registers or area.
20
21   Split channels can be used to service PSI-L based peripherals.
22   The peripherals can be PSI-L native or legacy, non PSI-L native peripherals
23   with PDMAs. PDMA is tasked to act as a bridge between the PSI-L fabric and the
24   legacy peripheral.
25
26   PDMAs can be configured via BCDMA split channel's peer registers to match with
27   the configuration of the legacy peripheral.
28
29 allOf:
30   - $ref: /schemas/dma/dma-controller.yaml#
31
32 properties:
33   compatible:
34     const: ti,am64-dmss-bcdma
35
36   "#dma-cells":
37     const: 3
38     description: |
39       cell 1: type of the BCDMA channel to be used to service the peripheral:
40         0 - split channel
41         1 - block copy channel using global trigger 1
42         2 - block copy channel using global trigger 2
43         3 - block copy channel using local trigger
44
45       cell 2: parameter for the channel:
46         if cell 1 is 0 (split channel):
47           PSI-L thread ID of the remote (to BCDMA) end.
48           Valid ranges for thread ID depends on the data movement direction:
49           for source thread IDs (rx): 0 - 0x7fff
50           for destination thread IDs (tx): 0x8000 - 0xffff
51
52           Please refer to the device documentation for the PSI-L thread map and
53           also the PSI-L peripheral chapter for the correct thread ID.
54         if cell 1 is 1 or 2 (block copy channel using global trigger):
55           Unused, ignored
56
57           The trigger must be configured for the channel externally to BCDMA,
58           channels using global triggers should not be requested directly, but
59           via DMA event router.
60         if cell 1 is 3 (block copy channel using local trigger):
61           bchan number of the locally triggered channel
62
63       cell 3: ASEL value for the channel
64
65   reg:
66     maxItems: 5
67
68   reg-names:
69     items:
70       - const: gcfg
71       - const: bchanrt
72       - const: rchanrt
73       - const: tchanrt
74       - const: ringrt
75
76   msi-parent: true
77
78   ti,asel:
79     $ref: /schemas/types.yaml#/definitions/uint32
80     description: ASEL value for non slave channels
81
82   ti,sci-rm-range-bchan:
83     $ref: /schemas/types.yaml#/definitions/uint32-array
84     description: |
85       Array of BCDMA block-copy channel resource subtypes for resource
86       allocation for this host
87     minItems: 1
88     # Should be enough
89     maxItems: 255
90     items:
91       maximum: 0x3f
92
93   ti,sci-rm-range-tchan:
94     $ref: /schemas/types.yaml#/definitions/uint32-array
95     description: |
96       Array of BCDMA split tx channel resource subtypes for resource allocation
97       for this host
98     minItems: 1
99     # Should be enough
100     maxItems: 255
101     items:
102       maximum: 0x3f
103
104   ti,sci-rm-range-rchan:
105     $ref: /schemas/types.yaml#/definitions/uint32-array
106     description: |
107       Array of BCDMA split rx channel resource subtypes for resource allocation
108       for this host
109     minItems: 1
110     # Should be enough
111     maxItems: 255
112     items:
113       maximum: 0x3f
114
115 required:
116   - compatible
117   - "#dma-cells"
118   - reg
119   - reg-names
120   - msi-parent
121   - ti,sci
122   - ti,sci-dev-id
123   - ti,sci-rm-range-bchan
124   - ti,sci-rm-range-tchan
125   - ti,sci-rm-range-rchan
126
127 unevaluatedProperties: false
128
129 examples:
130   - |+
131     cbass_main {
132         #address-cells = <2>;
133         #size-cells = <2>;
134
135         main_dmss {
136             compatible = "simple-mfd";
137             #address-cells = <2>;
138             #size-cells = <2>;
139             dma-ranges;
140             ranges;
141
142             ti,sci-dev-id = <25>;
143
144             main_bcdma: dma-controller@485c0100 {
145                 compatible = "ti,am64-dmss-bcdma";
146
147                 reg = <0x0 0x485c0100 0x0 0x100>,
148                       <0x0 0x4c000000 0x0 0x20000>,
149                       <0x0 0x4a820000 0x0 0x20000>,
150                       <0x0 0x4aa40000 0x0 0x20000>,
151                       <0x0 0x4bc00000 0x0 0x100000>;
152                 reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
153                 msi-parent = <&inta_main_dmss>;
154                 #dma-cells = <3>;
155
156                 ti,sci = <&dmsc>;
157                 ti,sci-dev-id = <26>;
158
159                 ti,sci-rm-range-bchan = <0x20>; /* BLOCK_COPY_CHAN */
160                 ti,sci-rm-range-rchan = <0x21>; /* SPLIT_TR_RX_CHAN */
161                 ti,sci-rm-range-tchan = <0x22>; /* SPLIT_TR_TX_CHAN */
162             };
163         };
164     };