Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame^] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-spdif.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Allwinner A10 S/PDIF Controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Chen-Yu Tsai <wens@csie.org> |
| 11 | - Liam Girdwood <lgirdwood@gmail.com> |
| 12 | - Mark Brown <broonie@kernel.org> |
| 13 | - Maxime Ripard <mripard@kernel.org> |
| 14 | |
| 15 | properties: |
| 16 | "#sound-dai-cells": |
| 17 | const: 0 |
| 18 | |
| 19 | compatible: |
| 20 | oneOf: |
| 21 | - const: allwinner,sun4i-a10-spdif |
| 22 | - const: allwinner,sun6i-a31-spdif |
| 23 | - const: allwinner,sun8i-h3-spdif |
| 24 | - const: allwinner,sun50i-h6-spdif |
| 25 | - items: |
| 26 | - const: allwinner,sun8i-a83t-spdif |
| 27 | - const: allwinner,sun8i-h3-spdif |
| 28 | - items: |
| 29 | - const: allwinner,sun50i-a64-spdif |
| 30 | - const: allwinner,sun8i-h3-spdif |
| 31 | |
| 32 | reg: |
| 33 | maxItems: 1 |
| 34 | |
| 35 | interrupts: |
| 36 | maxItems: 1 |
| 37 | |
| 38 | clocks: |
| 39 | items: |
| 40 | - description: Bus Clock |
| 41 | - description: Module Clock |
| 42 | |
| 43 | clock-names: |
| 44 | items: |
| 45 | - const: apb |
| 46 | - const: spdif |
| 47 | |
| 48 | # Even though it only applies to subschemas under the conditionals, |
| 49 | # not listing them here will trigger a warning because of the |
| 50 | # additionalsProperties set to false. |
| 51 | dmas: true |
| 52 | dma-names: true |
| 53 | resets: |
| 54 | maxItems: 1 |
| 55 | |
| 56 | allOf: |
| 57 | - $ref: dai-common.yaml# |
| 58 | - if: |
| 59 | properties: |
| 60 | compatible: |
| 61 | contains: |
| 62 | enum: |
| 63 | - allwinner,sun6i-a31-spdif |
| 64 | - allwinner,sun8i-h3-spdif |
| 65 | |
| 66 | then: |
| 67 | required: |
| 68 | - resets |
| 69 | |
| 70 | - if: |
| 71 | properties: |
| 72 | compatible: |
| 73 | contains: |
| 74 | enum: |
| 75 | - allwinner,sun8i-h3-spdif |
| 76 | - allwinner,sun50i-h6-spdif |
| 77 | |
| 78 | then: |
| 79 | properties: |
| 80 | dmas: |
| 81 | description: TX DMA Channel |
| 82 | |
| 83 | dma-names: |
| 84 | const: tx |
| 85 | |
| 86 | else: |
| 87 | properties: |
| 88 | dmas: |
| 89 | items: |
| 90 | - description: RX DMA Channel |
| 91 | - description: TX DMA Channel |
| 92 | |
| 93 | dma-names: |
| 94 | items: |
| 95 | - const: rx |
| 96 | - const: tx |
| 97 | |
| 98 | required: |
| 99 | - "#sound-dai-cells" |
| 100 | - compatible |
| 101 | - reg |
| 102 | - interrupts |
| 103 | - clocks |
| 104 | - clock-names |
| 105 | - dmas |
| 106 | - dma-names |
| 107 | |
| 108 | unevaluatedProperties: false |
| 109 | |
| 110 | examples: |
| 111 | - | |
| 112 | spdif: spdif@1c21000 { |
| 113 | #sound-dai-cells = <0>; |
| 114 | compatible = "allwinner,sun4i-a10-spdif"; |
| 115 | reg = <0x01c21000 0x40>; |
| 116 | interrupts = <13>; |
| 117 | clocks = <&apb0_gates 1>, <&spdif_clk>; |
| 118 | clock-names = "apb", "spdif"; |
| 119 | dmas = <&dma 0 2>, <&dma 0 2>; |
| 120 | dma-names = "rx", "tx"; |
| 121 | }; |
| 122 | |
| 123 | ... |