xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,wcd937x-sdw.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,wcd937x-sdw.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: Qualcomm SoundWire Slave devices on WCD9370/WCD9375
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotmaintainers:
10*0e8011faSEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11*0e8011faSEmmanuel Vadot
12*0e8011faSEmmanuel Vadotdescription: |
13*0e8011faSEmmanuel Vadot  Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC.
14*0e8011faSEmmanuel Vadot  It has RX and TX Soundwire slave devices. This bindings is for the
15*0e8011faSEmmanuel Vadot  slave devices.
16*0e8011faSEmmanuel Vadot
17*0e8011faSEmmanuel Vadotproperties:
18*0e8011faSEmmanuel Vadot  compatible:
19*0e8011faSEmmanuel Vadot    const: sdw20217010a00
20*0e8011faSEmmanuel Vadot
21*0e8011faSEmmanuel Vadot  reg:
22*0e8011faSEmmanuel Vadot    maxItems: 1
23*0e8011faSEmmanuel Vadot
24*0e8011faSEmmanuel Vadot  qcom,tx-port-mapping:
25*0e8011faSEmmanuel Vadot    description: |
26*0e8011faSEmmanuel Vadot      Specifies static port mapping between device and host tx ports.
27*0e8011faSEmmanuel Vadot      In the order of the device port index which are adc1_port, adc23_port,
28*0e8011faSEmmanuel Vadot      dmic03_mbhc_port, dmic46_port.
29*0e8011faSEmmanuel Vadot      Supports maximum 4 tx soundwire ports.
30*0e8011faSEmmanuel Vadot
31*0e8011faSEmmanuel Vadot      WCD9370 TX Port 1 (ADC1)               <=> SWR2 Port 2
32*0e8011faSEmmanuel Vadot      WCD9370 TX Port 2 (ADC2, 3)            <=> SWR2 Port 2
33*0e8011faSEmmanuel Vadot      WCD9370 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3
34*0e8011faSEmmanuel Vadot      WCD9370 TX Port 4 (DMIC4,5,6,7)        <=> SWR2 Port 4
35*0e8011faSEmmanuel Vadot
36*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
37*0e8011faSEmmanuel Vadot    minItems: 4
38*0e8011faSEmmanuel Vadot    maxItems: 4
39*0e8011faSEmmanuel Vadot    items:
40*0e8011faSEmmanuel Vadot      enum: [1, 2, 3, 4]
41*0e8011faSEmmanuel Vadot
42*0e8011faSEmmanuel Vadot  qcom,rx-port-mapping:
43*0e8011faSEmmanuel Vadot    description: |
44*0e8011faSEmmanuel Vadot      Specifies static port mapping between device and host rx ports.
45*0e8011faSEmmanuel Vadot      In the order of device port index which are hph_port, clsh_port,
46*0e8011faSEmmanuel Vadot      comp_port, lo_port, dsd port.
47*0e8011faSEmmanuel Vadot      Supports maximum 5 rx soundwire ports.
48*0e8011faSEmmanuel Vadot
49*0e8011faSEmmanuel Vadot      WCD9370 RX Port 1 (HPH_L/R)       <==>    SWR1 Port 1 (HPH_L/R)
50*0e8011faSEmmanuel Vadot      WCD9370 RX Port 2 (CLSH)          <==>    SWR1 Port 2 (CLSH)
51*0e8011faSEmmanuel Vadot      WCD9370 RX Port 3 (COMP_L/R)      <==>    SWR1 Port 3 (COMP_L/R)
52*0e8011faSEmmanuel Vadot      WCD9370 RX Port 4 (LO)            <==>    SWR1 Port 4 (LO)
53*0e8011faSEmmanuel Vadot      WCD9370 RX Port 5 (DSD_L/R)       <==>    SWR1 Port 5 (DSD)
54*0e8011faSEmmanuel Vadot
55*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
56*0e8011faSEmmanuel Vadot    minItems: 5
57*0e8011faSEmmanuel Vadot    maxItems: 5
58*0e8011faSEmmanuel Vadot    items:
59*0e8011faSEmmanuel Vadot      enum: [1, 2, 3, 4, 5]
60*0e8011faSEmmanuel Vadot
61*0e8011faSEmmanuel Vadotrequired:
62*0e8011faSEmmanuel Vadot  - compatible
63*0e8011faSEmmanuel Vadot  - reg
64*0e8011faSEmmanuel Vadot
65*0e8011faSEmmanuel VadotadditionalProperties: false
66*0e8011faSEmmanuel Vadot
67*0e8011faSEmmanuel Vadotexamples:
68*0e8011faSEmmanuel Vadot  - |
69*0e8011faSEmmanuel Vadot    soundwire@3210000 {
70*0e8011faSEmmanuel Vadot        reg = <0x03210000 0x2000>;
71*0e8011faSEmmanuel Vadot        #address-cells = <2>;
72*0e8011faSEmmanuel Vadot        #size-cells = <0>;
73*0e8011faSEmmanuel Vadot        wcd937x_rx: codec@0,4 {
74*0e8011faSEmmanuel Vadot            compatible = "sdw20217010a00";
75*0e8011faSEmmanuel Vadot            reg = <0 4>;
76*0e8011faSEmmanuel Vadot            qcom,rx-port-mapping = <1 2 3 4 5>;
77*0e8011faSEmmanuel Vadot        };
78*0e8011faSEmmanuel Vadot    };
79*0e8011faSEmmanuel Vadot
80*0e8011faSEmmanuel Vadot    soundwire@3230000 {
81*0e8011faSEmmanuel Vadot        reg = <0x03230000 0x2000>;
82*0e8011faSEmmanuel Vadot        #address-cells = <2>;
83*0e8011faSEmmanuel Vadot        #size-cells = <0>;
84*0e8011faSEmmanuel Vadot        wcd937x_tx: codec@0,3 {
85*0e8011faSEmmanuel Vadot            compatible = "sdw20217010a00";
86*0e8011faSEmmanuel Vadot            reg = <0 3>;
87*0e8011faSEmmanuel Vadot            qcom,tx-port-mapping = <2 2 3 4>;
88*0e8011faSEmmanuel Vadot        };
89*0e8011faSEmmanuel Vadot    };
90*0e8011faSEmmanuel Vadot
91*0e8011faSEmmanuel Vadot...
92