summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/soc/qcom/qcom,smd.yaml
blob: bca07bb13ebf7ba9b1d561ced0d367d1f4b951c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/qcom/qcom,smd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Shared Memory Driver

maintainers:
  - Andy Gross <agross@kernel.org>
  - Bjorn Andersson <bjorn.andersson@linaro.org>
  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

description:
  The Qualcomm Shared Memory Driver is a FIFO based communication channel for
  sending data between the various subsystems in Qualcomm platforms.

properties:
  compatible:
    const: qcom,smd

patternProperties:
  "^.*-edge|rpm$":
    type: object
    description:
      Each subnode of the SMD node represents a remote subsystem or a remote
      processor of some sort - or in SMD language an "edge". The name of the
      edges are not important.

    properties:
      interrupts:
        maxItems: 1

      label:
        $ref: /schemas/types.yaml#/definitions/string
        description:
          Name of the edge, used for debugging and identification purposes. The
          node name will be used if this is not present.

      mboxes:
        maxItems: 1
        description:
          Reference to the mailbox representing the outgoing doorbell in APCS for
          this client.

      qcom,ipc:
        $ref: /schemas/types.yaml#/definitions/phandle-array
        items:
          - items:
              - description: phandle to a syscon node representing the APCS registers
              - description: u32 representing offset to the register within the syscon
              - description: u32 representing the ipc bit within the register
        description:
          Three entries specifying the outgoing ipc bit used for signaling the
          remote processor.

      qcom,smd-edge:
        $ref: /schemas/types.yaml#/definitions/uint32
        description:
          The identifier of the remote processor in the smd channel allocation
          table.

      qcom,remote-pid:
        $ref: /schemas/types.yaml#/definitions/uint32
        description:
          The identifier for the remote processor as known by the rest of the
          system.

      rpm-requests:
        type: object
        description:
          In turn, subnodes of the "edges" represent devices tied to SMD
          channels on that "edge". The names of the devices are not
          important. The properties of these nodes are defined by the
          individual bindings for the SMD devices.

        properties:
          qcom,smd-channels:
            $ref: /schemas/types.yaml#/definitions/string-array
            minItems: 1
            maxItems: 32
            description:
              A list of channels tied to this device, used for matching the
              device to channels.

        required:
          - compatible
          - qcom,smd-channels

        additionalProperties: true

    required:
      - interrupts
      - qcom,smd-edge

    oneOf:
      - required:
          - mboxes
      - required:
          - qcom,ipc

    additionalProperties: false

required:
  - compatible

additionalProperties: false

examples:
  # The following example represents a smd node, with one edge representing the
  # "rpm" subsystem. For the "rpm" subsystem we have a device tied to the
  # "rpm_request" channel.
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    shared-memory {
        compatible = "qcom,smd";

        rpm {
            interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
            qcom,ipc = <&apcs 8 0>;
            qcom,smd-edge = <15>;

            rpm-requests {
                compatible = "qcom,rpm-msm8974";
                qcom,smd-channels = "rpm_requests";

                clock-controller {
                    compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc";
                    #clock-cells = <1>;
                };

            };
        };
    };