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