| 1 |
# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-i2s.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Allwinner A10 I2S Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Chen-Yu Tsai <[email protected]> |
| 11 |
- Maxime Ripard <[email protected]> |
| 12 |
|
| 13 |
properties: |
| 14 |
"#sound-dai-cells": |
| 15 |
const: 0 |
| 16 |
|
| 17 |
compatible: |
| 18 |
oneOf: |
| 19 |
- const: allwinner,sun4i-a10-i2s |
| 20 |
- const: allwinner,sun6i-a31-i2s |
| 21 |
- const: allwinner,sun8i-a83t-i2s |
| 22 |
- const: allwinner,sun8i-h3-i2s |
| 23 |
- items: |
| 24 |
- const: allwinner,sun8i-r40-i2s |
| 25 |
- const: allwinner,sun8i-h3-i2s |
| 26 |
- items: |
| 27 |
- const: allwinner,sun8i-v3-i2s |
| 28 |
- const: allwinner,sun8i-h3-i2s |
| 29 |
- const: allwinner,sun50i-a64-codec-i2s |
| 30 |
- items: |
| 31 |
- const: allwinner,sun50i-a64-i2s |
| 32 |
- const: allwinner,sun8i-h3-i2s |
| 33 |
- const: allwinner,sun50i-h6-i2s |
| 34 |
- const: allwinner,sun50i-r329-i2s |
| 35 |
- items: |
| 36 |
- enum: |
| 37 |
- allwinner,sun20i-d1-i2s |
| 38 |
- allwinner,sun55i-a523-i2s |
| 39 |
- const: allwinner,sun50i-r329-i2s |
| 40 |
|
| 41 |
reg: |
| 42 |
maxItems: 1 |
| 43 |
|
| 44 |
interrupts: |
| 45 |
maxItems: 1 |
| 46 |
|
| 47 |
clocks: |
| 48 |
items: |
| 49 |
- description: Bus Clock |
| 50 |
- description: Module Clock |
| 51 |
|
| 52 |
clock-names: |
| 53 |
items: |
| 54 |
- const: apb |
| 55 |
- const: mod |
| 56 |
|
| 57 |
# Even though it only applies to subschemas under the conditionals, |
| 58 |
# not listing them here will trigger a warning because of the |
| 59 |
# additionalsProperties set to false. |
| 60 |
dmas: true |
| 61 |
dma-names: true |
| 62 |
resets: |
| 63 |
maxItems: 1 |
| 64 |
|
| 65 |
allOf: |
| 66 |
- $ref: dai-common.yaml# |
| 67 |
- if: |
| 68 |
properties: |
| 69 |
compatible: |
| 70 |
contains: |
| 71 |
enum: |
| 72 |
- allwinner,sun6i-a31-i2s |
| 73 |
- allwinner,sun8i-a83t-i2s |
| 74 |
- allwinner,sun8i-h3-i2s |
| 75 |
- allwinner,sun50i-a64-codec-i2s |
| 76 |
- allwinner,sun50i-h6-i2s |
| 77 |
- allwinner,sun50i-r329-i2s |
| 78 |
|
| 79 |
then: |
| 80 |
required: |
| 81 |
- resets |
| 82 |
|
| 83 |
- if: |
| 84 |
properties: |
| 85 |
compatible: |
| 86 |
contains: |
| 87 |
enum: |
| 88 |
- allwinner,sun8i-a83t-i2s |
| 89 |
- allwinner,sun8i-h3-i2s |
| 90 |
|
| 91 |
then: |
| 92 |
properties: |
| 93 |
dmas: |
| 94 |
minItems: 1 |
| 95 |
items: |
| 96 |
- description: RX DMA Channel |
| 97 |
- description: TX DMA Channel |
| 98 |
description: |
| 99 |
Some controllers cannot receive but can only transmit |
| 100 |
data. In such a case, the RX DMA channel is to be omitted. |
| 101 |
|
| 102 |
dma-names: |
| 103 |
oneOf: |
| 104 |
- items: |
| 105 |
- const: rx |
| 106 |
- const: tx |
| 107 |
- const: tx |
| 108 |
description: |
| 109 |
Some controllers cannot receive but can only transmit |
| 110 |
data. In such a case, the RX name is to be omitted. |
| 111 |
|
| 112 |
else: |
| 113 |
properties: |
| 114 |
dmas: |
| 115 |
items: |
| 116 |
- description: RX DMA Channel |
| 117 |
- description: TX DMA Channel |
| 118 |
|
| 119 |
dma-names: |
| 120 |
items: |
| 121 |
- const: rx |
| 122 |
- const: tx |
| 123 |
|
| 124 |
required: |
| 125 |
- "#sound-dai-cells" |
| 126 |
- compatible |
| 127 |
- reg |
| 128 |
- interrupts |
| 129 |
- clocks |
| 130 |
- clock-names |
| 131 |
- dmas |
| 132 |
- dma-names |
| 133 |
|
| 134 |
unevaluatedProperties: false |
| 135 |
|
| 136 |
examples: |
| 137 |
- | |
| 138 |
i2s0: i2s@1c22400 { |
| 139 |
#sound-dai-cells = <0>; |
| 140 |
compatible = "allwinner,sun4i-a10-i2s"; |
| 141 |
reg = <0x01c22400 0x400>; |
| 142 |
interrupts = <0 16 4>; |
| 143 |
clocks = <&apb0_gates 3>, <&i2s0_clk>; |
| 144 |
clock-names = "apb", "mod"; |
| 145 |
dmas = <&dma 0 3>, <&dma 0 3>; |
| 146 |
dma-names = "rx", "tx"; |
| 147 |
}; |
| 148 |
|
| 149 |
... |