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