1c66ec88fSEmmanuel VadotQualcomm SoundWire Controller Bindings 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel Vadot 4c66ec88fSEmmanuel VadotThis binding describes the Qualcomm SoundWire Controller along with its 5c66ec88fSEmmanuel Vadotboard specific bus parameters. 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadot- compatible: 8c66ec88fSEmmanuel Vadot Usage: required 9c66ec88fSEmmanuel Vadot Value type: <stringlist> 10c66ec88fSEmmanuel Vadot Definition: must be "qcom,soundwire-v<MAJOR>.<MINOR>.<STEP>", 11c66ec88fSEmmanuel Vadot Example: 12c66ec88fSEmmanuel Vadot "qcom,soundwire-v1.3.0" 13c66ec88fSEmmanuel Vadot "qcom,soundwire-v1.5.0" 146be33864SEmmanuel Vadot "qcom,soundwire-v1.5.1" 15c66ec88fSEmmanuel Vadot "qcom,soundwire-v1.6.0" 16c66ec88fSEmmanuel Vadot- reg: 17c66ec88fSEmmanuel Vadot Usage: required 18c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 19c66ec88fSEmmanuel Vadot Definition: the base address and size of SoundWire controller 20c66ec88fSEmmanuel Vadot address space. 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadot- interrupts: 23c66ec88fSEmmanuel Vadot Usage: required 24c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 25*c9ccf3a3SEmmanuel Vadot Definition: should specify the SoundWire Controller core and optional 26*c9ccf3a3SEmmanuel Vadot wake IRQ 27*c9ccf3a3SEmmanuel Vadot 28*c9ccf3a3SEmmanuel Vadot- interrupt-names: 29*c9ccf3a3SEmmanuel Vadot Usage: Optional 30*c9ccf3a3SEmmanuel Vadot Value type: boolean 31*c9ccf3a3SEmmanuel Vadot Value type: <stringlist> 32*c9ccf3a3SEmmanuel Vadot Definition: should be "core" for core and "wakeup" for wake interrupt. 33*c9ccf3a3SEmmanuel Vadot 34*c9ccf3a3SEmmanuel Vadot- wakeup-source: 35*c9ccf3a3SEmmanuel Vadot Usage: Optional 36*c9ccf3a3SEmmanuel Vadot Value type: boolean 37*c9ccf3a3SEmmanuel Vadot Definition: should specify if SoundWire Controller is wake up capable. 38c66ec88fSEmmanuel Vadot 39c66ec88fSEmmanuel Vadot- clock-names: 40c66ec88fSEmmanuel Vadot Usage: required 41c66ec88fSEmmanuel Vadot Value type: <stringlist> 42c66ec88fSEmmanuel Vadot Definition: should be "iface" for SoundWire Controller interface clock 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadot- clocks: 45c66ec88fSEmmanuel Vadot Usage: required 46c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 47c66ec88fSEmmanuel Vadot Definition: should specify the SoundWire Controller interface clock 48c66ec88fSEmmanuel Vadot 49c66ec88fSEmmanuel Vadot- #sound-dai-cells: 50c66ec88fSEmmanuel Vadot Usage: required 51c66ec88fSEmmanuel Vadot Value type: <u32> 52c66ec88fSEmmanuel Vadot Definition: must be 1 for digital audio interfaces on the controller. 53c66ec88fSEmmanuel Vadot 54c66ec88fSEmmanuel Vadot- qcom,dout-ports: 55c66ec88fSEmmanuel Vadot Usage: required 56c66ec88fSEmmanuel Vadot Value type: <u32> 57c66ec88fSEmmanuel Vadot Definition: must be count of data out ports 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot- qcom,din-ports: 60c66ec88fSEmmanuel Vadot Usage: required 61c66ec88fSEmmanuel Vadot Value type: <u32> 62c66ec88fSEmmanuel Vadot Definition: must be count of data in ports 63c66ec88fSEmmanuel Vadot 64c66ec88fSEmmanuel Vadot- qcom,ports-offset1: 65c66ec88fSEmmanuel Vadot Usage: required 66c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 67c66ec88fSEmmanuel Vadot Definition: should specify payload transport window offset1 of each 68c66ec88fSEmmanuel Vadot data port. Out ports followed by In ports. 692eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 702eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 71c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel Vadot- qcom,ports-offset2: 74c66ec88fSEmmanuel Vadot Usage: required 75c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 76c66ec88fSEmmanuel Vadot Definition: should specify payload transport window offset2 of each 77c66ec88fSEmmanuel Vadot data port. Out ports followed by In ports. 782eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 792eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 80c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 81c66ec88fSEmmanuel Vadot 82c66ec88fSEmmanuel Vadot- qcom,ports-sinterval-low: 83c66ec88fSEmmanuel Vadot Usage: required 84c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 85c66ec88fSEmmanuel Vadot Definition: should be sample interval low of each data port. 86c66ec88fSEmmanuel Vadot Out ports followed by In ports. Used for Sample Interval 87c66ec88fSEmmanuel Vadot calculation. 882eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 892eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 90c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot- qcom,ports-word-length: 93c66ec88fSEmmanuel Vadot Usage: optional 94c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 95c66ec88fSEmmanuel Vadot Definition: should be size of payload channel sample. 962eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 972eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 98c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel Vadot- qcom,ports-block-pack-mode: 101c66ec88fSEmmanuel Vadot Usage: optional 102c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 103c66ec88fSEmmanuel Vadot Definition: should be 0 or 1 to indicate the block packing mode. 104c66ec88fSEmmanuel Vadot 0 to indicate Blocks are per Channel 105c66ec88fSEmmanuel Vadot 1 to indicate Blocks are per Port. 106c66ec88fSEmmanuel Vadot Out ports followed by In ports. 1072eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 1082eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 109c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 110c66ec88fSEmmanuel Vadot 111c66ec88fSEmmanuel Vadot- qcom,ports-block-group-count: 112c66ec88fSEmmanuel Vadot Usage: optional 113c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 114c66ec88fSEmmanuel Vadot Definition: should be in range 1 to 4 to indicate how many sample 115c66ec88fSEmmanuel Vadot intervals are combined into a payload. 116c66ec88fSEmmanuel Vadot Out ports followed by In ports. 1172eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 1182eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 119c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot- qcom,ports-lane-control: 122c66ec88fSEmmanuel Vadot Usage: optional 123c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 124c66ec88fSEmmanuel Vadot Definition: should be in range 0 to 7 to identify which data lane 125c66ec88fSEmmanuel Vadot the data port uses. 126c66ec88fSEmmanuel Vadot Out ports followed by In ports. 1272eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 1282eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 129c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot- qcom,ports-hstart: 132c66ec88fSEmmanuel Vadot Usage: optional 133c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 134c66ec88fSEmmanuel Vadot Definition: should be number identifying lowerst numbered coloum in 135c66ec88fSEmmanuel Vadot SoundWire Frame, i.e. left edge of the Transport sub-frame 136c66ec88fSEmmanuel Vadot for each port. Values between 0 and 15 are valid. 137c66ec88fSEmmanuel Vadot Out ports followed by In ports. 1382eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 1392eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 140c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot- qcom,ports-hstop: 143c66ec88fSEmmanuel Vadot Usage: optional 144c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 145c66ec88fSEmmanuel Vadot Definition: should be number identifying highest numbered coloum in 146c66ec88fSEmmanuel Vadot SoundWire Frame, i.e. the right edge of the Transport 147c66ec88fSEmmanuel Vadot sub-frame for each port. Values between 0 and 15 are valid. 148c66ec88fSEmmanuel Vadot Out ports followed by In ports. 1492eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 1502eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 151c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 152c66ec88fSEmmanuel Vadot 153c66ec88fSEmmanuel Vadot- qcom,dports-type: 154c66ec88fSEmmanuel Vadot Usage: optional 155c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 156c66ec88fSEmmanuel Vadot Definition: should be one of the following types 157c66ec88fSEmmanuel Vadot 0 for reduced port 158c66ec88fSEmmanuel Vadot 1 for simple ports 159c66ec88fSEmmanuel Vadot 2 for full port 160c66ec88fSEmmanuel Vadot Out ports followed by In ports. 1612eb4d8dcSEmmanuel Vadot Value of 0xFF indicates that this option is not implemented 1622eb4d8dcSEmmanuel Vadot or applicable for the respective data port. 163c66ec88fSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel VadotNote: 166c66ec88fSEmmanuel Vadot More Information on detail of encoding of these fields can be 167c66ec88fSEmmanuel Vadotfound in MIPI Alliance SoundWire 1.0 Specifications. 168c66ec88fSEmmanuel Vadot 169c66ec88fSEmmanuel Vadot= SoundWire devices 170c66ec88fSEmmanuel VadotEach subnode of the bus represents SoundWire device attached to it. 171c66ec88fSEmmanuel VadotThe properties of these nodes are defined by the individual bindings. 172c66ec88fSEmmanuel Vadot 173c66ec88fSEmmanuel Vadot= EXAMPLE 174c66ec88fSEmmanuel VadotThe following example represents a SoundWire controller on DB845c board 175c66ec88fSEmmanuel Vadotwhich has controller integrated inside WCD934x codec on SDM845 SoC. 176c66ec88fSEmmanuel Vadot 177c66ec88fSEmmanuel Vadotsoundwire: soundwire@c85 { 178c66ec88fSEmmanuel Vadot compatible = "qcom,soundwire-v1.3.0"; 179c66ec88fSEmmanuel Vadot reg = <0xc85 0x20>; 180c66ec88fSEmmanuel Vadot interrupts = <20 IRQ_TYPE_EDGE_RISING>; 181c66ec88fSEmmanuel Vadot clocks = <&wcc>; 182c66ec88fSEmmanuel Vadot clock-names = "iface"; 183c66ec88fSEmmanuel Vadot #sound-dai-cells = <1>; 184c66ec88fSEmmanuel Vadot qcom,dports-type = <0>; 185c66ec88fSEmmanuel Vadot qcom,dout-ports = <6>; 186c66ec88fSEmmanuel Vadot qcom,din-ports = <2>; 187c66ec88fSEmmanuel Vadot qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1F 0x3F 0x7 0x1F 0x3F 0x0F 0x0F>; 188c66ec88fSEmmanuel Vadot qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0C 0x6 0x12 0x0D 0x07 0x0A >; 189c66ec88fSEmmanuel Vadot qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1F 0x00 0x00 0x1F 0x00 0x00>; 190c66ec88fSEmmanuel Vadot 191c66ec88fSEmmanuel Vadot /* Left Speaker */ 192c66ec88fSEmmanuel Vadot left{ 193c66ec88fSEmmanuel Vadot .... 194c66ec88fSEmmanuel Vadot }; 195c66ec88fSEmmanuel Vadot 196c66ec88fSEmmanuel Vadot /* Right Speaker */ 197c66ec88fSEmmanuel Vadot right{ 198c66ec88fSEmmanuel Vadot .... 199c66ec88fSEmmanuel Vadot }; 200c66ec88fSEmmanuel Vadot}; 201