4 Resource Power Manager Hardened (RPMH) is the mechanism for communicating with
5 the hardened resource accelerators on Qualcomm SoCs. Requests to the resources
6 can be written to the Trigger Command Set (TCS) registers and using a (addr,
7 val) pair and triggered. Messages in the TCS are then sent in sequence over an
10 The hardware block (Direct Resource Voter or DRV) is a part of the h/w entity
11 (Resource State Coordinator a.k.a RSC) that can handle multiple sleep and
12 active/wake resource requests. Multiple such DRVs can exist in a SoC and can
13 be written to from Linux. The structure of each DRV follows the same template
14 with a few variations that are captured by the properties here.
16 A TCS may be triggered from Linux or triggered by the F/W after all the CPUs
17 have powered off to facilitate idle power saving. TCS could be classified as -
19 ACTIVE /* Triggered by Linux */
20 SLEEP /* Triggered by F/W */
21 WAKE /* Triggered by F/W */
22 CONTROL /* Triggered by F/W */
24 The order in which they are described in the DT, should match the hardware
27 Requests can be made for the state of a resource, when the subsystem is active
28 or idle. When all subsystems like Modem, GPU, CPU are idle, the resource state
29 will be an aggregate of the sleep votes from each of those subsystems. Clients
30 may request a sleep value for their shared resources in addition to the active
38 Definition: Should be "qcom,rpmh-rsc".
42 Value type: <prop-encoded-array>
43 Definition: The first register specifies the base address of the
44 DRV(s). The number of DRVs in the dependent on the RSC.
45 The tcs-offset specifies the start address of the
51 Definition: Maps the register specified in the reg property. Must be
52 "drv-0", "drv-1", "drv-2" etc and "tcs-offset". The
56 Value type: <prop-encoded-interrupt>
57 Definition: The interrupt that trips when a message complete/response
58 is received for this DRV from the accelerators.
63 Definition: The id of the DRV in the RSC block that will be used by
68 Value type: <prop-encoded-array>
69 Definition: The tuple defining the configuration of TCS.
70 Must have 2 cells which describe each TCS type.
72 The order of the TCS must match the hardware
74 - Cell #1 (TCS Type): TCS types to be specified -
79 - Cell #2 (Number of TCS): <u32>
84 Definition: Name for the RSC. The name would be used in trace logs.
86 Drivers that want to use the RSC to communicate with RPMH must specify their
87 bindings as child nodes of the RSC controllers they wish to communicate with.
91 For a TCS whose RSC base address is is 0x179C0000 and is at a DRV id of 2, the
92 register offsets for DRV2 start at 0D00, the register calculations are like
95 DRV2: 0x179C0000 + 0x10000 = 0x179D0000
96 DRV2: 0x179C0000 + 0x10000 * 2 = 0x179E0000
99 apps_rsc: rsc@179c0000 {
101 compatible = "qcom,rpmh-rsc";
102 reg = <0x179c0000 0x10000>,
103 <0x179d0000 0x10000>,
104 <0x179e0000 0x10000>;
105 reg-names = "drv-0", "drv-1", "drv-2";
106 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
107 <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
108 <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
109 qcom,tcs-offset = <0xd00>;
111 qcom,tcs-config = <ACTIVE_TCS 2>,
119 For a TCS whose RSC base address is 0xAF20000 and is at DRV id of 0, the
120 register offsets for DRV0 start at 01C00, the register calculations are like
125 disp_rsc: rsc@af20000 {
127 compatible = "qcom,rpmh-rsc";
128 reg = <0xaf20000 0x10000>;
130 interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
131 qcom,tcs-offset = <0x1c00>;
133 qcom,tcs-config = <ACTIVE_TCS 0>,