| 1 |
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/sound/snps,designware-i2s.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: DesignWare I2S controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Jose Abreu <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
compatible: |
| 14 |
oneOf: |
| 15 |
- items: |
| 16 |
- const: canaan,k210-i2s |
| 17 |
- const: snps,designware-i2s |
| 18 |
- enum: |
| 19 |
- snps,designware-i2s |
| 20 |
- starfive,jh7110-i2stx0 |
| 21 |
- starfive,jh7110-i2stx1 |
| 22 |
- starfive,jh7110-i2srx |
| 23 |
|
| 24 |
reg: |
| 25 |
maxItems: 1 |
| 26 |
|
| 27 |
interrupts: |
| 28 |
description: | |
| 29 |
The interrupt line number for the I2S controller. Add this |
| 30 |
parameter if the I2S controller that you are using does not |
| 31 |
support DMA. |
| 32 |
maxItems: 1 |
| 33 |
|
| 34 |
clocks: |
| 35 |
items: |
| 36 |
- description: Sampling rate reference clock |
| 37 |
- description: APB clock |
| 38 |
- description: Audio master clock |
| 39 |
- description: Inner audio master clock source |
| 40 |
- description: External audio master clock source |
| 41 |
- description: Bit clock |
| 42 |
- description: Left/right channel clock |
| 43 |
- description: External bit clock |
| 44 |
- description: External left/right channel clock |
| 45 |
minItems: 1 |
| 46 |
|
| 47 |
clock-names: |
| 48 |
items: |
| 49 |
- const: i2sclk |
| 50 |
- const: apb |
| 51 |
- const: mclk |
| 52 |
- const: mclk_inner |
| 53 |
- const: mclk_ext |
| 54 |
- const: bclk |
| 55 |
- const: lrck |
| 56 |
- const: bclk_ext |
| 57 |
- const: lrck_ext |
| 58 |
minItems: 1 |
| 59 |
|
| 60 |
resets: |
| 61 |
items: |
| 62 |
- description: Optional controller resets |
| 63 |
- description: controller reset of Sampling rate |
| 64 |
minItems: 1 |
| 65 |
|
| 66 |
dmas: |
| 67 |
items: |
| 68 |
- description: TX DMA Channel |
| 69 |
- description: RX DMA Channel |
| 70 |
minItems: 1 |
| 71 |
|
| 72 |
dma-names: |
| 73 |
items: |
| 74 |
- const: tx |
| 75 |
- const: rx |
| 76 |
minItems: 1 |
| 77 |
|
| 78 |
starfive,syscon: |
| 79 |
$ref: /schemas/types.yaml#/definitions/phandle-array |
| 80 |
items: |
| 81 |
- items: |
| 82 |
- description: phandle to System Register Controller sys_syscon node. |
| 83 |
- description: I2S-rx enabled control offset of SYS_SYSCONSAIF__SYSCFG register. |
| 84 |
- description: I2S-rx enabled control mask |
| 85 |
description: |
| 86 |
The phandle to System Register Controller syscon node and the I2S-rx(ADC) |
| 87 |
enabled control offset and mask of SYS_SYSCONSAIF__SYSCFG register. |
| 88 |
|
| 89 |
allOf: |
| 90 |
- $ref: dai-common.yaml# |
| 91 |
- if: |
| 92 |
properties: |
| 93 |
compatible: |
| 94 |
contains: |
| 95 |
const: canaan,k210-i2s |
| 96 |
then: |
| 97 |
properties: |
| 98 |
"#sound-dai-cells": |
| 99 |
const: 1 |
| 100 |
else: |
| 101 |
properties: |
| 102 |
"#sound-dai-cells": |
| 103 |
const: 0 |
| 104 |
- if: |
| 105 |
properties: |
| 106 |
compatible: |
| 107 |
contains: |
| 108 |
const: snps,designware-i2s |
| 109 |
then: |
| 110 |
properties: |
| 111 |
clocks: |
| 112 |
maxItems: 1 |
| 113 |
clock-names: |
| 114 |
maxItems: 1 |
| 115 |
resets: |
| 116 |
maxItems: 1 |
| 117 |
else: |
| 118 |
properties: |
| 119 |
resets: |
| 120 |
minItems: 2 |
| 121 |
maxItems: 2 |
| 122 |
- if: |
| 123 |
properties: |
| 124 |
compatible: |
| 125 |
contains: |
| 126 |
const: starfive,jh7110-i2stx0 |
| 127 |
then: |
| 128 |
properties: |
| 129 |
clocks: |
| 130 |
minItems: 5 |
| 131 |
maxItems: 5 |
| 132 |
clock-names: |
| 133 |
minItems: 5 |
| 134 |
maxItems: 5 |
| 135 |
required: |
| 136 |
- resets |
| 137 |
- if: |
| 138 |
properties: |
| 139 |
compatible: |
| 140 |
contains: |
| 141 |
const: starfive,jh7110-i2stx1 |
| 142 |
then: |
| 143 |
properties: |
| 144 |
clocks: |
| 145 |
minItems: 9 |
| 146 |
maxItems: 9 |
| 147 |
clock-names: |
| 148 |
minItems: 9 |
| 149 |
maxItems: 9 |
| 150 |
required: |
| 151 |
- resets |
| 152 |
- if: |
| 153 |
properties: |
| 154 |
compatible: |
| 155 |
contains: |
| 156 |
const: starfive,jh7110-i2srx |
| 157 |
then: |
| 158 |
properties: |
| 159 |
clocks: |
| 160 |
minItems: 9 |
| 161 |
maxItems: 9 |
| 162 |
clock-names: |
| 163 |
minItems: 9 |
| 164 |
maxItems: 9 |
| 165 |
required: |
| 166 |
- resets |
| 167 |
- starfive,syscon |
| 168 |
else: |
| 169 |
properties: |
| 170 |
starfive,syscon: false |
| 171 |
|
| 172 |
required: |
| 173 |
- compatible |
| 174 |
- reg |
| 175 |
- clocks |
| 176 |
- clock-names |
| 177 |
|
| 178 |
oneOf: |
| 179 |
- required: |
| 180 |
- dmas |
| 181 |
- dma-names |
| 182 |
- required: |
| 183 |
- interrupts |
| 184 |
|
| 185 |
unevaluatedProperties: false |
| 186 |
|
| 187 |
examples: |
| 188 |
- | |
| 189 |
soc_i2s: i2s@7ff90000 { |
| 190 |
compatible = "snps,designware-i2s"; |
| 191 |
reg = <0x7ff90000 0x1000>; |
| 192 |
clocks = <&scpi_i2sclk 0>; |
| 193 |
clock-names = "i2sclk"; |
| 194 |
#sound-dai-cells = <0>; |
| 195 |
dmas = <&dma0 5>; |
| 196 |
dma-names = "tx"; |
| 197 |
}; |