1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm SoundWire Controller 8 9maintainers: 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 - Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> 12 13description: 14 The Qualcomm SoundWire controller along with its board specific bus parameters. 15 16properties: 17 compatible: 18 enum: 19 - qcom,soundwire-v1.3.0 20 - qcom,soundwire-v1.5.0 21 - qcom,soundwire-v1.5.1 22 - qcom,soundwire-v1.6.0 23 - qcom,soundwire-v1.7.0 24 25 reg: 26 maxItems: 1 27 28 interrupts: 29 minItems: 1 30 items: 31 - description: specify the SoundWire controller core. 32 - description: specify the Soundwire controller wake IRQ. 33 34 interrupt-names: 35 minItems: 1 36 items: 37 - const: core 38 - const: wakeup 39 40 clocks: 41 items: 42 - description: iface clock 43 44 clock-names: 45 items: 46 - const: iface 47 48 resets: 49 items: 50 - description: SWR_AUDIO_CGCR RESET 51 52 reset-names: 53 items: 54 - const: swr_audio_cgcr 55 56 '#sound-dai-cells': 57 const: 1 58 59 '#address-cells': 60 const: 2 61 62 '#size-cells': 63 const: 0 64 65 wakeup-source: true 66 67 qcom,din-ports: 68 $ref: /schemas/types.yaml#/definitions/uint32 69 description: count of data in ports 70 71 qcom,dout-ports: 72 $ref: /schemas/types.yaml#/definitions/uint32 73 description: count of data out ports 74 75 qcom,ports-word-length: 76 $ref: /schemas/types.yaml#/definitions/uint8-array 77 description: 78 Size of payload channel sample. 79 Value of 0xff indicates that this option is not implemented 80 or applicable for the respective data port. 81 More info in MIPI Alliance SoundWire 1.0 Specifications. 82 minItems: 3 83 maxItems: 8 84 85 qcom,ports-sinterval-low: 86 $ref: /schemas/types.yaml#/definitions/uint8-array 87 description: 88 Sample interval low of each data port. 89 Out ports followed by In ports. Used for Sample Interval calculation. 90 Value of 0xff indicates that this option is not implemented 91 or applicable for the respective data port. 92 More info in MIPI Alliance SoundWire 1.0 Specifications. 93 minItems: 3 94 maxItems: 8 95 96 qcom,ports-offset1: 97 $ref: /schemas/types.yaml#/definitions/uint8-array 98 description: 99 Payload transport window offset1 of each data port. 100 Out ports followed by In ports. 101 Value of 0xff indicates that this option is not implemented 102 or applicable for the respective data port. 103 More info in MIPI Alliance SoundWire 1.0 Specifications. 104 minItems: 3 105 maxItems: 8 106 107 qcom,ports-offset2: 108 $ref: /schemas/types.yaml#/definitions/uint8-array 109 description: 110 Payload transport window offset2 of each data port. 111 Out ports followed by In ports. 112 Value of 0xff indicates that this option is not implemented 113 or applicable for the respective data port. 114 More info in MIPI Alliance SoundWire 1.0 Specifications. 115 minItems: 3 116 maxItems: 8 117 118 qcom,ports-lane-control: 119 $ref: /schemas/types.yaml#/definitions/uint8-array 120 description: 121 Identify which data lane the data port uses. 122 Out ports followed by In ports. 123 Value of 0xff indicates that this option is not implemented 124 or applicable for the respective data port. 125 More info in MIPI Alliance SoundWire 1.0 Specifications. 126 minItems: 3 127 maxItems: 8 128 129 qcom,ports-block-pack-mode: 130 $ref: /schemas/types.yaml#/definitions/uint8-array 131 description: 132 Indicate the block packing mode. 133 0 to indicate Blocks are per Channel 134 1 to indicate Blocks are per Port. 135 Out ports followed by In ports. 136 Value of 0xff indicates that this option is not implemented 137 or applicable for the respective data port. 138 More info in MIPI Alliance SoundWire 1.0 Specifications. 139 minItems: 3 140 maxItems: 8 141 items: 142 oneOf: 143 - minimum: 0 144 maximum: 1 145 - const: 0xff 146 147 qcom,ports-hstart: 148 $ref: /schemas/types.yaml#/definitions/uint8-array 149 description: 150 Identifying lowerst numbered coloum in SoundWire Frame, 151 i.e. left edge of the Transport sub-frame for each port. 152 Out ports followed by In ports. 153 Value of 0xff indicates that this option is not implemented 154 or applicable for the respective data port. 155 More info in MIPI Alliance SoundWire 1.0 Specifications. 156 minItems: 3 157 maxItems: 8 158 items: 159 oneOf: 160 - minimum: 0 161 maximum: 15 162 - const: 0xff 163 164 qcom,ports-hstop: 165 $ref: /schemas/types.yaml#/definitions/uint8-array 166 description: 167 Identifying highest numbered coloum in SoundWire Frame, 168 i.e. the right edge of the Transport 169 sub-frame for each port. Out ports followed by In ports. 170 Value of 0xff indicates that this option is not implemented 171 or applicable for the respective data port. 172 More info in MIPI Alliance SoundWire 1.0 Specifications. 173 minItems: 3 174 maxItems: 8 175 items: 176 oneOf: 177 - minimum: 0 178 maximum: 15 179 - const: 0xff 180 181 qcom,ports-block-group-count: 182 $ref: /schemas/types.yaml#/definitions/uint8-array 183 description: 184 In range 1 to 4 to indicate how many sample intervals are combined 185 into a payload. Out ports followed by In ports. 186 Value of 0xff indicates that this option is not implemented 187 or applicable for the respective data port. 188 More info in MIPI Alliance SoundWire 1.0 Specifications. 189 minItems: 3 190 maxItems: 8 191 items: 192 oneOf: 193 - minimum: 0 194 maximum: 4 195 - const: 0xff 196 197 label: 198 maxItems: 1 199 200patternProperties: 201 "^.*@[0-9a-f],[0-9a-f]$": 202 type: object 203 description: 204 Child nodes for a standalone audio codec or speaker amplifier IC. 205 It has RX and TX Soundwire secondary devices. 206 properties: 207 compatible: 208 pattern: "^sdw[0-9a-f]{1}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{2}$" 209 210required: 211 - compatible 212 - reg 213 - interrupts 214 - clocks 215 - clock-names 216 - '#sound-dai-cells' 217 - '#address-cells' 218 - '#size-cells' 219 - qcom,dout-ports 220 - qcom,din-ports 221 - qcom,ports-sinterval-low 222 - qcom,ports-offset1 223 - qcom,ports-offset2 224 225additionalProperties: false 226 227examples: 228 - | 229 #include <dt-bindings/interrupt-controller/arm-gic.h> 230 #include <dt-bindings/interrupt-controller/irq.h> 231 #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> 232 233 soundwire@3210000 { 234 compatible = "qcom,soundwire-v1.6.0"; 235 reg = <0x03210000 0x2000>; 236 237 interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, 238 <&pdc 130 IRQ_TYPE_LEVEL_HIGH>; 239 240 interrupt-names = "core", "wakeup"; 241 242 clocks = <&lpass_rx_macro>; 243 clock-names = "iface"; 244 245 qcom,din-ports = <0>; 246 qcom,dout-ports = <5>; 247 248 resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>; 249 reset-names = "swr_audio_cgcr"; 250 251 qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>; 252 qcom,ports-sinterval-low = /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>; 253 qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>; 254 qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>; 255 qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>; 256 qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>; 257 qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>; 258 qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>; 259 qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>; 260 261 #sound-dai-cells = <1>; 262 #address-cells = <2>; 263 #size-cells = <0>; 264 265 codec@0,4 { 266 compatible = "sdw20217010d00"; 267 reg = <0 4>; 268 qcom,rx-port-mapping = <1 2 3 4 5>; 269 }; 270 }; 271