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