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 oneOf: 19 - enum: 20 - qcom,soundwire-v1.3.0 21 - qcom,soundwire-v1.5.0 22 - qcom,soundwire-v1.5.1 23 - qcom,soundwire-v1.6.0 24 - qcom,soundwire-v1.7.0 25 - qcom,soundwire-v2.0.0 26 - items: 27 - enum: 28 - qcom,soundwire-v2.1.0 29 - const: qcom,soundwire-v2.0.0 30 31 reg: 32 maxItems: 1 33 34 interrupts: 35 minItems: 1 36 items: 37 - description: specify the SoundWire controller core. 38 - description: specify the Soundwire controller wake IRQ. 39 40 interrupt-names: 41 minItems: 1 42 items: 43 - const: core 44 - const: wakeup 45 46 clocks: 47 items: 48 - description: iface clock 49 50 clock-names: 51 items: 52 - const: iface 53 54 resets: 55 items: 56 - description: SWR_AUDIO_CGCR RESET 57 58 reset-names: 59 items: 60 - const: swr_audio_cgcr 61 62 '#sound-dai-cells': 63 const: 1 64 65 '#address-cells': 66 const: 2 67 68 '#size-cells': 69 const: 0 70 71 wakeup-source: true 72 73 qcom,din-ports: 74 $ref: /schemas/types.yaml#/definitions/uint32 75 description: count of data in ports 76 77 qcom,dout-ports: 78 $ref: /schemas/types.yaml#/definitions/uint32 79 description: count of data out ports 80 81 qcom,ports-word-length: 82 $ref: /schemas/types.yaml#/definitions/uint8-array 83 description: 84 Size of payload channel sample. 85 Value of 0xff indicates that this option is not implemented 86 or applicable for the respective data port. 87 More info in MIPI Alliance SoundWire 1.0 Specifications. 88 minItems: 3 89 maxItems: 16 90 91 qcom,ports-sinterval-low: 92 $ref: /schemas/types.yaml#/definitions/uint8-array 93 description: 94 Sample interval (only lowest byte) of each data port. 95 Out ports followed by In ports. Used for Sample Interval calculation. 96 Value of 0xff indicates that this option is not implemented 97 or applicable for the respective data port. 98 More info in MIPI Alliance SoundWire 1.0 Specifications. 99 minItems: 3 100 maxItems: 16 101 102 qcom,ports-sinterval: 103 $ref: /schemas/types.yaml#/definitions/uint16-array 104 description: 105 Sample interval of each data port. 106 Out ports followed by In ports. Used for Sample Interval calculation. 107 Value of 0xffff indicates that this option is not implemented 108 or applicable for the respective data port. 109 More info in MIPI Alliance SoundWire 1.0 Specifications. 110 minItems: 3 111 maxItems: 16 112 113 qcom,ports-offset1: 114 $ref: /schemas/types.yaml#/definitions/uint8-array 115 description: 116 Payload transport window offset1 of each data port. 117 Out ports followed by In ports. 118 Value of 0xff indicates that this option is not implemented 119 or applicable for the respective data port. 120 More info in MIPI Alliance SoundWire 1.0 Specifications. 121 minItems: 3 122 maxItems: 16 123 124 qcom,ports-offset2: 125 $ref: /schemas/types.yaml#/definitions/uint8-array 126 description: 127 Payload transport window offset2 of each data port. 128 Out ports followed by In ports. 129 Value of 0xff indicates that this option is not implemented 130 or applicable for the respective data port. 131 More info in MIPI Alliance SoundWire 1.0 Specifications. 132 minItems: 3 133 maxItems: 16 134 135 qcom,ports-lane-control: 136 $ref: /schemas/types.yaml#/definitions/uint8-array 137 description: 138 Identify which data lane the data port uses. 139 Out ports followed by In ports. 140 Value of 0xff indicates that this option is not implemented 141 or applicable for the respective data port. 142 More info in MIPI Alliance SoundWire 1.0 Specifications. 143 minItems: 3 144 maxItems: 16 145 146 qcom,ports-block-pack-mode: 147 $ref: /schemas/types.yaml#/definitions/uint8-array 148 description: 149 Indicate the block packing mode. 150 0 to indicate Blocks are per Channel 151 1 to indicate Blocks are per 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: 16 158 items: 159 oneOf: 160 - minimum: 0 161 maximum: 1 162 - const: 0xff 163 164 qcom,ports-hstart: 165 $ref: /schemas/types.yaml#/definitions/uint8-array 166 description: 167 Identifying lowerst numbered column in SoundWire Frame, 168 i.e. left edge of the Transport sub-frame for each port. 169 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: 16 175 items: 176 oneOf: 177 - minimum: 0 178 maximum: 15 179 - const: 0xff 180 181 qcom,ports-hstop: 182 $ref: /schemas/types.yaml#/definitions/uint8-array 183 description: 184 Identifying highest numbered column in SoundWire Frame, 185 i.e. the right edge of the Transport 186 sub-frame for each port. Out ports followed by In ports. 187 Value of 0xff indicates that this option is not implemented 188 or applicable for the respective data port. 189 More info in MIPI Alliance SoundWire 1.0 Specifications. 190 minItems: 3 191 maxItems: 16 192 items: 193 oneOf: 194 - minimum: 0 195 maximum: 15 196 - const: 0xff 197 198 qcom,ports-block-group-count: 199 $ref: /schemas/types.yaml#/definitions/uint8-array 200 description: 201 In range 1 to 4 to indicate how many sample intervals are combined 202 into a payload. Out ports followed by In ports. 203 Value of 0xff indicates that this option is not implemented 204 or applicable for the respective data port. 205 More info in MIPI Alliance SoundWire 1.0 Specifications. 206 minItems: 3 207 maxItems: 16 208 items: 209 oneOf: 210 - minimum: 0 211 maximum: 4 212 - const: 0xff 213 214 label: 215 maxItems: 1 216 217required: 218 - compatible 219 - reg 220 - interrupts 221 - clocks 222 - clock-names 223 - '#sound-dai-cells' 224 - '#address-cells' 225 - '#size-cells' 226 - qcom,dout-ports 227 - qcom,din-ports 228 - qcom,ports-offset1 229 - qcom,ports-offset2 230 231oneOf: 232 - required: 233 - qcom,ports-sinterval-low 234 - required: 235 - qcom,ports-sinterval 236 237allOf: 238 - $ref: soundwire-controller.yaml# 239 240unevaluatedProperties: false 241 242examples: 243 - | 244 #include <dt-bindings/interrupt-controller/arm-gic.h> 245 #include <dt-bindings/interrupt-controller/irq.h> 246 #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> 247 248 soundwire@3210000 { 249 compatible = "qcom,soundwire-v1.6.0"; 250 reg = <0x03210000 0x2000>; 251 252 interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, 253 <&pdc 130 IRQ_TYPE_LEVEL_HIGH>; 254 255 interrupt-names = "core", "wakeup"; 256 257 clocks = <&lpass_rx_macro>; 258 clock-names = "iface"; 259 260 qcom,din-ports = <0>; 261 qcom,dout-ports = <5>; 262 263 resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>; 264 reset-names = "swr_audio_cgcr"; 265 266 qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>; 267 qcom,ports-sinterval-low = /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>; 268 qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>; 269 qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>; 270 qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>; 271 qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>; 272 qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>; 273 qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>; 274 qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>; 275 276 #sound-dai-cells = <1>; 277 #address-cells = <2>; 278 #size-cells = <0>; 279 280 codec@0,4 { 281 compatible = "sdw20217010d00"; 282 reg = <0 4>; 283 qcom,rx-port-mapping = <1 2 3 4 5>; 284 }; 285 }; 286