281 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Qualcomm SoundWire Controller8 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.020 - qcom,soundwire-v1.5.021 - qcom,soundwire-v1.5.122 - qcom,soundwire-v1.6.023 - qcom,soundwire-v1.7.024 - qcom,soundwire-v2.0.025 26 reg:27 maxItems: 128 29 interrupts:30 minItems: 131 items:32 - description: specify the SoundWire controller core.33 - description: specify the Soundwire controller wake IRQ.34 35 interrupt-names:36 minItems: 137 items:38 - const: core39 - const: wakeup40 41 clocks:42 items:43 - description: iface clock44 45 clock-names:46 items:47 - const: iface48 49 resets:50 items:51 - description: SWR_AUDIO_CGCR RESET52 53 reset-names:54 items:55 - const: swr_audio_cgcr56 57 '#sound-dai-cells':58 const: 159 60 '#address-cells':61 const: 262 63 '#size-cells':64 const: 065 66 wakeup-source: true67 68 qcom,din-ports:69 $ref: /schemas/types.yaml#/definitions/uint3270 description: count of data in ports71 72 qcom,dout-ports:73 $ref: /schemas/types.yaml#/definitions/uint3274 description: count of data out ports75 76 qcom,ports-word-length:77 $ref: /schemas/types.yaml#/definitions/uint8-array78 description:79 Size of payload channel sample.80 Value of 0xff indicates that this option is not implemented81 or applicable for the respective data port.82 More info in MIPI Alliance SoundWire 1.0 Specifications.83 minItems: 384 maxItems: 1685 86 qcom,ports-sinterval-low:87 $ref: /schemas/types.yaml#/definitions/uint8-array88 description:89 Sample interval (only lowest byte) of each data port.90 Out ports followed by In ports. Used for Sample Interval calculation.91 Value of 0xff indicates that this option is not implemented92 or applicable for the respective data port.93 More info in MIPI Alliance SoundWire 1.0 Specifications.94 minItems: 395 maxItems: 1696 97 qcom,ports-sinterval:98 $ref: /schemas/types.yaml#/definitions/uint16-array99 description:100 Sample interval of each data port.101 Out ports followed by In ports. Used for Sample Interval calculation.102 Value of 0xffff indicates that this option is not implemented103 or applicable for the respective data port.104 More info in MIPI Alliance SoundWire 1.0 Specifications.105 minItems: 3106 maxItems: 16107 108 qcom,ports-offset1:109 $ref: /schemas/types.yaml#/definitions/uint8-array110 description:111 Payload transport window offset1 of each data port.112 Out ports followed by In ports.113 Value of 0xff indicates that this option is not implemented114 or applicable for the respective data port.115 More info in MIPI Alliance SoundWire 1.0 Specifications.116 minItems: 3117 maxItems: 16118 119 qcom,ports-offset2:120 $ref: /schemas/types.yaml#/definitions/uint8-array121 description:122 Payload transport window offset2 of each data port.123 Out ports followed by In ports.124 Value of 0xff indicates that this option is not implemented125 or applicable for the respective data port.126 More info in MIPI Alliance SoundWire 1.0 Specifications.127 minItems: 3128 maxItems: 16129 130 qcom,ports-lane-control:131 $ref: /schemas/types.yaml#/definitions/uint8-array132 description:133 Identify which data lane the data port uses.134 Out ports followed by In ports.135 Value of 0xff indicates that this option is not implemented136 or applicable for the respective data port.137 More info in MIPI Alliance SoundWire 1.0 Specifications.138 minItems: 3139 maxItems: 16140 141 qcom,ports-block-pack-mode:142 $ref: /schemas/types.yaml#/definitions/uint8-array143 description:144 Indicate the block packing mode.145 0 to indicate Blocks are per Channel146 1 to indicate Blocks are per Port.147 Out ports followed by In ports.148 Value of 0xff indicates that this option is not implemented149 or applicable for the respective data port.150 More info in MIPI Alliance SoundWire 1.0 Specifications.151 minItems: 3152 maxItems: 16153 items:154 oneOf:155 - minimum: 0156 maximum: 1157 - const: 0xff158 159 qcom,ports-hstart:160 $ref: /schemas/types.yaml#/definitions/uint8-array161 description:162 Identifying lowerst numbered column in SoundWire Frame,163 i.e. left edge of the Transport sub-frame for each port.164 Out ports followed by In ports.165 Value of 0xff indicates that this option is not implemented166 or applicable for the respective data port.167 More info in MIPI Alliance SoundWire 1.0 Specifications.168 minItems: 3169 maxItems: 16170 items:171 oneOf:172 - minimum: 0173 maximum: 15174 - const: 0xff175 176 qcom,ports-hstop:177 $ref: /schemas/types.yaml#/definitions/uint8-array178 description:179 Identifying highest numbered column in SoundWire Frame,180 i.e. the right edge of the Transport181 sub-frame for each port. Out ports followed by In ports.182 Value of 0xff indicates that this option is not implemented183 or applicable for the respective data port.184 More info in MIPI Alliance SoundWire 1.0 Specifications.185 minItems: 3186 maxItems: 16187 items:188 oneOf:189 - minimum: 0190 maximum: 15191 - const: 0xff192 193 qcom,ports-block-group-count:194 $ref: /schemas/types.yaml#/definitions/uint8-array195 description:196 In range 1 to 4 to indicate how many sample intervals are combined197 into a payload. Out ports followed by In ports.198 Value of 0xff indicates that this option is not implemented199 or applicable for the respective data port.200 More info in MIPI Alliance SoundWire 1.0 Specifications.201 minItems: 3202 maxItems: 16203 items:204 oneOf:205 - minimum: 0206 maximum: 4207 - const: 0xff208 209 label:210 maxItems: 1211 212required:213 - compatible214 - reg215 - interrupts216 - clocks217 - clock-names218 - '#sound-dai-cells'219 - '#address-cells'220 - '#size-cells'221 - qcom,dout-ports222 - qcom,din-ports223 - qcom,ports-offset1224 - qcom,ports-offset2225 226oneOf:227 - required:228 - qcom,ports-sinterval-low229 - required:230 - qcom,ports-sinterval231 232allOf:233 - $ref: soundwire-controller.yaml#234 235unevaluatedProperties: false236 237examples:238 - |239 #include <dt-bindings/interrupt-controller/arm-gic.h>240 #include <dt-bindings/interrupt-controller/irq.h>241 #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h>242 243 soundwire@3210000 {244 compatible = "qcom,soundwire-v1.6.0";245 reg = <0x03210000 0x2000>;246 247 interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,248 <&pdc 130 IRQ_TYPE_LEVEL_HIGH>;249 250 interrupt-names = "core", "wakeup";251 252 clocks = <&lpass_rx_macro>;253 clock-names = "iface";254 255 qcom,din-ports = <0>;256 qcom,dout-ports = <5>;257 258 resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>;259 reset-names = "swr_audio_cgcr";260 261 qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>;262 qcom,ports-sinterval-low = /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>;263 qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>;264 qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>;265 qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;266 qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>;267 qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>;268 qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>;269 qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>;270 271 #sound-dai-cells = <1>;272 #address-cells = <2>;273 #size-cells = <0>;274 275 codec@0,4 {276 compatible = "sdw20217010d00";277 reg = <0 4>;278 qcom,rx-port-mapping = <1 2 3 4 5>;279 };280 };281