Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/3] Add subsystem sleep stats support for Shikra
@ 2026-07-03 11:13 Sneh Mankad
  2026-07-03 11:13 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible " Sneh Mankad
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Sneh Mankad @ 2026-07-03 11:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel, Sneh Mankad

SoC sleep stats are present in RPM message RAM and subsystem sleep
stats are present in SMEM for Shikra.

For earlier targets using RPM processor like msm8974, rpm_master_stat.c
was used for subsystem sleep stats since those stats were populated in
RPM MSGRAM.

Here is a brief summary of previous targets and their stats
configuration, along with the drivers used to display them.

+---------------|----------------------------|---------------------------+
| SoC           | subsystem sleep stats      | SoC sleep stats           |
|---------------|----------------------------|---------------------------|
| msm8974,      | RPM processor MSGRAM       | RPM processor MSGRAM      |
| msm8226       | (rpm_master_stat.c)        | (qcom_stats.c)            |
|---------------|----------------------------|---------------------------|
| sm6350,       | SMEM (DDR)                 | AOP processor MSGRAM      |
| sdm845, etc.  | (qcom_stats.c)             | (qcom_stats.c)            |
|---------------|----------------------------|---------------------------|
| Shikra        | SMEM (DDR)                 | RPM processor MSGRAM      |
|               | (qcom_stats.c)             | (qcom_stats.c)            |
+---------------|----------------------------|---------------------------+

qcom_stats.c supports both the configurations for shikra, reading
subsystem sleep stats from SMEM and reading SoC sleep stats from RPM
MSGRAM.

A generic "qcom,rpm-stats" compatible only reads SoC sleep stats like vmin
and vlow. Add shikra rpm compatible and config to read subsystem sleep
stats too along with SoC sleep stats.

Below is an example showing sleep stats for "apss" subsystem with this
change:

cat /sys/kernel/debug/qcom_stats/apss
Count: 2192
Last Entered At: 5498618336
Last Exited At: 5498708046
Accumulated Duration: 2046572620.

Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
---
Sneh Mankad (3):
      dt-bindings: soc: qcom: stats: Add compatible for Shikra
      soc: qcom: stats: Add stats compatible and config for Shikra
      arm64: dts: qcom: shikra: Add LPM stats support for subsystems

 Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml | 1 +
 arch/arm64/boot/dts/qcom/shikra.dtsi                       | 2 +-
 drivers/soc/qcom/qcom_stats.c                              | 9 +++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)
---
base-commit: 4c9d9db1697a873f78d236b4ce304272206238ac
change-id: 20260624-shikra_stats-3f01f136fb4c

Best regards,
-- 
Sneh Mankad <sneh.mankad@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible for Shikra
  2026-07-03 11:13 [PATCH 0/3] Add subsystem sleep stats support for Shikra Sneh Mankad
@ 2026-07-03 11:13 ` Sneh Mankad
  2026-07-06  9:00   ` Maulik Shah (mkshah)
  2026-07-06  9:45   ` Konrad Dybcio
  2026-07-03 11:13 ` [PATCH 2/3] soc: qcom: stats: Add stats compatible and config " Sneh Mankad
  2026-07-03 11:13 ` [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems Sneh Mankad
  2 siblings, 2 replies; 10+ messages in thread
From: Sneh Mankad @ 2026-07-03 11:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel, Sneh Mankad

Document the compatible for Shikra.

Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
index 686a7ef2f48af11a0e63904ff979e40d7538de65..43751115c5b4e2943c93d37d3e27c839b4057529 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
@@ -27,6 +27,7 @@ properties:
       - qcom,msm8226-rpm-stats
       - qcom,msm8916-rpm-stats
       - qcom,msm8974-rpm-stats
+      - qcom,shikra-rpm-stats
 
   reg:
     maxItems: 1

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] soc: qcom: stats: Add stats compatible and config for Shikra
  2026-07-03 11:13 [PATCH 0/3] Add subsystem sleep stats support for Shikra Sneh Mankad
  2026-07-03 11:13 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible " Sneh Mankad
@ 2026-07-03 11:13 ` Sneh Mankad
  2026-07-06  9:12   ` Maulik Shah (mkshah)
  2026-07-06  9:48   ` Konrad Dybcio
  2026-07-03 11:13 ` [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems Sneh Mankad
  2 siblings, 2 replies; 10+ messages in thread
From: Sneh Mankad @ 2026-07-03 11:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel, Sneh Mankad

SoC sleep stats are present in RPM message RAM and subsystem sleep
stats are present in SMEM for Shikra.

For earlier targets using RPM processor like msm8974, rpm_master_stat.c
was used for subsystem sleep stats since those stats were populated in
RPM MSGRAM.

Here is a brief summary of previous targets and their stats
configuration, along with the drivers used to display them.

+---------------|----------------------------|---------------------------+
| SoC           | subsystem sleep stats      | SoC sleep stats           |
|---------------|----------------------------|---------------------------|
| msm8974,      | RPM processor MSGRAM       | RPM processor MSGRAM      |
| msm8226       | (rpm_master_stat.c)        | (qcom_stats.c)            |
|---------------|----------------------------|---------------------------|
| sm6350,       | SMEM (DDR)                 | AOP processor MSGRAM      |
| sdm845, etc.  | (qcom_stats.c)             | (qcom_stats.c)            |
|---------------|----------------------------|---------------------------|
| Shikra        | SMEM (DDR)                 | RPM processor MSGRAM      |
|               | (qcom_stats.c)             | (qcom_stats.c)            |
+---------------|----------------------------|---------------------------+

qcom_stats.c supports both the configurations for shikra, reading
subsystem sleep stats from SMEM and reading SoC sleep stats from RPM
MSGRAM.

A generic "qcom,rpm-stats" compatible only reads SoC sleep stats like vmin
and vlow. Add shikra rpm compatible and config to read subsystem sleep
stats too along with SoC sleep stats.

Below is an example showing sleep stats for "apss" subsystem with this
change:

cat /sys/kernel/debug/qcom_stats/apss
Count: 2192
Last Entered At: 5498618336
Last Exited At: 5498708046
Accumulated Duration: 2046572620.

Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
---
 drivers/soc/qcom/qcom_stats.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/soc/qcom/qcom_stats.c b/drivers/soc/qcom/qcom_stats.c
index 2e380faf9080354fae120e74f0b9bd1f3786d3e5..2f1615e583bbc6ea596d8b73d9bb0a2a00953cfb 100644
--- a/drivers/soc/qcom/qcom_stats.c
+++ b/drivers/soc/qcom/qcom_stats.c
@@ -376,6 +376,14 @@ static const struct stats_config rpm_data_dba0 = {
 	.subsystem_stats_in_smem = false,
 };
 
+static const struct stats_config rpm_data_shikra = {
+	.stats_offset = 0,
+	.num_records = 2,
+	.appended_stats_avail = true,
+	.dynamic_offset = true,
+	.subsystem_stats_in_smem = true,
+};
+
 static const struct stats_config rpmh_data_sdm845 = {
 	.stats_offset = 0x48,
 	.num_records = 2,
@@ -401,6 +409,7 @@ static const struct of_device_id qcom_stats_table[] = {
 	{ .compatible = "qcom,rpm-stats", .data = &rpm_data },
 	{ .compatible = "qcom,rpmh-stats", .data = &rpmh_data },
 	{ .compatible = "qcom,sdm845-rpmh-stats", .data = &rpmh_data_sdm845 },
+	{ .compatible = "qcom,shikra-rpm-stats", .data = &rpm_data_shikra },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_stats_table);

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems
  2026-07-03 11:13 [PATCH 0/3] Add subsystem sleep stats support for Shikra Sneh Mankad
  2026-07-03 11:13 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible " Sneh Mankad
  2026-07-03 11:13 ` [PATCH 2/3] soc: qcom: stats: Add stats compatible and config " Sneh Mankad
@ 2026-07-03 11:13 ` Sneh Mankad
  2026-07-06  9:23   ` Maulik Shah (mkshah)
  2026-07-06  9:49   ` Konrad Dybcio
  2 siblings, 2 replies; 10+ messages in thread
From: Sneh Mankad @ 2026-07-03 11:13 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel, Sneh Mankad

Add support to display subsystem level LPM stats for shikra.

Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/shikra.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
index 4e5bc9e17c8ed8914733ac9fdc9b69128b40216e..53f40283a3b70bccdc510716b39251d377be7d24 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -535,7 +535,7 @@ apss_mpm: sram@1b8 {
 		};
 
 		sram@4690000 {
-			compatible = "qcom,rpm-stats";
+			compatible = "qcom,shikra-rpm-stats";
 			reg = <0x0 0x04690000 0x0 0x14000>;
 		};
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible for Shikra
  2026-07-03 11:13 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible " Sneh Mankad
@ 2026-07-06  9:00   ` Maulik Shah (mkshah)
  2026-07-06  9:45   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Maulik Shah (mkshah) @ 2026-07-06  9:00 UTC (permalink / raw)
  To: Sneh Mankad, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel



On 7/3/2026 4:43 PM, Sneh Mankad wrote:
> Document the compatible for Shikra.

Reviewed-by: Maulik Shah <maulik.shah@oss.qualcomm.com>

Thanks,
Maulik

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] soc: qcom: stats: Add stats compatible and config for Shikra
  2026-07-03 11:13 ` [PATCH 2/3] soc: qcom: stats: Add stats compatible and config " Sneh Mankad
@ 2026-07-06  9:12   ` Maulik Shah (mkshah)
  2026-07-06  9:48   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Maulik Shah (mkshah) @ 2026-07-06  9:12 UTC (permalink / raw)
  To: Sneh Mankad, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel



On 7/3/2026 4:43 PM, Sneh Mankad wrote:
> SoC sleep stats are present in RPM message RAM and subsystem sleep
> stats are present in SMEM for Shikra.

minor nit: use RPM MSGRAM term in above line as well.

> 
> For earlier targets using RPM processor like msm8974, rpm_master_stat.c
> was used for subsystem sleep stats since those stats were populated in
> RPM MSGRAM.
> 

[...]

> +---------------|----------------------------|---------------------------+
> | SoC           | subsystem sleep stats      | SoC sleep stats           |
> |---------------|----------------------------|---------------------------|
> | msm8974,      | RPM processor MSGRAM       | RPM processor MSGRAM      |
> | msm8226       | (rpm_master_stat.c)        | (qcom_stats.c)            |
> |---------------|----------------------------|---------------------------|
> | sm6350,       | SMEM (DDR)                 | AOP processor MSGRAM      |
> | sdm845, etc.  | (qcom_stats.c)             | (qcom_stats.c)            |
> |---------------|----------------------------|---------------------------|
> | Shikra        | SMEM (DDR)                 | RPM processor MSGRAM      |
> |               | (qcom_stats.c)             | (qcom_stats.c)            |
> +---------------|----------------------------|---------------------------+
> 

[...]

> 
> Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>

other than minor nit:, looks good,

Reviewed-by: Maulik Shah <maulik.shah@oss.qualcomm.com>

Thanks,
Maulik

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems
  2026-07-03 11:13 ` [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems Sneh Mankad
@ 2026-07-06  9:23   ` Maulik Shah (mkshah)
  2026-07-06  9:49   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Maulik Shah (mkshah) @ 2026-07-06  9:23 UTC (permalink / raw)
  To: Sneh Mankad, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel



On 7/3/2026 4:43 PM, Sneh Mankad wrote:
> Add support to display subsystem level LPM stats for shikra.

Instead of,
arm64: dts: qcom: shikra: Add LPM stats support for subsystems

Below better explains,

arm64: dts: qcom: shikra: Update rpm-stats compatible to SoC specific

Generic qcom,rpm-stats only reads SoC level low power modes like vmin and vlow.

Shikra SoC specific compatible allows reading individual subsystem level low power mode stats
along with SoC level low power modes. Change it.

> 
> Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/shikra.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
> index 4e5bc9e17c8ed8914733ac9fdc9b69128b40216e..53f40283a3b70bccdc510716b39251d377be7d24 100644
> --- a/arch/arm64/boot/dts/qcom/shikra.dtsi
> +++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
> @@ -535,7 +535,7 @@ apss_mpm: sram@1b8 {
>  		};
>  
>  		sram@4690000 {
> -			compatible = "qcom,rpm-stats";
> +			compatible = "qcom,shikra-rpm-stats";
>  			reg = <0x0 0x04690000 0x0 0x14000>;
>  		};
>  
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible for Shikra
  2026-07-03 11:13 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible " Sneh Mankad
  2026-07-06  9:00   ` Maulik Shah (mkshah)
@ 2026-07-06  9:45   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2026-07-06  9:45 UTC (permalink / raw)
  To: Sneh Mankad, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/3/26 1:13 PM, Sneh Mankad wrote:
> Document the compatible for Shikra.

Please include some of the information you mentioned in the cover
letter, since this isn't just yet another boilerplate compatible

Konrad

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] soc: qcom: stats: Add stats compatible and config for Shikra
  2026-07-03 11:13 ` [PATCH 2/3] soc: qcom: stats: Add stats compatible and config " Sneh Mankad
  2026-07-06  9:12   ` Maulik Shah (mkshah)
@ 2026-07-06  9:48   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2026-07-06  9:48 UTC (permalink / raw)
  To: Sneh Mankad, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/3/26 1:13 PM, Sneh Mankad wrote:
> SoC sleep stats are present in RPM message RAM and subsystem sleep
> stats are present in SMEM for Shikra.
> 
> For earlier targets using RPM processor like msm8974, rpm_master_stat.c
> was used for subsystem sleep stats since those stats were populated in
> RPM MSGRAM.
> 
> Here is a brief summary of previous targets and their stats
> configuration, along with the drivers used to display them.
> 
> +---------------|----------------------------|---------------------------+
> | SoC           | subsystem sleep stats      | SoC sleep stats           |
> |---------------|----------------------------|---------------------------|
> | msm8974,      | RPM processor MSGRAM       | RPM processor MSGRAM      |
> | msm8226       | (rpm_master_stat.c)        | (qcom_stats.c)            |
> |---------------|----------------------------|---------------------------|
> | sm6350,       | SMEM (DDR)                 | AOP processor MSGRAM      |
> | sdm845, etc.  | (qcom_stats.c)             | (qcom_stats.c)            |
> |---------------|----------------------------|---------------------------|
> | Shikra        | SMEM (DDR)                 | RPM processor MSGRAM      |
> |               | (qcom_stats.c)             | (qcom_stats.c)            |
> +---------------|----------------------------|---------------------------+
> 
> qcom_stats.c supports both the configurations for shikra, reading
> subsystem sleep stats from SMEM and reading SoC sleep stats from RPM
> MSGRAM.
> 
> A generic "qcom,rpm-stats" compatible only reads SoC sleep stats like vmin
> and vlow. Add shikra rpm compatible and config to read subsystem sleep
> stats too along with SoC sleep stats.
> 
> Below is an example showing sleep stats for "apss" subsystem with this
> change:
> 
> cat /sys/kernel/debug/qcom_stats/apss
> Count: 2192
> Last Entered At: 5498618336
> Last Exited At: 5498708046
> Accumulated Duration: 2046572620.
> 
> Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
 
Konrad

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems
  2026-07-03 11:13 ` [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems Sneh Mankad
  2026-07-06  9:23   ` Maulik Shah (mkshah)
@ 2026-07-06  9:49   ` Konrad Dybcio
  1 sibling, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2026-07-06  9:49 UTC (permalink / raw)
  To: Sneh Mankad, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Maulik Shah
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/3/26 1:13 PM, Sneh Mankad wrote:
> Add support to display subsystem level LPM stats for shikra.

Explain the problem and why you're changing the compatible.

https://docs.kernel.org/process/submitting-patches.html#describe-your-changes

Konrad

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-06  9:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 11:13 [PATCH 0/3] Add subsystem sleep stats support for Shikra Sneh Mankad
2026-07-03 11:13 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible " Sneh Mankad
2026-07-06  9:00   ` Maulik Shah (mkshah)
2026-07-06  9:45   ` Konrad Dybcio
2026-07-03 11:13 ` [PATCH 2/3] soc: qcom: stats: Add stats compatible and config " Sneh Mankad
2026-07-06  9:12   ` Maulik Shah (mkshah)
2026-07-06  9:48   ` Konrad Dybcio
2026-07-03 11:13 ` [PATCH 3/3] arm64: dts: qcom: shikra: Add LPM stats support for subsystems Sneh Mankad
2026-07-06  9:23   ` Maulik Shah (mkshah)
2026-07-06  9:49   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox