| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/dma/renesas,rz-dmac.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Renesas RZ DMA Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Biju Das <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
compatible: |
| 14 |
oneOf: |
| 15 |
- items: |
| 16 |
- enum: |
| 17 |
- renesas,r7s72100-dmac # RZ/A1H |
| 18 |
- renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five |
| 19 |
- renesas,r9a07g044-dmac # RZ/G2{L,LC} |
| 20 |
- renesas,r9a07g054-dmac # RZ/V2L |
| 21 |
- renesas,r9a08g045-dmac # RZ/G3S |
| 22 |
- const: renesas,rz-dmac |
| 23 |
|
| 24 |
- items: |
| 25 |
- enum: |
| 26 |
- renesas,r9a09g047-dmac # RZ/G3E |
| 27 |
- renesas,r9a09g056-dmac # RZ/V2N |
| 28 |
- const: renesas,r9a09g057-dmac |
| 29 |
|
| 30 |
- const: renesas,r9a09g057-dmac # RZ/V2H(P) |
| 31 |
|
| 32 |
reg: |
| 33 |
items: |
| 34 |
- description: Control and channel register block |
| 35 |
- description: DMA extended resource selector block |
| 36 |
minItems: 1 |
| 37 |
|
| 38 |
interrupts: |
| 39 |
maxItems: 17 |
| 40 |
|
| 41 |
interrupt-names: |
| 42 |
items: |
| 43 |
- const: error |
| 44 |
- const: ch0 |
| 45 |
- const: ch1 |
| 46 |
- const: ch2 |
| 47 |
- const: ch3 |
| 48 |
- const: ch4 |
| 49 |
- const: ch5 |
| 50 |
- const: ch6 |
| 51 |
- const: ch7 |
| 52 |
- const: ch8 |
| 53 |
- const: ch9 |
| 54 |
- const: ch10 |
| 55 |
- const: ch11 |
| 56 |
- const: ch12 |
| 57 |
- const: ch13 |
| 58 |
- const: ch14 |
| 59 |
- const: ch15 |
| 60 |
|
| 61 |
clocks: |
| 62 |
items: |
| 63 |
- description: DMA main clock |
| 64 |
- description: DMA register access clock |
| 65 |
minItems: 1 |
| 66 |
|
| 67 |
clock-names: |
| 68 |
items: |
| 69 |
- const: main |
| 70 |
- const: register |
| 71 |
|
| 72 |
'#dma-cells': |
| 73 |
const: 1 |
| 74 |
description: |
| 75 |
The cell specifies the encoded MID/RID or the REQ No values of |
| 76 |
the DMAC port connected to the DMA client and the slave channel |
| 77 |
configuration parameters. |
| 78 |
bits[0:9] - Specifies the MID/RID or the REQ No value |
| 79 |
bit[10] - Specifies DMA request high enable (HIEN) |
| 80 |
bit[11] - Specifies DMA request detection type (LVL) |
| 81 |
bits[12:14] - Specifies DMAACK output mode (AM) |
| 82 |
bit[15] - Specifies Transfer Mode (TM) |
| 83 |
|
| 84 |
dma-channels: |
| 85 |
const: 16 |
| 86 |
|
| 87 |
power-domains: |
| 88 |
maxItems: 1 |
| 89 |
|
| 90 |
resets: |
| 91 |
items: |
| 92 |
- description: Reset for DMA ARESETN reset terminal |
| 93 |
- description: Reset for DMA RST_ASYNC reset terminal |
| 94 |
minItems: 1 |
| 95 |
|
| 96 |
reset-names: |
| 97 |
items: |
| 98 |
- const: arst |
| 99 |
- const: rst_async |
| 100 |
|
| 101 |
renesas,icu: |
| 102 |
description: |
| 103 |
It must contain the phandle to the ICU and the index of the DMAC as seen |
| 104 |
from the ICU. |
| 105 |
$ref: /schemas/types.yaml#/definitions/phandle-array |
| 106 |
items: |
| 107 |
- items: |
| 108 |
- description: Phandle to the ICU node. |
| 109 |
- description: |
| 110 |
The number of the DMAC as seen from the ICU, i.e. parameter k from |
| 111 |
register ICU_DMkSELy. This may differ from the actual DMAC instance |
| 112 |
number. |
| 113 |
|
| 114 |
required: |
| 115 |
- compatible |
| 116 |
- reg |
| 117 |
- interrupts |
| 118 |
- interrupt-names |
| 119 |
- '#dma-cells' |
| 120 |
- dma-channels |
| 121 |
|
| 122 |
allOf: |
| 123 |
- $ref: dma-controller.yaml# |
| 124 |
|
| 125 |
- if: |
| 126 |
properties: |
| 127 |
compatible: |
| 128 |
contains: |
| 129 |
enum: |
| 130 |
- renesas,r9a07g043-dmac |
| 131 |
- renesas,r9a07g044-dmac |
| 132 |
- renesas,r9a07g054-dmac |
| 133 |
- renesas,r9a08g045-dmac |
| 134 |
then: |
| 135 |
properties: |
| 136 |
reg: |
| 137 |
minItems: 2 |
| 138 |
clocks: |
| 139 |
minItems: 2 |
| 140 |
resets: |
| 141 |
minItems: 2 |
| 142 |
|
| 143 |
renesas,icu: false |
| 144 |
|
| 145 |
required: |
| 146 |
- clocks |
| 147 |
- clock-names |
| 148 |
- power-domains |
| 149 |
- resets |
| 150 |
- reset-names |
| 151 |
|
| 152 |
- if: |
| 153 |
properties: |
| 154 |
compatible: |
| 155 |
contains: |
| 156 |
const: renesas,r7s72100-dmac |
| 157 |
then: |
| 158 |
properties: |
| 159 |
reg: |
| 160 |
minItems: 2 |
| 161 |
|
| 162 |
clocks: false |
| 163 |
clock-names: false |
| 164 |
power-domains: false |
| 165 |
resets: false |
| 166 |
reset-names: false |
| 167 |
renesas,icu: false |
| 168 |
|
| 169 |
- if: |
| 170 |
properties: |
| 171 |
compatible: |
| 172 |
contains: |
| 173 |
const: renesas,r9a09g057-dmac |
| 174 |
then: |
| 175 |
properties: |
| 176 |
reg: |
| 177 |
maxItems: 1 |
| 178 |
clocks: |
| 179 |
maxItems: 1 |
| 180 |
resets: |
| 181 |
maxItems: 1 |
| 182 |
|
| 183 |
clock-names: false |
| 184 |
reset-names: false |
| 185 |
|
| 186 |
required: |
| 187 |
- clocks |
| 188 |
- power-domains |
| 189 |
- renesas,icu |
| 190 |
- resets |
| 191 |
|
| 192 |
additionalProperties: false |
| 193 |
|
| 194 |
examples: |
| 195 |
- | |
| 196 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 197 |
#include <dt-bindings/clock/r9a07g044-cpg.h> |
| 198 |
|
| 199 |
dmac: dma-controller@11820000 { |
| 200 |
compatible = "renesas,r9a07g044-dmac", |
| 201 |
"renesas,rz-dmac"; |
| 202 |
reg = <0x11820000 0x10000>, |
| 203 |
<0x11830000 0x10000>; |
| 204 |
interrupts = <GIC_SPI 141 IRQ_TYPE_EDGE_RISING>, |
| 205 |
<GIC_SPI 125 IRQ_TYPE_EDGE_RISING>, |
| 206 |
<GIC_SPI 126 IRQ_TYPE_EDGE_RISING>, |
| 207 |
<GIC_SPI 127 IRQ_TYPE_EDGE_RISING>, |
| 208 |
<GIC_SPI 128 IRQ_TYPE_EDGE_RISING>, |
| 209 |
<GIC_SPI 129 IRQ_TYPE_EDGE_RISING>, |
| 210 |
<GIC_SPI 130 IRQ_TYPE_EDGE_RISING>, |
| 211 |
<GIC_SPI 131 IRQ_TYPE_EDGE_RISING>, |
| 212 |
<GIC_SPI 132 IRQ_TYPE_EDGE_RISING>, |
| 213 |
<GIC_SPI 133 IRQ_TYPE_EDGE_RISING>, |
| 214 |
<GIC_SPI 134 IRQ_TYPE_EDGE_RISING>, |
| 215 |
<GIC_SPI 135 IRQ_TYPE_EDGE_RISING>, |
| 216 |
<GIC_SPI 136 IRQ_TYPE_EDGE_RISING>, |
| 217 |
<GIC_SPI 137 IRQ_TYPE_EDGE_RISING>, |
| 218 |
<GIC_SPI 138 IRQ_TYPE_EDGE_RISING>, |
| 219 |
<GIC_SPI 139 IRQ_TYPE_EDGE_RISING>, |
| 220 |
<GIC_SPI 140 IRQ_TYPE_EDGE_RISING>; |
| 221 |
interrupt-names = "error", |
| 222 |
"ch0", "ch1", "ch2", "ch3", |
| 223 |
"ch4", "ch5", "ch6", "ch7", |
| 224 |
"ch8", "ch9", "ch10", "ch11", |
| 225 |
"ch12", "ch13", "ch14", "ch15"; |
| 226 |
clocks = <&cpg CPG_MOD R9A07G044_DMAC_ACLK>, |
| 227 |
<&cpg CPG_MOD R9A07G044_DMAC_PCLK>; |
| 228 |
clock-names = "main", "register"; |
| 229 |
power-domains = <&cpg>; |
| 230 |
resets = <&cpg R9A07G044_DMAC_ARESETN>, |
| 231 |
<&cpg R9A07G044_DMAC_RST_ASYNC>; |
| 232 |
reset-names = "arst", "rst_async"; |
| 233 |
#dma-cells = <1>; |
| 234 |
dma-channels = <16>; |
| 235 |
}; |