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