18bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28bab661aSEmmanuel Vadot%YAML 1.2 38bab661aSEmmanuel Vadot--- 48bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml# 58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68bab661aSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Qualcomm SoundWire Controller 88bab661aSEmmanuel Vadot 98bab661aSEmmanuel Vadotmaintainers: 108bab661aSEmmanuel Vadot - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 118bab661aSEmmanuel Vadot - Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> 128bab661aSEmmanuel Vadot 138bab661aSEmmanuel Vadotdescription: 148bab661aSEmmanuel Vadot The Qualcomm SoundWire controller along with its board specific bus parameters. 158bab661aSEmmanuel Vadot 168bab661aSEmmanuel Vadotproperties: 178bab661aSEmmanuel Vadot compatible: 188bab661aSEmmanuel Vadot enum: 198bab661aSEmmanuel Vadot - qcom,soundwire-v1.3.0 208bab661aSEmmanuel Vadot - qcom,soundwire-v1.5.0 218bab661aSEmmanuel Vadot - qcom,soundwire-v1.5.1 228bab661aSEmmanuel Vadot - qcom,soundwire-v1.6.0 238bab661aSEmmanuel Vadot - qcom,soundwire-v1.7.0 24f126890aSEmmanuel Vadot - qcom,soundwire-v2.0.0 258bab661aSEmmanuel Vadot 268bab661aSEmmanuel Vadot reg: 278bab661aSEmmanuel Vadot maxItems: 1 288bab661aSEmmanuel Vadot 298bab661aSEmmanuel Vadot interrupts: 308bab661aSEmmanuel Vadot minItems: 1 318bab661aSEmmanuel Vadot items: 328bab661aSEmmanuel Vadot - description: specify the SoundWire controller core. 338bab661aSEmmanuel Vadot - description: specify the Soundwire controller wake IRQ. 348bab661aSEmmanuel Vadot 358bab661aSEmmanuel Vadot interrupt-names: 368bab661aSEmmanuel Vadot minItems: 1 378bab661aSEmmanuel Vadot items: 388bab661aSEmmanuel Vadot - const: core 398bab661aSEmmanuel Vadot - const: wakeup 408bab661aSEmmanuel Vadot 418bab661aSEmmanuel Vadot clocks: 428bab661aSEmmanuel Vadot items: 438bab661aSEmmanuel Vadot - description: iface clock 448bab661aSEmmanuel Vadot 458bab661aSEmmanuel Vadot clock-names: 468bab661aSEmmanuel Vadot items: 478bab661aSEmmanuel Vadot - const: iface 488bab661aSEmmanuel Vadot 498bab661aSEmmanuel Vadot resets: 508bab661aSEmmanuel Vadot items: 518bab661aSEmmanuel Vadot - description: SWR_AUDIO_CGCR RESET 528bab661aSEmmanuel Vadot 538bab661aSEmmanuel Vadot reset-names: 548bab661aSEmmanuel Vadot items: 558bab661aSEmmanuel Vadot - const: swr_audio_cgcr 568bab661aSEmmanuel Vadot 578bab661aSEmmanuel Vadot '#sound-dai-cells': 588bab661aSEmmanuel Vadot const: 1 598bab661aSEmmanuel Vadot 608bab661aSEmmanuel Vadot '#address-cells': 618bab661aSEmmanuel Vadot const: 2 628bab661aSEmmanuel Vadot 638bab661aSEmmanuel Vadot '#size-cells': 648bab661aSEmmanuel Vadot const: 0 658bab661aSEmmanuel Vadot 668bab661aSEmmanuel Vadot wakeup-source: true 678bab661aSEmmanuel Vadot 688bab661aSEmmanuel Vadot qcom,din-ports: 698bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 708bab661aSEmmanuel Vadot description: count of data in ports 718bab661aSEmmanuel Vadot 728bab661aSEmmanuel Vadot qcom,dout-ports: 738bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 748bab661aSEmmanuel Vadot description: count of data out ports 758bab661aSEmmanuel Vadot 768bab661aSEmmanuel Vadot qcom,ports-word-length: 778bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 788bab661aSEmmanuel Vadot description: 798bab661aSEmmanuel Vadot Size of payload channel sample. 808bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 818bab661aSEmmanuel Vadot or applicable for the respective data port. 828bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 838bab661aSEmmanuel Vadot minItems: 3 84f126890aSEmmanuel Vadot maxItems: 16 858bab661aSEmmanuel Vadot 868bab661aSEmmanuel Vadot qcom,ports-sinterval-low: 878bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 888bab661aSEmmanuel Vadot description: 89f126890aSEmmanuel Vadot Sample interval (only lowest byte) of each data port. 908bab661aSEmmanuel Vadot Out ports followed by In ports. Used for Sample Interval calculation. 918bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 928bab661aSEmmanuel Vadot or applicable for the respective data port. 938bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 948bab661aSEmmanuel Vadot minItems: 3 95f126890aSEmmanuel Vadot maxItems: 16 96f126890aSEmmanuel Vadot 97f126890aSEmmanuel Vadot qcom,ports-sinterval: 98f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint16-array 99f126890aSEmmanuel Vadot description: 100f126890aSEmmanuel Vadot Sample interval of each data port. 101f126890aSEmmanuel Vadot Out ports followed by In ports. Used for Sample Interval calculation. 102f126890aSEmmanuel Vadot Value of 0xffff indicates that this option is not implemented 103f126890aSEmmanuel Vadot or applicable for the respective data port. 104f126890aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 105f126890aSEmmanuel Vadot minItems: 3 106f126890aSEmmanuel Vadot maxItems: 16 1078bab661aSEmmanuel Vadot 1088bab661aSEmmanuel Vadot qcom,ports-offset1: 1098bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1108bab661aSEmmanuel Vadot description: 1118bab661aSEmmanuel Vadot Payload transport window offset1 of each data port. 1128bab661aSEmmanuel Vadot Out ports followed by In ports. 1138bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1148bab661aSEmmanuel Vadot or applicable for the respective data port. 1158bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 1168bab661aSEmmanuel Vadot minItems: 3 117f126890aSEmmanuel Vadot maxItems: 16 1188bab661aSEmmanuel Vadot 1198bab661aSEmmanuel Vadot qcom,ports-offset2: 1208bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1218bab661aSEmmanuel Vadot description: 1228bab661aSEmmanuel Vadot Payload transport window offset2 of each data port. 1238bab661aSEmmanuel Vadot Out ports followed by In ports. 1248bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1258bab661aSEmmanuel Vadot or applicable for the respective data port. 1268bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 1278bab661aSEmmanuel Vadot minItems: 3 128f126890aSEmmanuel Vadot maxItems: 16 1298bab661aSEmmanuel Vadot 1308bab661aSEmmanuel Vadot qcom,ports-lane-control: 1318bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1328bab661aSEmmanuel Vadot description: 1338bab661aSEmmanuel Vadot Identify which data lane the data port uses. 1348bab661aSEmmanuel Vadot Out ports followed by In ports. 1358bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1368bab661aSEmmanuel Vadot or applicable for the respective data port. 1378bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 1388bab661aSEmmanuel Vadot minItems: 3 139f126890aSEmmanuel Vadot maxItems: 16 1408bab661aSEmmanuel Vadot 1418bab661aSEmmanuel Vadot qcom,ports-block-pack-mode: 1428bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1438bab661aSEmmanuel Vadot description: 1448bab661aSEmmanuel Vadot Indicate the block packing mode. 1458bab661aSEmmanuel Vadot 0 to indicate Blocks are per Channel 1468bab661aSEmmanuel Vadot 1 to indicate Blocks are per Port. 1478bab661aSEmmanuel Vadot Out ports followed by In ports. 1488bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1498bab661aSEmmanuel Vadot or applicable for the respective data port. 1508bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 1518bab661aSEmmanuel Vadot minItems: 3 152f126890aSEmmanuel Vadot maxItems: 16 1538bab661aSEmmanuel Vadot items: 1548bab661aSEmmanuel Vadot oneOf: 1558bab661aSEmmanuel Vadot - minimum: 0 1568bab661aSEmmanuel Vadot maximum: 1 1578bab661aSEmmanuel Vadot - const: 0xff 1588bab661aSEmmanuel Vadot 1598bab661aSEmmanuel Vadot qcom,ports-hstart: 1608bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1618bab661aSEmmanuel Vadot description: 162aa1a8ff2SEmmanuel Vadot Identifying lowerst numbered column in SoundWire Frame, 1638bab661aSEmmanuel Vadot i.e. left edge of the Transport sub-frame for each port. 1648bab661aSEmmanuel Vadot Out ports followed by In ports. 1658bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1668bab661aSEmmanuel Vadot or applicable for the respective data port. 1678bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 1688bab661aSEmmanuel Vadot minItems: 3 169f126890aSEmmanuel Vadot maxItems: 16 1708bab661aSEmmanuel Vadot items: 1718bab661aSEmmanuel Vadot oneOf: 1728bab661aSEmmanuel Vadot - minimum: 0 1738bab661aSEmmanuel Vadot maximum: 15 1748bab661aSEmmanuel Vadot - const: 0xff 1758bab661aSEmmanuel Vadot 1768bab661aSEmmanuel Vadot qcom,ports-hstop: 1778bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1788bab661aSEmmanuel Vadot description: 179aa1a8ff2SEmmanuel Vadot Identifying highest numbered column in SoundWire Frame, 1808bab661aSEmmanuel Vadot i.e. the right edge of the Transport 1818bab661aSEmmanuel Vadot sub-frame for each port. Out ports followed by In ports. 1828bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1838bab661aSEmmanuel Vadot or applicable for the respective data port. 1848bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 1858bab661aSEmmanuel Vadot minItems: 3 186f126890aSEmmanuel Vadot maxItems: 16 1878bab661aSEmmanuel Vadot items: 1888bab661aSEmmanuel Vadot oneOf: 1898bab661aSEmmanuel Vadot - minimum: 0 1908bab661aSEmmanuel Vadot maximum: 15 1918bab661aSEmmanuel Vadot - const: 0xff 1928bab661aSEmmanuel Vadot 1938bab661aSEmmanuel Vadot qcom,ports-block-group-count: 1948bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1958bab661aSEmmanuel Vadot description: 1968bab661aSEmmanuel Vadot In range 1 to 4 to indicate how many sample intervals are combined 1978bab661aSEmmanuel Vadot into a payload. Out ports followed by In ports. 1988bab661aSEmmanuel Vadot Value of 0xff indicates that this option is not implemented 1998bab661aSEmmanuel Vadot or applicable for the respective data port. 2008bab661aSEmmanuel Vadot More info in MIPI Alliance SoundWire 1.0 Specifications. 2018bab661aSEmmanuel Vadot minItems: 3 202f126890aSEmmanuel Vadot maxItems: 16 2038bab661aSEmmanuel Vadot items: 2048bab661aSEmmanuel Vadot oneOf: 2058bab661aSEmmanuel Vadot - minimum: 0 2068bab661aSEmmanuel Vadot maximum: 4 2078bab661aSEmmanuel Vadot - const: 0xff 2088bab661aSEmmanuel Vadot 2098bab661aSEmmanuel Vadot label: 2108bab661aSEmmanuel Vadot maxItems: 1 2118bab661aSEmmanuel Vadot 2128bab661aSEmmanuel Vadotrequired: 2138bab661aSEmmanuel Vadot - compatible 2148bab661aSEmmanuel Vadot - reg 2158bab661aSEmmanuel Vadot - interrupts 2168bab661aSEmmanuel Vadot - clocks 2178bab661aSEmmanuel Vadot - clock-names 2188bab661aSEmmanuel Vadot - '#sound-dai-cells' 2198bab661aSEmmanuel Vadot - '#address-cells' 2208bab661aSEmmanuel Vadot - '#size-cells' 2218bab661aSEmmanuel Vadot - qcom,dout-ports 2228bab661aSEmmanuel Vadot - qcom,din-ports 2238bab661aSEmmanuel Vadot - qcom,ports-offset1 2248bab661aSEmmanuel Vadot - qcom,ports-offset2 2258bab661aSEmmanuel Vadot 226f126890aSEmmanuel VadotoneOf: 227f126890aSEmmanuel Vadot - required: 228f126890aSEmmanuel Vadot - qcom,ports-sinterval-low 229f126890aSEmmanuel Vadot - required: 230f126890aSEmmanuel Vadot - qcom,ports-sinterval 231f126890aSEmmanuel Vadot 232*84943d6fSEmmanuel VadotallOf: 233*84943d6fSEmmanuel Vadot - $ref: soundwire-controller.yaml# 234*84943d6fSEmmanuel Vadot 235*84943d6fSEmmanuel VadotunevaluatedProperties: false 2368bab661aSEmmanuel Vadot 2378bab661aSEmmanuel Vadotexamples: 2388bab661aSEmmanuel Vadot - | 2398bab661aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 2408bab661aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 2418bab661aSEmmanuel Vadot #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> 2428bab661aSEmmanuel Vadot 2438bab661aSEmmanuel Vadot soundwire@3210000 { 2448bab661aSEmmanuel Vadot compatible = "qcom,soundwire-v1.6.0"; 2458bab661aSEmmanuel Vadot reg = <0x03210000 0x2000>; 2468bab661aSEmmanuel Vadot 2478bab661aSEmmanuel Vadot interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, 2488bab661aSEmmanuel Vadot <&pdc 130 IRQ_TYPE_LEVEL_HIGH>; 2498bab661aSEmmanuel Vadot 2508bab661aSEmmanuel Vadot interrupt-names = "core", "wakeup"; 2518bab661aSEmmanuel Vadot 2528bab661aSEmmanuel Vadot clocks = <&lpass_rx_macro>; 2538bab661aSEmmanuel Vadot clock-names = "iface"; 2548bab661aSEmmanuel Vadot 2558bab661aSEmmanuel Vadot qcom,din-ports = <0>; 2568bab661aSEmmanuel Vadot qcom,dout-ports = <5>; 2578bab661aSEmmanuel Vadot 2588bab661aSEmmanuel Vadot resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>; 2598bab661aSEmmanuel Vadot reset-names = "swr_audio_cgcr"; 2608bab661aSEmmanuel Vadot 2618bab661aSEmmanuel Vadot qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>; 2628bab661aSEmmanuel Vadot qcom,ports-sinterval-low = /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>; 2638bab661aSEmmanuel Vadot qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>; 2648bab661aSEmmanuel Vadot qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>; 2658bab661aSEmmanuel Vadot qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>; 2668bab661aSEmmanuel Vadot qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>; 2678bab661aSEmmanuel Vadot qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>; 2688bab661aSEmmanuel Vadot qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>; 2698bab661aSEmmanuel Vadot qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>; 2708bab661aSEmmanuel Vadot 2718bab661aSEmmanuel Vadot #sound-dai-cells = <1>; 2728bab661aSEmmanuel Vadot #address-cells = <2>; 2738bab661aSEmmanuel Vadot #size-cells = <0>; 2748bab661aSEmmanuel Vadot 2758bab661aSEmmanuel Vadot codec@0,4 { 2768bab661aSEmmanuel Vadot compatible = "sdw20217010d00"; 2778bab661aSEmmanuel Vadot reg = <0 4>; 2788bab661aSEmmanuel Vadot qcom,rx-port-mapping = <1 2 3 4 5>; 2798bab661aSEmmanuel Vadot }; 2808bab661aSEmmanuel Vadot }; 281