xref: /freebsd/sys/contrib/device-tree/Bindings/remoteproc/qcom,rpm-proc.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*aa1a8ff2SEmmanuel Vadot%YAML 1.2
3*aa1a8ff2SEmmanuel Vadot---
4*aa1a8ff2SEmmanuel Vadot$id: http://devicetree.org/schemas/remoteproc/qcom,rpm-proc.yaml#
5*aa1a8ff2SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*aa1a8ff2SEmmanuel Vadot
7*aa1a8ff2SEmmanuel Vadottitle: Qualcomm Resource Power Manager (RPM) Processor/Subsystem
8*aa1a8ff2SEmmanuel Vadot
9*aa1a8ff2SEmmanuel Vadotmaintainers:
10*aa1a8ff2SEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
11*aa1a8ff2SEmmanuel Vadot  - Konrad Dybcio <konrad.dybcio@linaro.org>
12*aa1a8ff2SEmmanuel Vadot  - Stephan Gerhold <stephan@gerhold.net>
13*aa1a8ff2SEmmanuel Vadot
14*aa1a8ff2SEmmanuel Vadotdescription: |
15*aa1a8ff2SEmmanuel Vadot  Resource Power Manager (RPM) subsystem found in various Qualcomm platforms:
16*aa1a8ff2SEmmanuel Vadot
17*aa1a8ff2SEmmanuel Vadot                  +--------------------------------------------+
18*aa1a8ff2SEmmanuel Vadot                  |       RPM subsystem (qcom,rpm-proc)        |
19*aa1a8ff2SEmmanuel Vadot                  |                                            |
20*aa1a8ff2SEmmanuel Vadot            reset | +---------------+     +-----+  +-----+     |
21*aa1a8ff2SEmmanuel Vadot          --------->|               |     | MPM |  | CPR | ... |
22*aa1a8ff2SEmmanuel Vadot   IPC interrupts | | ARM Cortex-M3 |---  +-----+  +-----+     |
23*aa1a8ff2SEmmanuel Vadot  ----------------->|               |  |     |        |        |
24*aa1a8ff2SEmmanuel Vadot                  | +---------------+  |---------------------- |
25*aa1a8ff2SEmmanuel Vadot                  | +---------------+  |                       |
26*aa1a8ff2SEmmanuel Vadot                  | |   Code RAM    |--|  +------------------+ |
27*aa1a8ff2SEmmanuel Vadot                  | +---------------+  |  |                  | |
28*aa1a8ff2SEmmanuel Vadot                  | +---------------+  |--|   Message RAM    | |
29*aa1a8ff2SEmmanuel Vadot                  | |   Data RAM    |--|  |                  | |
30*aa1a8ff2SEmmanuel Vadot                  | +---------------+  |  +------------------+ |
31*aa1a8ff2SEmmanuel Vadot                  +--------------------|-----------------------+
32*aa1a8ff2SEmmanuel Vadot                                       v
33*aa1a8ff2SEmmanuel Vadot                                      NoC
34*aa1a8ff2SEmmanuel Vadot
35*aa1a8ff2SEmmanuel Vadot  The firmware running on the processor inside the RPM subsystem allows each
36*aa1a8ff2SEmmanuel Vadot  component in the system to vote for state of the system resources, such as
37*aa1a8ff2SEmmanuel Vadot  clocks, regulators and bus frequencies. It implements multiple separate
38*aa1a8ff2SEmmanuel Vadot  communication interfaces that are described in subnodes, e.g. SMD and MPM:
39*aa1a8ff2SEmmanuel Vadot
40*aa1a8ff2SEmmanuel Vadot             +------------------------------+
41*aa1a8ff2SEmmanuel Vadot             |        ARM Cortex-M3         |
42*aa1a8ff2SEmmanuel Vadot             |                              |   +------------------------------+
43*aa1a8ff2SEmmanuel Vadot             | +--------------------------+ |   |          Message RAM         |
44*aa1a8ff2SEmmanuel Vadot             | |  RPM firmware            | |   |                              |
45*aa1a8ff2SEmmanuel Vadot   IPC IRQ 0 | | +----------------------+ | |   | +--------------------------+ |
46*aa1a8ff2SEmmanuel Vadot  -------------->| SMD server           |<------->| SMD data structures      | |
47*aa1a8ff2SEmmanuel Vadot             | | | +--------------+     | | |   | | +--------------+         | |
48*aa1a8ff2SEmmanuel Vadot             | | | | rpm_requests | ... | | |   | | | rpm_requests |   ...   | |
49*aa1a8ff2SEmmanuel Vadot             | | | +--------------+     | | |   | | +--------------+         | |
50*aa1a8ff2SEmmanuel Vadot   IPC IRQ 1 | | +----------------------+ | |   | +--------------------------+ |
51*aa1a8ff2SEmmanuel Vadot  -------------->| MPM virtualization   |<--------| MPM register copy (vMPM) | |
52*aa1a8ff2SEmmanuel Vadot             | | +----------------------+ | |   | +--------------------------+ |
53*aa1a8ff2SEmmanuel Vadot             | |           ...      |     | |   |              ...             |
54*aa1a8ff2SEmmanuel Vadot             | +--------------------|-----+ |   +------------------------------+
55*aa1a8ff2SEmmanuel Vadot             +----------------------|-------+
56*aa1a8ff2SEmmanuel Vadot                                    v
57*aa1a8ff2SEmmanuel Vadot                             +--------------+
58*aa1a8ff2SEmmanuel Vadot                             | MPM Hardware |
59*aa1a8ff2SEmmanuel Vadot                             +--------------+
60*aa1a8ff2SEmmanuel Vadot
61*aa1a8ff2SEmmanuel Vadot  The services provided by the firmware are only available after the firmware
62*aa1a8ff2SEmmanuel Vadot  has been loaded and the processor has been released from reset. Usually this
63*aa1a8ff2SEmmanuel Vadot  happens early in the boot process before the operating system is started.
64*aa1a8ff2SEmmanuel Vadot
65*aa1a8ff2SEmmanuel Vadotproperties:
66*aa1a8ff2SEmmanuel Vadot  compatible:
67*aa1a8ff2SEmmanuel Vadot    items:
68*aa1a8ff2SEmmanuel Vadot      - enum:
69*aa1a8ff2SEmmanuel Vadot          - qcom,apq8084-rpm-proc
70*aa1a8ff2SEmmanuel Vadot          - qcom,ipq6018-rpm-proc
71*aa1a8ff2SEmmanuel Vadot          - qcom,ipq9574-rpm-proc
72*aa1a8ff2SEmmanuel Vadot          - qcom,mdm9607-rpm-proc
73*aa1a8ff2SEmmanuel Vadot          - qcom,msm8226-rpm-proc
74*aa1a8ff2SEmmanuel Vadot          - qcom,msm8610-rpm-proc
75*aa1a8ff2SEmmanuel Vadot          - qcom,msm8909-rpm-proc
76*aa1a8ff2SEmmanuel Vadot          - qcom,msm8916-rpm-proc
77*aa1a8ff2SEmmanuel Vadot          - qcom,msm8917-rpm-proc
78*aa1a8ff2SEmmanuel Vadot          - qcom,msm8936-rpm-proc
79*aa1a8ff2SEmmanuel Vadot          - qcom,msm8937-rpm-proc
80*aa1a8ff2SEmmanuel Vadot          - qcom,msm8952-rpm-proc
81*aa1a8ff2SEmmanuel Vadot          - qcom,msm8953-rpm-proc
82*aa1a8ff2SEmmanuel Vadot          - qcom,msm8974-rpm-proc
83*aa1a8ff2SEmmanuel Vadot          - qcom,msm8976-rpm-proc
84*aa1a8ff2SEmmanuel Vadot          - qcom,msm8994-rpm-proc
85*aa1a8ff2SEmmanuel Vadot          - qcom,msm8996-rpm-proc
86*aa1a8ff2SEmmanuel Vadot          - qcom,msm8998-rpm-proc
87*aa1a8ff2SEmmanuel Vadot          - qcom,qcm2290-rpm-proc
88*aa1a8ff2SEmmanuel Vadot          - qcom,qcs404-rpm-proc
89*aa1a8ff2SEmmanuel Vadot          - qcom,sdm660-rpm-proc
90*aa1a8ff2SEmmanuel Vadot          - qcom,sm6115-rpm-proc
91*aa1a8ff2SEmmanuel Vadot          - qcom,sm6125-rpm-proc
92*aa1a8ff2SEmmanuel Vadot          - qcom,sm6375-rpm-proc
93*aa1a8ff2SEmmanuel Vadot      - const: qcom,rpm-proc
94*aa1a8ff2SEmmanuel Vadot
95*aa1a8ff2SEmmanuel Vadot  smd-edge:
96*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
97*aa1a8ff2SEmmanuel Vadot    description:
98*aa1a8ff2SEmmanuel Vadot      Qualcomm Shared Memory subnode which represents communication edge,
99*aa1a8ff2SEmmanuel Vadot      channels and devices related to the RPM subsystem.
100*aa1a8ff2SEmmanuel Vadot
101*aa1a8ff2SEmmanuel Vadot  glink-edge:
102*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/remoteproc/qcom,glink-rpm-edge.yaml#
103*aa1a8ff2SEmmanuel Vadot    description:
104*aa1a8ff2SEmmanuel Vadot      Qualcomm G-Link subnode which represents communication edge,
105*aa1a8ff2SEmmanuel Vadot      channels and devices related to the RPM subsystem.
106*aa1a8ff2SEmmanuel Vadot
107*aa1a8ff2SEmmanuel Vadot  interrupt-controller:
108*aa1a8ff2SEmmanuel Vadot    type: object
109*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/interrupt-controller/qcom,mpm.yaml#
110*aa1a8ff2SEmmanuel Vadot    description:
111*aa1a8ff2SEmmanuel Vadot      MSM Power Manager (MPM) interrupt controller that monitors interrupts
112*aa1a8ff2SEmmanuel Vadot      when the system is asleep.
113*aa1a8ff2SEmmanuel Vadot
114*aa1a8ff2SEmmanuel Vadot  master-stats:
115*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/soc/qcom/qcom,rpm-master-stats.yaml#
116*aa1a8ff2SEmmanuel Vadot    description:
117*aa1a8ff2SEmmanuel Vadot      Subsystem-level low-power mode statistics provided by RPM.
118*aa1a8ff2SEmmanuel Vadot
119*aa1a8ff2SEmmanuel Vadotrequired:
120*aa1a8ff2SEmmanuel Vadot  - compatible
121*aa1a8ff2SEmmanuel Vadot
122*aa1a8ff2SEmmanuel VadotoneOf:
123*aa1a8ff2SEmmanuel Vadot  - required:
124*aa1a8ff2SEmmanuel Vadot      - smd-edge
125*aa1a8ff2SEmmanuel Vadot  - required:
126*aa1a8ff2SEmmanuel Vadot      - glink-edge
127*aa1a8ff2SEmmanuel Vadot
128*aa1a8ff2SEmmanuel VadotadditionalProperties: false
129*aa1a8ff2SEmmanuel Vadot
130*aa1a8ff2SEmmanuel Vadotexamples:
131*aa1a8ff2SEmmanuel Vadot  # SMD
132*aa1a8ff2SEmmanuel Vadot  - |
133*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
134*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
135*aa1a8ff2SEmmanuel Vadot
136*aa1a8ff2SEmmanuel Vadot    remoteproc {
137*aa1a8ff2SEmmanuel Vadot      compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc";
138*aa1a8ff2SEmmanuel Vadot
139*aa1a8ff2SEmmanuel Vadot      smd-edge {
140*aa1a8ff2SEmmanuel Vadot        interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
141*aa1a8ff2SEmmanuel Vadot        qcom,ipc = <&apcs 8 0>;
142*aa1a8ff2SEmmanuel Vadot        qcom,smd-edge = <15>;
143*aa1a8ff2SEmmanuel Vadot
144*aa1a8ff2SEmmanuel Vadot        rpm-requests {
145*aa1a8ff2SEmmanuel Vadot          compatible = "qcom,rpm-msm8916";
146*aa1a8ff2SEmmanuel Vadot          qcom,smd-channels = "rpm_requests";
147*aa1a8ff2SEmmanuel Vadot          /* ... */
148*aa1a8ff2SEmmanuel Vadot        };
149*aa1a8ff2SEmmanuel Vadot      };
150*aa1a8ff2SEmmanuel Vadot    };
151*aa1a8ff2SEmmanuel Vadot  # GLINK
152*aa1a8ff2SEmmanuel Vadot  - |
153*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
154*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
155*aa1a8ff2SEmmanuel Vadot
156*aa1a8ff2SEmmanuel Vadot    remoteproc {
157*aa1a8ff2SEmmanuel Vadot      compatible = "qcom,qcm2290-rpm-proc", "qcom,rpm-proc";
158*aa1a8ff2SEmmanuel Vadot
159*aa1a8ff2SEmmanuel Vadot      glink-edge {
160*aa1a8ff2SEmmanuel Vadot        compatible = "qcom,glink-rpm";
161*aa1a8ff2SEmmanuel Vadot        interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
162*aa1a8ff2SEmmanuel Vadot        qcom,rpm-msg-ram = <&rpm_msg_ram>;
163*aa1a8ff2SEmmanuel Vadot        mboxes = <&apcs_glb 0>;
164*aa1a8ff2SEmmanuel Vadot
165*aa1a8ff2SEmmanuel Vadot        rpm-requests {
166*aa1a8ff2SEmmanuel Vadot          compatible = "qcom,rpm-qcm2290";
167*aa1a8ff2SEmmanuel Vadot          qcom,glink-channels = "rpm_requests";
168*aa1a8ff2SEmmanuel Vadot          /* ... */
169*aa1a8ff2SEmmanuel Vadot        };
170*aa1a8ff2SEmmanuel Vadot      };
171*aa1a8ff2SEmmanuel Vadot    };
172