1506c7f9bSMaxime Ripard# SPDX-License-Identifier: GPL-2.0 2506c7f9bSMaxime Ripard%YAML 1.2 3506c7f9bSMaxime Ripard--- 4506c7f9bSMaxime Ripard$id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-spdif.yaml# 5506c7f9bSMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 6506c7f9bSMaxime Ripard 7dd3cb467SAndrew Lunntitle: Allwinner A10 S/PDIF Controller 8506c7f9bSMaxime Ripard 9506c7f9bSMaxime Ripardmaintainers: 10506c7f9bSMaxime Ripard - Chen-Yu Tsai <wens@csie.org> 11506c7f9bSMaxime Ripard - Liam Girdwood <lgirdwood@gmail.com> 12506c7f9bSMaxime Ripard - Mark Brown <broonie@kernel.org> 135c7404bbSMaxime Ripard - Maxime Ripard <mripard@kernel.org> 14506c7f9bSMaxime Ripard 15506c7f9bSMaxime Ripardproperties: 16506c7f9bSMaxime Ripard "#sound-dai-cells": 17506c7f9bSMaxime Ripard const: 0 18506c7f9bSMaxime Ripard 19506c7f9bSMaxime Ripard compatible: 20506c7f9bSMaxime Ripard oneOf: 21506c7f9bSMaxime Ripard - const: allwinner,sun4i-a10-spdif 22506c7f9bSMaxime Ripard - const: allwinner,sun6i-a31-spdif 23506c7f9bSMaxime Ripard - const: allwinner,sun8i-h3-spdif 24b2045303SClément Péron - const: allwinner,sun50i-h6-spdif 25506c7f9bSMaxime Ripard - items: 26506c7f9bSMaxime Ripard - const: allwinner,sun8i-a83t-spdif 27506c7f9bSMaxime Ripard - const: allwinner,sun8i-h3-spdif 28506c7f9bSMaxime Ripard - items: 29506c7f9bSMaxime Ripard - const: allwinner,sun50i-a64-spdif 30506c7f9bSMaxime Ripard - const: allwinner,sun8i-h3-spdif 31506c7f9bSMaxime Ripard 32506c7f9bSMaxime Ripard reg: 33506c7f9bSMaxime Ripard maxItems: 1 34506c7f9bSMaxime Ripard 35506c7f9bSMaxime Ripard interrupts: 36506c7f9bSMaxime Ripard maxItems: 1 37506c7f9bSMaxime Ripard 38506c7f9bSMaxime Ripard clocks: 39506c7f9bSMaxime Ripard items: 40506c7f9bSMaxime Ripard - description: Bus Clock 41506c7f9bSMaxime Ripard - description: Module Clock 42506c7f9bSMaxime Ripard 43506c7f9bSMaxime Ripard clock-names: 44506c7f9bSMaxime Ripard items: 45506c7f9bSMaxime Ripard - const: apb 46506c7f9bSMaxime Ripard - const: spdif 47506c7f9bSMaxime Ripard 48506c7f9bSMaxime Ripard # Even though it only applies to subschemas under the conditionals, 49506c7f9bSMaxime Ripard # not listing them here will trigger a warning because of the 50506c7f9bSMaxime Ripard # additionalsProperties set to false. 51b1f35dfdSMaxime Ripard dmas: true 52b1f35dfdSMaxime Ripard dma-names: true 53506c7f9bSMaxime Ripard resets: 54506c7f9bSMaxime Ripard maxItems: 1 55506c7f9bSMaxime Ripard 56506c7f9bSMaxime RipardallOf: 57*58ae9a2aSKrzysztof Kozlowski - $ref: dai-common.yaml# 58506c7f9bSMaxime Ripard - if: 59506c7f9bSMaxime Ripard properties: 60506c7f9bSMaxime Ripard compatible: 61506c7f9bSMaxime Ripard contains: 62506c7f9bSMaxime Ripard enum: 63506c7f9bSMaxime Ripard - allwinner,sun6i-a31-spdif 64506c7f9bSMaxime Ripard - allwinner,sun8i-h3-spdif 65506c7f9bSMaxime Ripard 66506c7f9bSMaxime Ripard then: 67506c7f9bSMaxime Ripard required: 68506c7f9bSMaxime Ripard - resets 69506c7f9bSMaxime Ripard 70b1f35dfdSMaxime Ripard - if: 71b1f35dfdSMaxime Ripard properties: 72b1f35dfdSMaxime Ripard compatible: 73b1f35dfdSMaxime Ripard contains: 741a8e7cdfSMaxime Ripard enum: 751a8e7cdfSMaxime Ripard - allwinner,sun8i-h3-spdif 761a8e7cdfSMaxime Ripard - allwinner,sun50i-h6-spdif 77b1f35dfdSMaxime Ripard 78b1f35dfdSMaxime Ripard then: 79b1f35dfdSMaxime Ripard properties: 80b1f35dfdSMaxime Ripard dmas: 81b1f35dfdSMaxime Ripard description: TX DMA Channel 82b1f35dfdSMaxime Ripard 83b1f35dfdSMaxime Ripard dma-names: 84b1f35dfdSMaxime Ripard const: tx 85b1f35dfdSMaxime Ripard 86b1f35dfdSMaxime Ripard else: 87b1f35dfdSMaxime Ripard properties: 88b1f35dfdSMaxime Ripard dmas: 89b1f35dfdSMaxime Ripard items: 90b1f35dfdSMaxime Ripard - description: RX DMA Channel 91b1f35dfdSMaxime Ripard - description: TX DMA Channel 92b1f35dfdSMaxime Ripard 93b1f35dfdSMaxime Ripard dma-names: 94b1f35dfdSMaxime Ripard items: 95b1f35dfdSMaxime Ripard - const: rx 96b1f35dfdSMaxime Ripard - const: tx 97b1f35dfdSMaxime Ripard 98506c7f9bSMaxime Ripardrequired: 99506c7f9bSMaxime Ripard - "#sound-dai-cells" 100506c7f9bSMaxime Ripard - compatible 101506c7f9bSMaxime Ripard - reg 102506c7f9bSMaxime Ripard - interrupts 103506c7f9bSMaxime Ripard - clocks 104506c7f9bSMaxime Ripard - clock-names 105506c7f9bSMaxime Ripard - dmas 106506c7f9bSMaxime Ripard - dma-names 107506c7f9bSMaxime Ripard 108*58ae9a2aSKrzysztof KozlowskiunevaluatedProperties: false 109506c7f9bSMaxime Ripard 110506c7f9bSMaxime Ripardexamples: 111506c7f9bSMaxime Ripard - | 112506c7f9bSMaxime Ripard spdif: spdif@1c21000 { 113506c7f9bSMaxime Ripard #sound-dai-cells = <0>; 114506c7f9bSMaxime Ripard compatible = "allwinner,sun4i-a10-spdif"; 115506c7f9bSMaxime Ripard reg = <0x01c21000 0x40>; 116506c7f9bSMaxime Ripard interrupts = <13>; 117506c7f9bSMaxime Ripard clocks = <&apb0_gates 1>, <&spdif_clk>; 118506c7f9bSMaxime Ripard clock-names = "apb", "spdif"; 119506c7f9bSMaxime Ripard dmas = <&dma 0 2>, <&dma 0 2>; 120506c7f9bSMaxime Ripard dma-names = "rx", "tx"; 121506c7f9bSMaxime Ripard }; 122506c7f9bSMaxime Ripard 123506c7f9bSMaxime Ripard... 124