diff mbox series

[v2,1/2] dt-bindings: soc: qcom: Add RPM Master stats

Message ID 20230405-topic-master_stats-v2-1-51c304ecb610@linaro.org
State Superseded
Headers show
Series Introduce RPM Master stats | expand

Commit Message

Konrad Dybcio April 6, 2023, 2:49 p.m. UTC
The RPM MSG RAM contains per-RPM-master (e.g. APPS, ADSP etc.) sleep
statistics. They let one assess which core is actively preventing the
system from entering a true low-power mode.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/soc/qcom/rpm-master-stats.yaml        | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Comments

Konrad Dybcio April 12, 2023, 2:32 p.m. UTC | #1
On 12.04.2023 16:22, Rob Herring wrote:
> On Thu, Apr 06, 2023 at 04:49:17PM +0200, Konrad Dybcio wrote:
>> The RPM MSG RAM contains per-RPM-master (e.g. APPS, ADSP etc.) sleep
>> statistics. They let one assess which core is actively preventing the
>> system from entering a true low-power mode.
> 
> Just curious, is that a debug thing or something the OS uses?
Debug, pretty much the only way of knowing how deep the sleep
was other than shoving a multimiter under the chip and checking
if the power rails went off.. :/

> 
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../bindings/soc/qcom/rpm-master-stats.yaml        | 53 ++++++++++++++++++++++
> 
> qcom,rpm-master-stats.yaml
Ack

Konrad
> 
>>  1 file changed, 53 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/qcom/rpm-master-stats.yaml b/Documentation/devicetree/bindings/soc/qcom/rpm-master-stats.yaml
>> new file mode 100644
>> index 000000000000..d2d6a2a39fef
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/soc/qcom/rpm-master-stats.yaml
>> @@ -0,0 +1,53 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/soc/qcom/rpm-master-stats.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm Technologies, Inc. (QTI) RPM Master Stats
>> +
>> +maintainers:
>> +  - Konrad Dybcio <konrad.dybcio@linaro.org>
>> +
>> +description:
>> +  Per-RPM-Master (e.g. APSS, ADSP, etc.) sleep statistics.
>> +
>> +properties:
>> +  compatible:
>> +    const: qcom,rpm-master-stats
>> +
>> +  qcom,rpm-msg-ram:
>> +    $ref: /schemas/types.yaml#/definitions/phandle-array
>> +    description: Phandle to an RPM MSG RAM slice containing the master stats
>> +    minItems: 1
>> +    maxItems: 5
>> +
>> +  qcom,master-names:
>> +    $ref: /schemas/types.yaml#/definitions/string-array
>> +    description: RPM Master name
>> +    minItems: 1
>> +    maxItems: 5
>> +
>> +required:
>> +  - compatible
>> +  - qcom,rpm-msg-ram
>> +  - qcom,master-names
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    stats {
>> +      compatible = "qcom,rpm-master-stats";
>> +      qcom,rpm-msg-ram = <&apss_master_stats>,
>> +                         <&mpss_master_stats>,
>> +                         <&adsp_master_stats>,
>> +                         <&cdsp_master_stats>,
>> +                         <&tz_master_stats>;
>> +      qcom,master-names = "APSS",
>> +                          "MPSS",
>> +                          "ADSP",
>> +                          "CDSP",
>> +                          "TZ";
>> +    };
>> +...
>>
>> -- 
>> 2.40.0
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/qcom/rpm-master-stats.yaml b/Documentation/devicetree/bindings/soc/qcom/rpm-master-stats.yaml
new file mode 100644
index 000000000000..d2d6a2a39fef
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/rpm-master-stats.yaml
@@ -0,0 +1,53 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/qcom/rpm-master-stats.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. (QTI) RPM Master Stats
+
+maintainers:
+  - Konrad Dybcio <konrad.dybcio@linaro.org>
+
+description:
+  Per-RPM-Master (e.g. APSS, ADSP, etc.) sleep statistics.
+
+properties:
+  compatible:
+    const: qcom,rpm-master-stats
+
+  qcom,rpm-msg-ram:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: Phandle to an RPM MSG RAM slice containing the master stats
+    minItems: 1
+    maxItems: 5
+
+  qcom,master-names:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    description: RPM Master name
+    minItems: 1
+    maxItems: 5
+
+required:
+  - compatible
+  - qcom,rpm-msg-ram
+  - qcom,master-names
+
+additionalProperties: false
+
+examples:
+  - |
+    stats {
+      compatible = "qcom,rpm-master-stats";
+      qcom,rpm-msg-ram = <&apss_master_stats>,
+                         <&mpss_master_stats>,
+                         <&adsp_master_stats>,
+                         <&cdsp_master_stats>,
+                         <&tz_master_stats>;
+      qcom,master-names = "APSS",
+                          "MPSS",
+                          "ADSP",
+                          "CDSP",
+                          "TZ";
+    };
+...