182 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 card8 9maintainers:10 - Jerome Brunet <jbrunet@baylibre.com>11 12allOf:13 - $ref: sound-card-common.yaml#14 15properties:16 compatible:17 const: amlogic,axg-sound-card18 19 audio-aux-devs:20 $ref: /schemas/types.yaml#/definitions/phandle-array21 description: list of auxiliary devices22 23 audio-widgets:24 $ref: /schemas/types.yaml#/definitions/non-unique-string-array25 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 name28 29 clocks:30 minItems: 131 maxItems: 332 description:33 Base PLL clocks of audio susbsytem, used to configure base clock34 frequencies for different audio use-cases.35 36patternProperties:37 "^dai-link-[0-9]+$":38 type: object39 additionalProperties: false40 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 type43 44 properties:45 dai-format:46 $ref: /schemas/types.yaml#/definitions/string47 enum: [ i2s, left-j, dsp_a ]48 49 dai-tdm-slot-num:50 $ref: /schemas/types.yaml#/definitions/uint3251 description:52 Number of slots in use. If omitted, slot number is set to53 accommodate the largest mask provided.54 maximum: 3255 56 dai-tdm-slot-width:57 $ref: /schemas/types.yaml#/definitions/uint3258 description: Width in bits for each slot59 enum: [ 8, 16, 20, 24, 32 ]60 default: 3261 62 mclk-fs:63 $ref: /schemas/types.yaml#/definitions/uint3264 description:65 Multiplication factor between the frame rate and master clock66 rate67 68 sound-dai:69 maxItems: 170 description: phandle of the CPU DAI71 72 patternProperties:73 "^dai-tdm-slot-(t|r)x-mask-[0-3]$":74 $ref: /schemas/types.yaml#/definitions/uint32-array75 minItems: 176 maxItems: 3277 description:78 Transmit and receive cpu slot masks of each TDM lane79 When omitted, mask is assumed to have to no slots. A valid80 interface must have at least one slot, so at least one these81 mask should be provided with an enabled slot.82 83 "^codec(-[0-9]+)?$":84 type: object85 additionalProperties: false86 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 representing89 frontend links have no codec, therefore have no subnodes90 91 properties:92 sound-dai:93 maxItems: 194 description: phandle of the codec DAI95 96 patternProperties:97 "^dai-tdm-slot-(t|r)x-mask$":98 $ref: /schemas/types.yaml#/definitions/uint32-array99 minItems: 1100 maxItems: 32101 description: Transmit and receive codec slot masks102 103 required:104 - sound-dai105 106 required:107 - sound-dai108 109required:110 - dai-link-0111 112unevaluatedProperties: false113 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