2022-08-12 10:45:17

by Abel Vesa

[permalink] [raw]
Subject: [PATCH v2 1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp

Like on the other platforms that provide RPMh stats, on SDM845, the
aoss_qmp reg size needs to be reduced to its actual size of 0x400,
otherwise it will overlap with the RPMh stats reg base, node that will
be added later on.

Signed-off-by: Abel Vesa <[email protected]>
---

No changes since v1.

arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index f0e286715d1b..5bea96a9ce06 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4836,7 +4836,7 @@ aoss_reset: reset-controller@c2a0000 {

aoss_qmp: power-controller@c300000 {
compatible = "qcom,sdm845-aoss-qmp", "qcom,aoss-qmp";
- reg = <0 0x0c300000 0 0x100000>;
+ reg = <0 0x0c300000 0 0x400>;
interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>;
mboxes = <&apss_shared 0>;

--
2.34.1


2022-08-12 10:49:48

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp

On 12/08/2022 13:12, Abel Vesa wrote:
> Like on the other platforms that provide RPMh stats, on SDM845, the
> aoss_qmp reg size needs to be reduced to its actual size of 0x400,
> otherwise it will overlap with the RPMh stats reg base, node that will
> be added later on.
>
> Signed-off-by: Abel Vesa <[email protected]>
> ---
>


Acked-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof

2022-08-12 10:52:38

by Abel Vesa

[permalink] [raw]
Subject: [PATCH v2 2/4] soc: qcom: stats: Add SDM845 stats config and compatible

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 <[email protected]>
---

Changed qcom,rpmh-stats-sdm845 to qcom,sdm845-rpmh-stats, as suggested
by Krzysztof.

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..121ea409fafc 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,sdm845-rpmh-stats", .data = &rpmh_data_sdm845 },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_stats_table);
--
2.34.1

2022-08-29 23:47:28

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp

On Fri, 12 Aug 2022 13:12:37 +0300, Abel Vesa wrote:
> Like on the other platforms that provide RPMh stats, on SDM845, the
> aoss_qmp reg size needs to be reduced to its actual size of 0x400,
> otherwise it will overlap with the RPMh stats reg base, node that will
> be added later on.
>
>

Applied, thanks!

[1/4] arm64: dts: qcom: sdm845: Reduce reg size for aoss_qmp
commit: b0f8e8a38a010999f7b07617d874e3eb594a0a3e
[3/4] arm64: dts: qcom: sdm845: Add the RPMh stats node
commit: 528dc60f9e5eadcfde651b1458da2b8d008a2cf0

Best regards,
--
Bjorn Andersson <[email protected]>