| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
# Copyright (C) 2020 Texas Instruments Incorporated |
| 3 |
# Author: Peter Ujfalusi <[email protected]> |
| 4 |
%YAML 1.2 |
| 5 |
--- |
| 6 |
$id: http://devicetree.org/schemas/dma/ti/k3-bcdma.yaml# |
| 7 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 8 |
|
| 9 |
title: Texas Instruments K3 DMSS BCDMA |
| 10 |
|
| 11 |
maintainers: |
| 12 |
- Peter Ujfalusi <[email protected]> |
| 13 |
|
| 14 |
description: | |
| 15 |
The Block Copy DMA (BCDMA) is intended to perform similar functions as the TR |
| 16 |
mode channels of K3 UDMA-P. |
| 17 |
BCDMA includes block copy channels and Split channels. |
| 18 |
|
| 19 |
Block copy channels mainly used for memory to memory transfers, but with |
| 20 |
optional triggers a block copy channel can service peripherals by accessing |
| 21 |
directly to memory mapped registers or area. |
| 22 |
|
| 23 |
Split channels can be used to service PSI-L based peripherals. |
| 24 |
The peripherals can be PSI-L native or legacy, non PSI-L native peripherals |
| 25 |
with PDMAs. PDMA is tasked to act as a bridge between the PSI-L fabric and the |
| 26 |
legacy peripheral. |
| 27 |
|
| 28 |
PDMAs can be configured via BCDMA split channel's peer registers to match with |
| 29 |
the configuration of the legacy peripheral. |
| 30 |
|
| 31 |
properties: |
| 32 |
compatible: |
| 33 |
enum: |
| 34 |
- ti,am62a-dmss-bcdma-csirx |
| 35 |
- ti,am64-dmss-bcdma |
| 36 |
- ti,j721s2-dmss-bcdma-csi |
| 37 |
- ti,j722s-dmss-bcdma-csi |
| 38 |
|
| 39 |
reg: |
| 40 |
minItems: 3 |
| 41 |
maxItems: 9 |
| 42 |
|
| 43 |
reg-names: |
| 44 |
minItems: 3 |
| 45 |
maxItems: 9 |
| 46 |
|
| 47 |
"#dma-cells": |
| 48 |
const: 3 |
| 49 |
description: | |
| 50 |
cell 1: type of the BCDMA channel to be used to service the peripheral: |
| 51 |
0 - split channel |
| 52 |
1 - block copy channel using global trigger 1 |
| 53 |
2 - block copy channel using global trigger 2 |
| 54 |
3 - block copy channel using local trigger |
| 55 |
|
| 56 |
cell 2: parameter for the channel: |
| 57 |
if cell 1 is 0 (split channel): |
| 58 |
PSI-L thread ID of the remote (to BCDMA) end. |
| 59 |
Valid ranges for thread ID depends on the data movement direction: |
| 60 |
for source thread IDs (rx): 0 - 0x7fff |
| 61 |
for destination thread IDs (tx): 0x8000 - 0xffff |
| 62 |
|
| 63 |
Please refer to the device documentation for the PSI-L thread map and |
| 64 |
also the PSI-L peripheral chapter for the correct thread ID. |
| 65 |
if cell 1 is 1 or 2 (block copy channel using global trigger): |
| 66 |
Unused, ignored |
| 67 |
|
| 68 |
The trigger must be configured for the channel externally to BCDMA, |
| 69 |
channels using global triggers should not be requested directly, but |
| 70 |
via DMA event router. |
| 71 |
if cell 1 is 3 (block copy channel using local trigger): |
| 72 |
bchan number of the locally triggered channel |
| 73 |
|
| 74 |
cell 3: ASEL value for the channel |
| 75 |
|
| 76 |
msi-parent: true |
| 77 |
|
| 78 |
power-domains: |
| 79 |
description: |
| 80 |
Power domain if available |
| 81 |
maxItems: 1 |
| 82 |
|
| 83 |
ti,asel: |
| 84 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 85 |
description: ASEL value for non slave channels |
| 86 |
|
| 87 |
ti,sci-rm-range-bchan: |
| 88 |
$ref: /schemas/types.yaml#/definitions/uint32-array |
| 89 |
description: | |
| 90 |
Array of BCDMA block-copy channel resource subtypes for resource |
| 91 |
allocation for this host |
| 92 |
minItems: 1 |
| 93 |
# Should be enough |
| 94 |
maxItems: 255 |
| 95 |
items: |
| 96 |
maximum: 0x3f |
| 97 |
|
| 98 |
ti,sci-rm-range-tchan: |
| 99 |
$ref: /schemas/types.yaml#/definitions/uint32-array |
| 100 |
description: | |
| 101 |
Array of BCDMA split tx channel resource subtypes for resource allocation |
| 102 |
for this host |
| 103 |
minItems: 1 |
| 104 |
# Should be enough |
| 105 |
maxItems: 255 |
| 106 |
items: |
| 107 |
maximum: 0x3f |
| 108 |
|
| 109 |
ti,sci-rm-range-rchan: |
| 110 |
$ref: /schemas/types.yaml#/definitions/uint32-array |
| 111 |
description: | |
| 112 |
Array of BCDMA split rx channel resource subtypes for resource allocation |
| 113 |
for this host |
| 114 |
minItems: 1 |
| 115 |
# Should be enough |
| 116 |
maxItems: 255 |
| 117 |
items: |
| 118 |
maximum: 0x3f |
| 119 |
|
| 120 |
required: |
| 121 |
- compatible |
| 122 |
- "#dma-cells" |
| 123 |
- reg |
| 124 |
- reg-names |
| 125 |
- msi-parent |
| 126 |
- ti,sci |
| 127 |
- ti,sci-dev-id |
| 128 |
- ti,sci-rm-range-rchan |
| 129 |
|
| 130 |
allOf: |
| 131 |
- $ref: /schemas/dma/dma-controller.yaml# |
| 132 |
- $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml# |
| 133 |
|
| 134 |
- if: |
| 135 |
properties: |
| 136 |
compatible: |
| 137 |
contains: |
| 138 |
const: ti,am62a-dmss-bcdma-csirx |
| 139 |
then: |
| 140 |
properties: |
| 141 |
ti,sci-rm-range-bchan: false |
| 142 |
ti,sci-rm-range-tchan: false |
| 143 |
|
| 144 |
reg: |
| 145 |
items: |
| 146 |
- description: BCDMA Control /Status Registers region |
| 147 |
- description: RX Channel Realtime Registers region |
| 148 |
- description: Ring Realtime Registers region |
| 149 |
|
| 150 |
reg-names: |
| 151 |
items: |
| 152 |
- const: gcfg |
| 153 |
- const: rchanrt |
| 154 |
- const: ringrt |
| 155 |
|
| 156 |
required: |
| 157 |
- power-domains |
| 158 |
|
| 159 |
- if: |
| 160 |
properties: |
| 161 |
compatible: |
| 162 |
contains: |
| 163 |
const: ti,am64-dmss-bcdma |
| 164 |
then: |
| 165 |
properties: |
| 166 |
reg: |
| 167 |
minItems: 5 |
| 168 |
items: |
| 169 |
- description: BCDMA Control /Status Registers region |
| 170 |
- description: Block Copy Channel Realtime Registers region |
| 171 |
- description: RX Channel Realtime Registers region |
| 172 |
- description: TX Channel Realtime Registers region |
| 173 |
- description: Ring Realtime Registers region |
| 174 |
- description: Ring Configuration Registers region |
| 175 |
- description: TX Channel Configuration Registers region |
| 176 |
- description: RX Channel Configuration Registers region |
| 177 |
- description: Block Copy Channel Configuration Registers region |
| 178 |
|
| 179 |
reg-names: |
| 180 |
minItems: 5 |
| 181 |
items: |
| 182 |
- const: gcfg |
| 183 |
- const: bchanrt |
| 184 |
- const: rchanrt |
| 185 |
- const: tchanrt |
| 186 |
- const: ringrt |
| 187 |
- const: ring |
| 188 |
- const: tchan |
| 189 |
- const: rchan |
| 190 |
- const: bchan |
| 191 |
|
| 192 |
required: |
| 193 |
- ti,sci-rm-range-bchan |
| 194 |
- ti,sci-rm-range-tchan |
| 195 |
|
| 196 |
- if: |
| 197 |
properties: |
| 198 |
compatible: |
| 199 |
contains: |
| 200 |
enum: |
| 201 |
- ti,j721s2-dmss-bcdma-csi |
| 202 |
- ti,j722s-dmss-bcdma-csi |
| 203 |
then: |
| 204 |
properties: |
| 205 |
ti,sci-rm-range-bchan: false |
| 206 |
|
| 207 |
reg: |
| 208 |
items: |
| 209 |
- description: BCDMA Control /Status Registers region |
| 210 |
- description: RX Channel Realtime Registers region |
| 211 |
- description: TX Channel Realtime Registers region |
| 212 |
- description: Ring Realtime Registers region |
| 213 |
|
| 214 |
reg-names: |
| 215 |
items: |
| 216 |
- const: gcfg |
| 217 |
- const: rchanrt |
| 218 |
- const: tchanrt |
| 219 |
- const: ringrt |
| 220 |
|
| 221 |
required: |
| 222 |
- ti,sci-rm-range-tchan |
| 223 |
|
| 224 |
unevaluatedProperties: false |
| 225 |
|
| 226 |
examples: |
| 227 |
- |+ |
| 228 |
cbass_main { |
| 229 |
#address-cells = <2>; |
| 230 |
#size-cells = <2>; |
| 231 |
|
| 232 |
main_dmss { |
| 233 |
compatible = "simple-mfd"; |
| 234 |
#address-cells = <2>; |
| 235 |
#size-cells = <2>; |
| 236 |
dma-ranges; |
| 237 |
ranges; |
| 238 |
|
| 239 |
ti,sci-dev-id = <25>; |
| 240 |
|
| 241 |
main_bcdma: dma-controller@485c0100 { |
| 242 |
compatible = "ti,am64-dmss-bcdma"; |
| 243 |
|
| 244 |
reg = <0x0 0x485c0100 0x0 0x100>, |
| 245 |
<0x0 0x4c000000 0x0 0x20000>, |
| 246 |
<0x0 0x4a820000 0x0 0x20000>, |
| 247 |
<0x0 0x4aa40000 0x0 0x20000>, |
| 248 |
<0x0 0x4bc00000 0x0 0x100000>, |
| 249 |
<0x0 0x48600000 0x0 0x8000>, |
| 250 |
<0x0 0x484a4000 0x0 0x2000>, |
| 251 |
<0x0 0x484c2000 0x0 0x2000>, |
| 252 |
<0x0 0x48420000 0x0 0x2000>; |
| 253 |
reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt", |
| 254 |
"ring", "tchan", "rchan", "bchan"; |
| 255 |
msi-parent = <&inta_main_dmss>; |
| 256 |
#dma-cells = <3>; |
| 257 |
|
| 258 |
ti,sci = <&dmsc>; |
| 259 |
ti,sci-dev-id = <26>; |
| 260 |
|
| 261 |
ti,sci-rm-range-bchan = <0x20>; /* BLOCK_COPY_CHAN */ |
| 262 |
ti,sci-rm-range-rchan = <0x21>; /* SPLIT_TR_RX_CHAN */ |
| 263 |
ti,sci-rm-range-tchan = <0x22>; /* SPLIT_TR_TX_CHAN */ |
| 264 |
}; |
| 265 |
}; |
| 266 |
}; |