summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/remoteproc/qcom,rpm-proc.yaml
blob: 7afafde17a38bfcb41abfb960841b054abf9faa7 (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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/qcom,rpm-proc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Resource Power Manager (RPM) Processor/Subsystem

maintainers:
  - Bjorn Andersson <andersson@kernel.org>
  - Konrad Dybcio <konrad.dybcio@linaro.org>
  - Stephan Gerhold <stephan@gerhold.net>

description: |
  Resource Power Manager (RPM) subsystem found in various Qualcomm platforms:

                  +--------------------------------------------+
                  |       RPM subsystem (qcom,rpm-proc)        |
                  |                                            |
            reset | +---------------+     +-----+  +-----+     |
          --------->|               |     | MPM |  | CPR | ... |
   IPC interrupts | | ARM Cortex-M3 |---  +-----+  +-----+     |
  ----------------->|               |  |     |        |        |
                  | +---------------+  |---------------------- |
                  | +---------------+  |                       |
                  | |   Code RAM    |--|  +------------------+ |
                  | +---------------+  |  |                  | |
                  | +---------------+  |--|   Message RAM    | |
                  | |   Data RAM    |--|  |                  | |
                  | +---------------+  |  +------------------+ |
                  +--------------------|-----------------------+
                                       v
                                      NoC

  The firmware running on the processor inside the RPM subsystem allows each
  component in the system to vote for state of the system resources, such as
  clocks, regulators and bus frequencies. It implements multiple separate
  communication interfaces that are described in subnodes, e.g. SMD and MPM:

             +------------------------------+
             |        ARM Cortex-M3         |
             |                              |   +------------------------------+
             | +--------------------------+ |   |          Message RAM         |
             | |  RPM firmware            | |   |                              |
   IPC IRQ 0 | | +----------------------+ | |   | +--------------------------+ |
  -------------->| SMD server           |<------->| SMD data structures      | |
             | | | +--------------+     | | |   | | +--------------+         | |
             | | | | rpm_requests | ... | | |   | | | rpm_requests |   ...   | |
             | | | +--------------+     | | |   | | +--------------+         | |
   IPC IRQ 1 | | +----------------------+ | |   | +--------------------------+ |
  -------------->| MPM virtualization   |<--------| MPM register copy (vMPM) | |
             | | +----------------------+ | |   | +--------------------------+ |
             | |           ...      |     | |   |              ...             |
             | +--------------------|-----+ |   +------------------------------+
             +----------------------|-------+
                                    v
                             +--------------+
                             | MPM Hardware |
                             +--------------+

  The services provided by the firmware are only available after the firmware
  has been loaded and the processor has been released from reset. Usually this
  happens early in the boot process before the operating system is started.

properties:
  compatible:
    items:
      - enum:
          - qcom,apq8084-rpm-proc
          - qcom,ipq6018-rpm-proc
          - qcom,ipq9574-rpm-proc
          - qcom,mdm9607-rpm-proc
          - qcom,msm8226-rpm-proc
          - qcom,msm8610-rpm-proc
          - qcom,msm8909-rpm-proc
          - qcom,msm8916-rpm-proc
          - qcom,msm8917-rpm-proc
          - qcom,msm8936-rpm-proc
          - qcom,msm8937-rpm-proc
          - qcom,msm8952-rpm-proc
          - qcom,msm8953-rpm-proc
          - qcom,msm8974-rpm-proc
          - qcom,msm8976-rpm-proc
          - qcom,msm8994-rpm-proc
          - qcom,msm8996-rpm-proc
          - qcom,msm8998-rpm-proc
          - qcom,qcm2290-rpm-proc
          - qcom,qcs404-rpm-proc
          - qcom,sdm660-rpm-proc
          - qcom,sm6115-rpm-proc
          - qcom,sm6125-rpm-proc
          - qcom,sm6375-rpm-proc
      - const: qcom,rpm-proc

  smd-edge:
    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
    description:
      Qualcomm Shared Memory subnode which represents communication edge,
      channels and devices related to the RPM subsystem.

  glink-edge:
    $ref: /schemas/remoteproc/qcom,glink-rpm-edge.yaml#
    description:
      Qualcomm G-Link subnode which represents communication edge,
      channels and devices related to the RPM subsystem.

  interrupt-controller:
    type: object
    $ref: /schemas/interrupt-controller/qcom,mpm.yaml#
    description:
      MSM Power Manager (MPM) interrupt controller that monitors interrupts
      when the system is asleep.

  master-stats:
    $ref: /schemas/soc/qcom/qcom,rpm-master-stats.yaml#
    description:
      Subsystem-level low-power mode statistics provided by RPM.

required:
  - compatible

oneOf:
  - required:
      - smd-edge
  - required:
      - glink-edge

additionalProperties: false

examples:
  # SMD
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    remoteproc {
      compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc";

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

        rpm-requests {
          compatible = "qcom,rpm-msm8916";
          qcom,smd-channels = "rpm_requests";
          /* ... */
        };
      };
    };
  # GLINK
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    remoteproc {
      compatible = "qcom,qcm2290-rpm-proc", "qcom,rpm-proc";

      glink-edge {
        compatible = "qcom,glink-rpm";
        interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
        qcom,rpm-msg-ram = <&rpm_msg_ram>;
        mboxes = <&apcs_glb 0>;

        rpm-requests {
          compatible = "qcom,rpm-qcm2290";
          qcom,glink-channels = "rpm_requests";
          /* ... */
        };
      };
    };