* [PATCH 2/4] soc: qcom: stats: Add SDM845 stats config and compatible
2022-08-10 10:57 [PATCH 1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp abel.vesa
@ 2022-08-10 10:57 ` abel.vesa
2022-08-10 10:57 ` [PATCH 3/4] arm64: dts: qcom: sdm845: Add the RPMh stats node abel.vesa
2022-08-10 10:57 ` [PATCH 4/4] dt-bindings: soc: qcom: stats: Document SDM845 compatible abel.vesa
2 siblings, 0 replies; 5+ messages in thread
From: abel.vesa @ 2022-08-10 10:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Maulik Shah
Cc: linux-arm-msm, devicetree, Linux Kernel Mailing List, Abel Vesa
From: Abel Vesa <abel.vesa@linaro.org>
SDM845 is a special case compared to the other platforms that use RPMh
stats, since it only has 2 stats (aosd and cxsd), while the others have
a 3rd one (ddr).
So lets add dedicated stats config and compatible for SDM845 to make the
driver aware of this num_records difference.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
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 d6bfd1bbdc2a..b1638a0e1cd6 100644
--- a/drivers/soc/qcom/qcom_stats.c
+++ b/drivers/soc/qcom/qcom_stats.c
@@ -246,6 +246,14 @@ static const struct stats_config rpm_data_dba0 = {
.subsystem_stats_in_smem = false,
};
+static const struct stats_config rpmh_data_sdm845 = {
+ .stats_offset = 0x48,
+ .num_records = 2,
+ .appended_stats_avail = false,
+ .dynamic_offset = false,
+ .subsystem_stats_in_smem = true,
+};
+
static const struct stats_config rpmh_data = {
.stats_offset = 0x48,
.num_records = 3,
@@ -261,6 +269,7 @@ static const struct of_device_id qcom_stats_table[] = {
{ .compatible = "qcom,msm8974-rpm-stats", .data = &rpm_data_dba0 },
{ .compatible = "qcom,rpm-stats", .data = &rpm_data },
{ .compatible = "qcom,rpmh-stats", .data = &rpmh_data },
+ { .compatible = "qcom,rpmh-stats-sdm845", .data = &rpmh_data_sdm845 },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_stats_table);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/4] arm64: dts: qcom: sdm845: Add the RPMh stats node
2022-08-10 10:57 [PATCH 1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp abel.vesa
2022-08-10 10:57 ` [PATCH 2/4] soc: qcom: stats: Add SDM845 stats config and compatible abel.vesa
@ 2022-08-10 10:57 ` abel.vesa
2022-08-10 10:57 ` [PATCH 4/4] dt-bindings: soc: qcom: stats: Document SDM845 compatible abel.vesa
2 siblings, 0 replies; 5+ messages in thread
From: abel.vesa @ 2022-08-10 10:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Maulik Shah
Cc: linux-arm-msm, devicetree, Linux Kernel Mailing List, Abel Vesa
From: Abel Vesa <abel.vesa@linaro.org>
SDM845 is a special case compared to the other platforms that use RPMh
stats, since it only has 2 stats (aosd and cxsd), while the others have
a 3rd one (ddr).
So lets add the node but with a SDM845 dedicated compatible to make
the driver aware of the different stats config.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 5bea96a9ce06..5bcdc17f9d3e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4851,6 +4851,11 @@ ebi_cdev: ebi {
};
};
+ sram@c3f0000 {
+ compatible = "qcom,rpmh-stats-sdm845";
+ reg = <0 0x0c3f0000 0 0x400>;
+ };
+
spmi_bus: spmi@c440000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0 0x0c440000 0 0x1100>,
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 4/4] dt-bindings: soc: qcom: stats: Document SDM845 compatible
2022-08-10 10:57 [PATCH 1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp abel.vesa
2022-08-10 10:57 ` [PATCH 2/4] soc: qcom: stats: Add SDM845 stats config and compatible abel.vesa
2022-08-10 10:57 ` [PATCH 3/4] arm64: dts: qcom: sdm845: Add the RPMh stats node abel.vesa
@ 2022-08-10 10:57 ` abel.vesa
2022-08-10 15:48 ` Krzysztof Kozlowski
2 siblings, 1 reply; 5+ messages in thread
From: abel.vesa @ 2022-08-10 10:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Maulik Shah
Cc: linux-arm-msm, devicetree, Linux Kernel Mailing List, Abel Vesa
From: Abel Vesa <abel.vesa@linaro.org>
SDM845 is a special case compared to the other platforms that use RPMh
stats, since it only has 2 stats (aosd and cxsd), while the others have
a 3rd one (ddr).
So in order for the driver to use the dedicated stats config, we added
the SDM845 dedicated compatible, which we document here.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
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 473adca4e973..ad6ac0af16bf 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
@@ -20,6 +20,7 @@ properties:
compatible:
enum:
- qcom,rpmh-stats
+ - qcom,rpmh-stats-sdm845
- qcom,rpm-stats
# For older RPM firmware versions with fixed offset for the sleep stats
- qcom,apq8084-rpm-stats
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 4/4] dt-bindings: soc: qcom: stats: Document SDM845 compatible
2022-08-10 10:57 ` [PATCH 4/4] dt-bindings: soc: qcom: stats: Document SDM845 compatible abel.vesa
@ 2022-08-10 15:48 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-10 15:48 UTC (permalink / raw)
To: abel.vesa, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Maulik Shah
Cc: linux-arm-msm, devicetree, Linux Kernel Mailing List
On 10/08/2022 13:57, abel.vesa@linaro.org wrote:
> From: Abel Vesa <abel.vesa@linaro.org>
>
> SDM845 is a special case compared to the other platforms that use RPMh
> stats, since it only has 2 stats (aosd and cxsd), while the others have
> a 3rd one (ddr).
>
> So in order for the driver to use the dedicated stats config, we added
> the SDM845 dedicated compatible, which we document here.
>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> 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 473adca4e973..ad6ac0af16bf 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
> @@ -20,6 +20,7 @@ properties:
> compatible:
> enum:
> - qcom,rpmh-stats
> + - qcom,rpmh-stats-sdm845
qcom,sdm845-rpmh-stats
https://lore.kernel.org/all/20220720073326.19591-1-krzysztof.kozlowski@linaro.org/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread