1*c66ec88fSEmmanuel VadotQualcomm SoundWire Controller Bindings 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel Vadot 4*c66ec88fSEmmanuel VadotThis binding describes the Qualcomm SoundWire Controller along with its 5*c66ec88fSEmmanuel Vadotboard specific bus parameters. 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadot- compatible: 8*c66ec88fSEmmanuel Vadot Usage: required 9*c66ec88fSEmmanuel Vadot Value type: <stringlist> 10*c66ec88fSEmmanuel Vadot Definition: must be "qcom,soundwire-v<MAJOR>.<MINOR>.<STEP>", 11*c66ec88fSEmmanuel Vadot Example: 12*c66ec88fSEmmanuel Vadot "qcom,soundwire-v1.3.0" 13*c66ec88fSEmmanuel Vadot "qcom,soundwire-v1.5.0" 14*c66ec88fSEmmanuel Vadot "qcom,soundwire-v1.6.0" 15*c66ec88fSEmmanuel Vadot- reg: 16*c66ec88fSEmmanuel Vadot Usage: required 17*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 18*c66ec88fSEmmanuel Vadot Definition: the base address and size of SoundWire controller 19*c66ec88fSEmmanuel Vadot address space. 20*c66ec88fSEmmanuel Vadot 21*c66ec88fSEmmanuel Vadot- interrupts: 22*c66ec88fSEmmanuel Vadot Usage: required 23*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 24*c66ec88fSEmmanuel Vadot Definition: should specify the SoundWire Controller IRQ 25*c66ec88fSEmmanuel Vadot 26*c66ec88fSEmmanuel Vadot- clock-names: 27*c66ec88fSEmmanuel Vadot Usage: required 28*c66ec88fSEmmanuel Vadot Value type: <stringlist> 29*c66ec88fSEmmanuel Vadot Definition: should be "iface" for SoundWire Controller interface clock 30*c66ec88fSEmmanuel Vadot 31*c66ec88fSEmmanuel Vadot- clocks: 32*c66ec88fSEmmanuel Vadot Usage: required 33*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 34*c66ec88fSEmmanuel Vadot Definition: should specify the SoundWire Controller interface clock 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel Vadot- #sound-dai-cells: 37*c66ec88fSEmmanuel Vadot Usage: required 38*c66ec88fSEmmanuel Vadot Value type: <u32> 39*c66ec88fSEmmanuel Vadot Definition: must be 1 for digital audio interfaces on the controller. 40*c66ec88fSEmmanuel Vadot 41*c66ec88fSEmmanuel Vadot- qcom,dout-ports: 42*c66ec88fSEmmanuel Vadot Usage: required 43*c66ec88fSEmmanuel Vadot Value type: <u32> 44*c66ec88fSEmmanuel Vadot Definition: must be count of data out ports 45*c66ec88fSEmmanuel Vadot 46*c66ec88fSEmmanuel Vadot- qcom,din-ports: 47*c66ec88fSEmmanuel Vadot Usage: required 48*c66ec88fSEmmanuel Vadot Value type: <u32> 49*c66ec88fSEmmanuel Vadot Definition: must be count of data in ports 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel Vadot- qcom,ports-offset1: 52*c66ec88fSEmmanuel Vadot Usage: required 53*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 54*c66ec88fSEmmanuel Vadot Definition: should specify payload transport window offset1 of each 55*c66ec88fSEmmanuel Vadot data port. Out ports followed by In ports. 56*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadot- qcom,ports-offset2: 59*c66ec88fSEmmanuel Vadot Usage: required 60*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 61*c66ec88fSEmmanuel Vadot Definition: should specify payload transport window offset2 of each 62*c66ec88fSEmmanuel Vadot data port. Out ports followed by In ports. 63*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 64*c66ec88fSEmmanuel Vadot 65*c66ec88fSEmmanuel Vadot- qcom,ports-sinterval-low: 66*c66ec88fSEmmanuel Vadot Usage: required 67*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 68*c66ec88fSEmmanuel Vadot Definition: should be sample interval low of each data port. 69*c66ec88fSEmmanuel Vadot Out ports followed by In ports. Used for Sample Interval 70*c66ec88fSEmmanuel Vadot calculation. 71*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 72*c66ec88fSEmmanuel Vadot 73*c66ec88fSEmmanuel Vadot- qcom,ports-word-length: 74*c66ec88fSEmmanuel Vadot Usage: optional 75*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 76*c66ec88fSEmmanuel Vadot Definition: should be size of payload channel sample. 77*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 78*c66ec88fSEmmanuel Vadot 79*c66ec88fSEmmanuel Vadot- qcom,ports-block-pack-mode: 80*c66ec88fSEmmanuel Vadot Usage: optional 81*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 82*c66ec88fSEmmanuel Vadot Definition: should be 0 or 1 to indicate the block packing mode. 83*c66ec88fSEmmanuel Vadot 0 to indicate Blocks are per Channel 84*c66ec88fSEmmanuel Vadot 1 to indicate Blocks are per Port. 85*c66ec88fSEmmanuel Vadot Out ports followed by In ports. 86*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 87*c66ec88fSEmmanuel Vadot 88*c66ec88fSEmmanuel Vadot- qcom,ports-block-group-count: 89*c66ec88fSEmmanuel Vadot Usage: optional 90*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 91*c66ec88fSEmmanuel Vadot Definition: should be in range 1 to 4 to indicate how many sample 92*c66ec88fSEmmanuel Vadot intervals are combined into a payload. 93*c66ec88fSEmmanuel Vadot Out ports followed by In ports. 94*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 95*c66ec88fSEmmanuel Vadot 96*c66ec88fSEmmanuel Vadot- qcom,ports-lane-control: 97*c66ec88fSEmmanuel Vadot Usage: optional 98*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 99*c66ec88fSEmmanuel Vadot Definition: should be in range 0 to 7 to identify which data lane 100*c66ec88fSEmmanuel Vadot the data port uses. 101*c66ec88fSEmmanuel Vadot Out ports followed by In ports. 102*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 103*c66ec88fSEmmanuel Vadot 104*c66ec88fSEmmanuel Vadot- qcom,ports-hstart: 105*c66ec88fSEmmanuel Vadot Usage: optional 106*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 107*c66ec88fSEmmanuel Vadot Definition: should be number identifying lowerst numbered coloum in 108*c66ec88fSEmmanuel Vadot SoundWire Frame, i.e. left edge of the Transport sub-frame 109*c66ec88fSEmmanuel Vadot for each port. Values between 0 and 15 are valid. 110*c66ec88fSEmmanuel Vadot Out ports followed by In ports. 111*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 112*c66ec88fSEmmanuel Vadot 113*c66ec88fSEmmanuel Vadot- qcom,ports-hstop: 114*c66ec88fSEmmanuel Vadot Usage: optional 115*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 116*c66ec88fSEmmanuel Vadot Definition: should be number identifying highest numbered coloum in 117*c66ec88fSEmmanuel Vadot SoundWire Frame, i.e. the right edge of the Transport 118*c66ec88fSEmmanuel Vadot sub-frame for each port. Values between 0 and 15 are valid. 119*c66ec88fSEmmanuel Vadot Out ports followed by In ports. 120*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 121*c66ec88fSEmmanuel Vadot 122*c66ec88fSEmmanuel Vadot- qcom,dports-type: 123*c66ec88fSEmmanuel Vadot Usage: optional 124*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 125*c66ec88fSEmmanuel Vadot Definition: should be one of the following types 126*c66ec88fSEmmanuel Vadot 0 for reduced port 127*c66ec88fSEmmanuel Vadot 1 for simple ports 128*c66ec88fSEmmanuel Vadot 2 for full port 129*c66ec88fSEmmanuel Vadot Out ports followed by In ports. 130*c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 131*c66ec88fSEmmanuel Vadot 132*c66ec88fSEmmanuel VadotNote: 133*c66ec88fSEmmanuel Vadot More Information on detail of encoding of these fields can be 134*c66ec88fSEmmanuel Vadotfound in MIPI Alliance SoundWire 1.0 Specifications. 135*c66ec88fSEmmanuel Vadot 136*c66ec88fSEmmanuel Vadot= SoundWire devices 137*c66ec88fSEmmanuel VadotEach subnode of the bus represents SoundWire device attached to it. 138*c66ec88fSEmmanuel VadotThe properties of these nodes are defined by the individual bindings. 139*c66ec88fSEmmanuel Vadot 140*c66ec88fSEmmanuel Vadot= EXAMPLE 141*c66ec88fSEmmanuel VadotThe following example represents a SoundWire controller on DB845c board 142*c66ec88fSEmmanuel Vadotwhich has controller integrated inside WCD934x codec on SDM845 SoC. 143*c66ec88fSEmmanuel Vadot 144*c66ec88fSEmmanuel Vadotsoundwire: soundwire@c85 { 145*c66ec88fSEmmanuel Vadot compatible = "qcom,soundwire-v1.3.0"; 146*c66ec88fSEmmanuel Vadot reg = <0xc85 0x20>; 147*c66ec88fSEmmanuel Vadot interrupts = <20 IRQ_TYPE_EDGE_RISING>; 148*c66ec88fSEmmanuel Vadot clocks = <&wcc>; 149*c66ec88fSEmmanuel Vadot clock-names = "iface"; 150*c66ec88fSEmmanuel Vadot #sound-dai-cells = <1>; 151*c66ec88fSEmmanuel Vadot qcom,dports-type = <0>; 152*c66ec88fSEmmanuel Vadot qcom,dout-ports = <6>; 153*c66ec88fSEmmanuel Vadot qcom,din-ports = <2>; 154*c66ec88fSEmmanuel Vadot qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1F 0x3F 0x7 0x1F 0x3F 0x0F 0x0F>; 155*c66ec88fSEmmanuel Vadot qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0C 0x6 0x12 0x0D 0x07 0x0A >; 156*c66ec88fSEmmanuel Vadot qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1F 0x00 0x00 0x1F 0x00 0x00>; 157*c66ec88fSEmmanuel Vadot 158*c66ec88fSEmmanuel Vadot /* Left Speaker */ 159*c66ec88fSEmmanuel Vadot left{ 160*c66ec88fSEmmanuel Vadot .... 161*c66ec88fSEmmanuel Vadot }; 162*c66ec88fSEmmanuel Vadot 163*c66ec88fSEmmanuel Vadot /* Right Speaker */ 164*c66ec88fSEmmanuel Vadot right{ 165*c66ec88fSEmmanuel Vadot .... 166*c66ec88fSEmmanuel Vadot }; 167*c66ec88fSEmmanuel Vadot}; 168