1*c66ec88fSEmmanuel VadotAmlogic AXG sound card: 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRequired properties: 4*c66ec88fSEmmanuel Vadot 5*c66ec88fSEmmanuel Vadot- compatible: "amlogic,axg-sound-card" 6*c66ec88fSEmmanuel Vadot- model : User specified audio sound card name, one string 7*c66ec88fSEmmanuel Vadot 8*c66ec88fSEmmanuel VadotOptional properties: 9*c66ec88fSEmmanuel Vadot 10*c66ec88fSEmmanuel Vadot- audio-aux-devs : List of phandles pointing to auxiliary devices 11*c66ec88fSEmmanuel Vadot- audio-widgets : Please refer to widgets.txt. 12*c66ec88fSEmmanuel Vadot- audio-routing : A list of the connections between audio components. 13*c66ec88fSEmmanuel Vadot 14*c66ec88fSEmmanuel VadotSubnodes: 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel Vadot- dai-link: Container for dai-link level properties and the CODEC 17*c66ec88fSEmmanuel Vadot sub-nodes. There should be at least one (and probably more) 18*c66ec88fSEmmanuel Vadot subnode of this type. 19*c66ec88fSEmmanuel Vadot 20*c66ec88fSEmmanuel VadotRequired dai-link properties: 21*c66ec88fSEmmanuel Vadot 22*c66ec88fSEmmanuel Vadot- sound-dai: phandle and port of the CPU DAI. 23*c66ec88fSEmmanuel Vadot 24*c66ec88fSEmmanuel VadotRequired TDM Backend dai-link properties: 25*c66ec88fSEmmanuel Vadot- dai-format : CPU/CODEC common audio format 26*c66ec88fSEmmanuel Vadot 27*c66ec88fSEmmanuel VadotOptional TDM Backend dai-link properties: 28*c66ec88fSEmmanuel Vadot- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks 29*c66ec88fSEmmanuel Vadot- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks 30*c66ec88fSEmmanuel Vadot When omitted, mask is assumed to have to no 31*c66ec88fSEmmanuel Vadot slots. A valid must have at one slot, so at 32*c66ec88fSEmmanuel Vadot least one these mask should be provided with 33*c66ec88fSEmmanuel Vadot an enabled slot. 34*c66ec88fSEmmanuel Vadot- dai-tdm-slot-num : Please refer to tdm-slot.txt. 35*c66ec88fSEmmanuel Vadot If omitted, slot number is set to accommodate the largest 36*c66ec88fSEmmanuel Vadot mask provided. 37*c66ec88fSEmmanuel Vadot- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted. 38*c66ec88fSEmmanuel Vadot- mclk-fs : Multiplication factor between stream rate and mclk 39*c66ec88fSEmmanuel Vadot 40*c66ec88fSEmmanuel VadotBackend dai-link subnodes: 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel Vadot- codec: dai-link representing backend links should have at least one subnode. 43*c66ec88fSEmmanuel Vadot One subnode for each codec of the dai-link. 44*c66ec88fSEmmanuel Vadot dai-link representing frontend links have no codec, therefore have no 45*c66ec88fSEmmanuel Vadot subnodes 46*c66ec88fSEmmanuel Vadot 47*c66ec88fSEmmanuel VadotRequired codec subnodes properties: 48*c66ec88fSEmmanuel Vadot 49*c66ec88fSEmmanuel Vadot- sound-dai: phandle and port of the CODEC DAI. 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel VadotOptional codec subnodes properties: 52*c66ec88fSEmmanuel Vadot 53*c66ec88fSEmmanuel Vadot- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt. 54*c66ec88fSEmmanuel Vadot- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt. 55*c66ec88fSEmmanuel Vadot 56*c66ec88fSEmmanuel VadotExample: 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadotsound { 59*c66ec88fSEmmanuel Vadot compatible = "amlogic,axg-sound-card"; 60*c66ec88fSEmmanuel Vadot model = "AXG-S420"; 61*c66ec88fSEmmanuel Vadot audio-aux-devs = <&tdmin_a>, <&tdmout_c>; 62*c66ec88fSEmmanuel Vadot audio-widgets = "Line", "Lineout", 63*c66ec88fSEmmanuel Vadot "Line", "Linein", 64*c66ec88fSEmmanuel Vadot "Speaker", "Speaker1 Left", 65*c66ec88fSEmmanuel Vadot "Speaker", "Speaker1 Right"; 66*c66ec88fSEmmanuel Vadot "Speaker", "Speaker2 Left", 67*c66ec88fSEmmanuel Vadot "Speaker", "Speaker2 Right"; 68*c66ec88fSEmmanuel Vadot audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", 69*c66ec88fSEmmanuel Vadot "SPDIFOUT IN 0", "FRDDR_A OUT 3", 70*c66ec88fSEmmanuel Vadot "TDM_C Playback", "TDMOUT_C OUT", 71*c66ec88fSEmmanuel Vadot "TDMIN_A IN 2", "TDM_C Capture", 72*c66ec88fSEmmanuel Vadot "TDMIN_A IN 5", "TDM_C Loopback", 73*c66ec88fSEmmanuel Vadot "TODDR_A IN 0", "TDMIN_A OUT", 74*c66ec88fSEmmanuel Vadot "Lineout", "Lineout AOUTL", 75*c66ec88fSEmmanuel Vadot "Lineout", "Lineout AOUTR", 76*c66ec88fSEmmanuel Vadot "Speaker1 Left", "SPK1 OUT_A", 77*c66ec88fSEmmanuel Vadot "Speaker2 Left", "SPK2 OUT_A", 78*c66ec88fSEmmanuel Vadot "Speaker1 Right", "SPK1 OUT_B", 79*c66ec88fSEmmanuel Vadot "Speaker2 Right", "SPK2 OUT_B", 80*c66ec88fSEmmanuel Vadot "Linein AINL", "Linein", 81*c66ec88fSEmmanuel Vadot "Linein AINR", "Linein"; 82*c66ec88fSEmmanuel Vadot 83*c66ec88fSEmmanuel Vadot dai-link@0 { 84*c66ec88fSEmmanuel Vadot sound-dai = <&frddr_a>; 85*c66ec88fSEmmanuel Vadot }; 86*c66ec88fSEmmanuel Vadot 87*c66ec88fSEmmanuel Vadot dai-link@1 { 88*c66ec88fSEmmanuel Vadot sound-dai = <&toddr_a>; 89*c66ec88fSEmmanuel Vadot }; 90*c66ec88fSEmmanuel Vadot 91*c66ec88fSEmmanuel Vadot dai-link@2 { 92*c66ec88fSEmmanuel Vadot sound-dai = <&tdmif_c>; 93*c66ec88fSEmmanuel Vadot dai-format = "i2s"; 94*c66ec88fSEmmanuel Vadot dai-tdm-slot-tx-mask-2 = <1 1>; 95*c66ec88fSEmmanuel Vadot dai-tdm-slot-tx-mask-3 = <1 1>; 96*c66ec88fSEmmanuel Vadot dai-tdm-slot-rx-mask-1 = <1 1>; 97*c66ec88fSEmmanuel Vadot mclk-fs = <256>; 98*c66ec88fSEmmanuel Vadot 99*c66ec88fSEmmanuel Vadot codec@0 { 100*c66ec88fSEmmanuel Vadot sound-dai = <&lineout>; 101*c66ec88fSEmmanuel Vadot }; 102*c66ec88fSEmmanuel Vadot 103*c66ec88fSEmmanuel Vadot codec@1 { 104*c66ec88fSEmmanuel Vadot sound-dai = <&speaker_amp1>; 105*c66ec88fSEmmanuel Vadot }; 106*c66ec88fSEmmanuel Vadot 107*c66ec88fSEmmanuel Vadot codec@2 { 108*c66ec88fSEmmanuel Vadot sound-dai = <&speaker_amp2>; 109*c66ec88fSEmmanuel Vadot }; 110*c66ec88fSEmmanuel Vadot 111*c66ec88fSEmmanuel Vadot codec@3 { 112*c66ec88fSEmmanuel Vadot sound-dai = <&linein>; 113*c66ec88fSEmmanuel Vadot }; 114*c66ec88fSEmmanuel Vadot 115*c66ec88fSEmmanuel Vadot }; 116*c66ec88fSEmmanuel Vadot 117*c66ec88fSEmmanuel Vadot dai-link@3 { 118*c66ec88fSEmmanuel Vadot sound-dai = <&spdifout>; 119*c66ec88fSEmmanuel Vadot 120*c66ec88fSEmmanuel Vadot codec { 121*c66ec88fSEmmanuel Vadot sound-dai = <&spdif_dit>; 122*c66ec88fSEmmanuel Vadot }; 123*c66ec88fSEmmanuel Vadot }; 124*c66ec88fSEmmanuel Vadot}; 125