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