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