xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/soundwire/soundwire-controller.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: SoundWire Controller Generic Binding
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11*4882a593Smuzhiyun  - Vinod Koul <vkoul@kernel.org>
12*4882a593Smuzhiyun
13*4882a593Smuzhiyundescription: |
14*4882a593Smuzhiyun  SoundWire busses can be described with a node for the SoundWire controller
15*4882a593Smuzhiyun  device and a set of child nodes for each SoundWire slave on the bus.
16*4882a593Smuzhiyun
17*4882a593Smuzhiyunproperties:
18*4882a593Smuzhiyun  $nodename:
19*4882a593Smuzhiyun    pattern: "^soundwire(@.*)?$"
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun  "#address-cells":
22*4882a593Smuzhiyun    const: 2
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun  "#size-cells":
25*4882a593Smuzhiyun    const: 0
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunpatternProperties:
28*4882a593Smuzhiyun  "^.*@[0-9a-f],[0-9a-f]$":
29*4882a593Smuzhiyun    type: object
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun    properties:
32*4882a593Smuzhiyun      compatible:
33*4882a593Smuzhiyun        pattern: "^sdw[0-9a-f]{1}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{2}$"
34*4882a593Smuzhiyun        description: Is the textual representation of SoundWire Enumeration
35*4882a593Smuzhiyun          address. compatible string should contain SoundWire Version ID,
36*4882a593Smuzhiyun          Manufacturer ID, Part ID and Class ID in order and shall be in
37*4882a593Smuzhiyun          lower-case hexadecimal with leading zeroes.
38*4882a593Smuzhiyun          Valid sizes of these fields are
39*4882a593Smuzhiyun          Version ID is 1 nibble, number '0x1' represents SoundWire 1.0
40*4882a593Smuzhiyun          and '0x2' represents SoundWire 1.1 and so on.
41*4882a593Smuzhiyun          MFD is 4 nibbles
42*4882a593Smuzhiyun          PID is 4 nibbles
43*4882a593Smuzhiyun          CID is 2 nibbles
44*4882a593Smuzhiyun          More Information on detail of encoding of these fields can be
45*4882a593Smuzhiyun          found in MIPI Alliance DisCo & SoundWire 1.0 Specifications.
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun      reg:
48*4882a593Smuzhiyun        maxItems: 1
49*4882a593Smuzhiyun        description:
50*4882a593Smuzhiyun          Link ID followed by Instance ID of SoundWire Device Address.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun    required:
53*4882a593Smuzhiyun      - compatible
54*4882a593Smuzhiyun      - reg
55*4882a593Smuzhiyun
56*4882a593Smuzhiyunrequired:
57*4882a593Smuzhiyun  - "#address-cells"
58*4882a593Smuzhiyun  - "#size-cells"
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunadditionalProperties: true
61*4882a593Smuzhiyun
62*4882a593Smuzhiyunexamples:
63*4882a593Smuzhiyun  - |
64*4882a593Smuzhiyun    soundwire@c2d0000 {
65*4882a593Smuzhiyun        #address-cells = <2>;
66*4882a593Smuzhiyun        #size-cells = <0>;
67*4882a593Smuzhiyun        reg = <0x0c2d0000 0x2000>;
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun        speaker@0,1 {
70*4882a593Smuzhiyun            compatible = "sdw10217201000";
71*4882a593Smuzhiyun            reg = <0 1>;
72*4882a593Smuzhiyun            powerdown-gpios = <&wcdpinctrl 2 0>;
73*4882a593Smuzhiyun            #thermal-sensor-cells = <0>;
74*4882a593Smuzhiyun            #sound-dai-cells = <0>;
75*4882a593Smuzhiyun        };
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun        speaker@0,2 {
78*4882a593Smuzhiyun            compatible = "sdw10217201000";
79*4882a593Smuzhiyun            reg = <0 2>;
80*4882a593Smuzhiyun            powerdown-gpios = <&wcdpinctrl 2 0>;
81*4882a593Smuzhiyun            #thermal-sensor-cells = <0>;
82*4882a593Smuzhiyun            #sound-dai-cells = <0>;
83*4882a593Smuzhiyun        };
84*4882a593Smuzhiyun    };
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun...
87