1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Amlogic AXG sound card 8 9maintainers: 10 - Jerome Brunet <jbrunet@baylibre.com> 11 12allOf: 13 - $ref: sound-card-common.yaml# 14 15properties: 16 compatible: 17 const: amlogic,axg-sound-card 18 19 audio-aux-devs: 20 $ref: /schemas/types.yaml#/definitions/phandle-array 21 description: list of auxiliary devices 22 23 audio-widgets: 24 $ref: /schemas/types.yaml#/definitions/non-unique-string-array 25 description: 26 A list off component DAPM widget. Each entry is a pair of strings, 27 the first being the widget type, the second being the widget name 28 29 clocks: 30 minItems: 1 31 maxItems: 3 32 description: 33 Base PLL clocks of audio susbsytem, used to configure base clock 34 frequencies for different audio use-cases. 35 36patternProperties: 37 "^dai-link-[0-9]+$": 38 type: object 39 additionalProperties: false 40 description: 41 Container for dai-link level properties and the CODEC sub-nodes. 42 There should be at least one (and probably more) subnode of this type 43 44 properties: 45 dai-format: 46 $ref: /schemas/types.yaml#/definitions/string 47 enum: [ i2s, left-j, dsp_a ] 48 49 dai-tdm-slot-num: 50 $ref: /schemas/types.yaml#/definitions/uint32 51 description: 52 Number of slots in use. If omitted, slot number is set to 53 accommodate the largest mask provided. 54 maximum: 32 55 56 dai-tdm-slot-width: 57 $ref: /schemas/types.yaml#/definitions/uint32 58 description: Width in bits for each slot 59 enum: [ 8, 16, 20, 24, 32 ] 60 default: 32 61 62 mclk-fs: 63 $ref: /schemas/types.yaml#/definitions/uint32 64 description: 65 Multiplication factor between the frame rate and master clock 66 rate 67 68 sound-dai: 69 maxItems: 1 70 description: phandle of the CPU DAI 71 72 patternProperties: 73 "^dai-tdm-slot-(t|r)x-mask-[0-3]$": 74 $ref: /schemas/types.yaml#/definitions/uint32-array 75 minItems: 1 76 maxItems: 32 77 description: 78 Transmit and receive cpu slot masks of each TDM lane 79 When omitted, mask is assumed to have to no slots. A valid 80 interface must have at least one slot, so at least one these 81 mask should be provided with an enabled slot. 82 83 "^codec(-[0-9]+)?$": 84 type: object 85 additionalProperties: false 86 description: 87 dai-link representing backend links should have at least one subnode. 88 One subnode for each codec of the dai-link. dai-link representing 89 frontend links have no codec, therefore have no subnodes 90 91 properties: 92 sound-dai: 93 maxItems: 1 94 description: phandle of the codec DAI 95 96 patternProperties: 97 "^dai-tdm-slot-(t|r)x-mask$": 98 $ref: /schemas/types.yaml#/definitions/uint32-array 99 minItems: 1 100 maxItems: 32 101 description: Transmit and receive codec slot masks 102 103 required: 104 - sound-dai 105 106 required: 107 - sound-dai 108 109required: 110 - dai-link-0 111 112unevaluatedProperties: false 113 114examples: 115 - | 116 sound { 117 compatible = "amlogic,axg-sound-card"; 118 model = "AXG-S420"; 119 audio-aux-devs = <&tdmin_a>, <&tdmout_c>; 120 audio-widgets = "Line", "Lineout", 121 "Line", "Linein", 122 "Speaker", "Speaker1 Left", 123 "Speaker", "Speaker1 Right", 124 "Speaker", "Speaker2 Left", 125 "Speaker", "Speaker2 Right"; 126 audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", 127 "SPDIFOUT IN 0", "FRDDR_A OUT 3", 128 "TDM_C Playback", "TDMOUT_C OUT", 129 "TDMIN_A IN 2", "TDM_C Capture", 130 "TDMIN_A IN 5", "TDM_C Loopback", 131 "TODDR_A IN 0", "TDMIN_A OUT", 132 "Lineout", "Lineout AOUTL", 133 "Lineout", "Lineout AOUTR", 134 "Speaker1 Left", "SPK1 OUT_A", 135 "Speaker2 Left", "SPK2 OUT_A", 136 "Speaker1 Right", "SPK1 OUT_B", 137 "Speaker2 Right", "SPK2 OUT_B", 138 "Linein AINL", "Linein", 139 "Linein AINR", "Linein"; 140 141 dai-link-0 { 142 sound-dai = <&frddr_a>; 143 }; 144 145 dai-link-1 { 146 sound-dai = <&toddr_a>; 147 }; 148 149 dai-link-2 { 150 sound-dai = <&tdmif_c>; 151 dai-format = "i2s"; 152 dai-tdm-slot-tx-mask-2 = <1 1>; 153 dai-tdm-slot-tx-mask-3 = <1 1>; 154 dai-tdm-slot-rx-mask-1 = <1 1>; 155 mclk-fs = <256>; 156 157 codec-0 { 158 sound-dai = <&lineout>; 159 }; 160 161 codec-1 { 162 sound-dai = <&speaker_amp1>; 163 }; 164 165 codec-2 { 166 sound-dai = <&speaker_amp2>; 167 }; 168 169 codec-3 { 170 sound-dai = <&linein>; 171 }; 172 }; 173 174 dai-link-3 { 175 sound-dai = <&spdifout>; 176 177 codec { 178 sound-dai = <&spdif_dit>; 179 }; 180 }; 181 }; 182