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