18c2ecf20Sopenharmony_ciQualcomm SoundWire Controller Bindings 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThis binding describes the Qualcomm SoundWire Controller along with its 58c2ecf20Sopenharmony_ciboard specific bus parameters. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci- compatible: 88c2ecf20Sopenharmony_ci Usage: required 98c2ecf20Sopenharmony_ci Value type: <stringlist> 108c2ecf20Sopenharmony_ci Definition: must be "qcom,soundwire-v<MAJOR>.<MINOR>.<STEP>", 118c2ecf20Sopenharmony_ci Example: 128c2ecf20Sopenharmony_ci "qcom,soundwire-v1.3.0" 138c2ecf20Sopenharmony_ci "qcom,soundwire-v1.5.0" 148c2ecf20Sopenharmony_ci "qcom,soundwire-v1.5.1" 158c2ecf20Sopenharmony_ci "qcom,soundwire-v1.6.0" 168c2ecf20Sopenharmony_ci- reg: 178c2ecf20Sopenharmony_ci Usage: required 188c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 198c2ecf20Sopenharmony_ci Definition: the base address and size of SoundWire controller 208c2ecf20Sopenharmony_ci address space. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci- interrupts: 238c2ecf20Sopenharmony_ci Usage: required 248c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 258c2ecf20Sopenharmony_ci Definition: should specify the SoundWire Controller IRQ 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci- clock-names: 288c2ecf20Sopenharmony_ci Usage: required 298c2ecf20Sopenharmony_ci Value type: <stringlist> 308c2ecf20Sopenharmony_ci Definition: should be "iface" for SoundWire Controller interface clock 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci- clocks: 338c2ecf20Sopenharmony_ci Usage: required 348c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 358c2ecf20Sopenharmony_ci Definition: should specify the SoundWire Controller interface clock 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci- #sound-dai-cells: 388c2ecf20Sopenharmony_ci Usage: required 398c2ecf20Sopenharmony_ci Value type: <u32> 408c2ecf20Sopenharmony_ci Definition: must be 1 for digital audio interfaces on the controller. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci- qcom,dout-ports: 438c2ecf20Sopenharmony_ci Usage: required 448c2ecf20Sopenharmony_ci Value type: <u32> 458c2ecf20Sopenharmony_ci Definition: must be count of data out ports 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci- qcom,din-ports: 488c2ecf20Sopenharmony_ci Usage: required 498c2ecf20Sopenharmony_ci Value type: <u32> 508c2ecf20Sopenharmony_ci Definition: must be count of data in ports 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci- qcom,ports-offset1: 538c2ecf20Sopenharmony_ci Usage: required 548c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 558c2ecf20Sopenharmony_ci Definition: should specify payload transport window offset1 of each 568c2ecf20Sopenharmony_ci data port. Out ports followed by In ports. 578c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci- qcom,ports-offset2: 608c2ecf20Sopenharmony_ci Usage: required 618c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 628c2ecf20Sopenharmony_ci Definition: should specify payload transport window offset2 of each 638c2ecf20Sopenharmony_ci data port. Out ports followed by In ports. 648c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci- qcom,ports-sinterval-low: 678c2ecf20Sopenharmony_ci Usage: required 688c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 698c2ecf20Sopenharmony_ci Definition: should be sample interval low of each data port. 708c2ecf20Sopenharmony_ci Out ports followed by In ports. Used for Sample Interval 718c2ecf20Sopenharmony_ci calculation. 728c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci- qcom,ports-word-length: 758c2ecf20Sopenharmony_ci Usage: optional 768c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 778c2ecf20Sopenharmony_ci Definition: should be size of payload channel sample. 788c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci- qcom,ports-block-pack-mode: 818c2ecf20Sopenharmony_ci Usage: optional 828c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 838c2ecf20Sopenharmony_ci Definition: should be 0 or 1 to indicate the block packing mode. 848c2ecf20Sopenharmony_ci 0 to indicate Blocks are per Channel 858c2ecf20Sopenharmony_ci 1 to indicate Blocks are per Port. 868c2ecf20Sopenharmony_ci Out ports followed by In ports. 878c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci- qcom,ports-block-group-count: 908c2ecf20Sopenharmony_ci Usage: optional 918c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 928c2ecf20Sopenharmony_ci Definition: should be in range 1 to 4 to indicate how many sample 938c2ecf20Sopenharmony_ci intervals are combined into a payload. 948c2ecf20Sopenharmony_ci Out ports followed by In ports. 958c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci- qcom,ports-lane-control: 988c2ecf20Sopenharmony_ci Usage: optional 998c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 1008c2ecf20Sopenharmony_ci Definition: should be in range 0 to 7 to identify which data lane 1018c2ecf20Sopenharmony_ci the data port uses. 1028c2ecf20Sopenharmony_ci Out ports followed by In ports. 1038c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci- qcom,ports-hstart: 1068c2ecf20Sopenharmony_ci Usage: optional 1078c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 1088c2ecf20Sopenharmony_ci Definition: should be number identifying lowerst numbered coloum in 1098c2ecf20Sopenharmony_ci SoundWire Frame, i.e. left edge of the Transport sub-frame 1108c2ecf20Sopenharmony_ci for each port. Values between 0 and 15 are valid. 1118c2ecf20Sopenharmony_ci Out ports followed by In ports. 1128c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci- qcom,ports-hstop: 1158c2ecf20Sopenharmony_ci Usage: optional 1168c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 1178c2ecf20Sopenharmony_ci Definition: should be number identifying highest numbered coloum in 1188c2ecf20Sopenharmony_ci SoundWire Frame, i.e. the right edge of the Transport 1198c2ecf20Sopenharmony_ci sub-frame for each port. Values between 0 and 15 are valid. 1208c2ecf20Sopenharmony_ci Out ports followed by In ports. 1218c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci- qcom,dports-type: 1248c2ecf20Sopenharmony_ci Usage: optional 1258c2ecf20Sopenharmony_ci Value type: <prop-encoded-array> 1268c2ecf20Sopenharmony_ci Definition: should be one of the following types 1278c2ecf20Sopenharmony_ci 0 for reduced port 1288c2ecf20Sopenharmony_ci 1 for simple ports 1298c2ecf20Sopenharmony_ci 2 for full port 1308c2ecf20Sopenharmony_ci Out ports followed by In ports. 1318c2ecf20Sopenharmony_ci More info in MIPI Alliance SoundWire 1.0 Specifications. 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ciNote: 1348c2ecf20Sopenharmony_ci More Information on detail of encoding of these fields can be 1358c2ecf20Sopenharmony_cifound in MIPI Alliance SoundWire 1.0 Specifications. 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci= SoundWire devices 1388c2ecf20Sopenharmony_ciEach subnode of the bus represents SoundWire device attached to it. 1398c2ecf20Sopenharmony_ciThe properties of these nodes are defined by the individual bindings. 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci= EXAMPLE 1428c2ecf20Sopenharmony_ciThe following example represents a SoundWire controller on DB845c board 1438c2ecf20Sopenharmony_ciwhich has controller integrated inside WCD934x codec on SDM845 SoC. 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_cisoundwire: soundwire@c85 { 1468c2ecf20Sopenharmony_ci compatible = "qcom,soundwire-v1.3.0"; 1478c2ecf20Sopenharmony_ci reg = <0xc85 0x20>; 1488c2ecf20Sopenharmony_ci interrupts = <20 IRQ_TYPE_EDGE_RISING>; 1498c2ecf20Sopenharmony_ci clocks = <&wcc>; 1508c2ecf20Sopenharmony_ci clock-names = "iface"; 1518c2ecf20Sopenharmony_ci #sound-dai-cells = <1>; 1528c2ecf20Sopenharmony_ci qcom,dports-type = <0>; 1538c2ecf20Sopenharmony_ci qcom,dout-ports = <6>; 1548c2ecf20Sopenharmony_ci qcom,din-ports = <2>; 1558c2ecf20Sopenharmony_ci qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1F 0x3F 0x7 0x1F 0x3F 0x0F 0x0F>; 1568c2ecf20Sopenharmony_ci qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0C 0x6 0x12 0x0D 0x07 0x0A >; 1578c2ecf20Sopenharmony_ci qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1F 0x00 0x00 0x1F 0x00 0x00>; 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci /* Left Speaker */ 1608c2ecf20Sopenharmony_ci left{ 1618c2ecf20Sopenharmony_ci .... 1628c2ecf20Sopenharmony_ci }; 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci /* Right Speaker */ 1658c2ecf20Sopenharmony_ci right{ 1668c2ecf20Sopenharmony_ci .... 1678c2ecf20Sopenharmony_ci }; 1688c2ecf20Sopenharmony_ci}; 169