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