Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@ description:

properties:
compatible:
enum:
- qcom,rpmh-stats
- qcom,sdm845-rpmh-stats
- qcom,rpm-stats
# For older RPM firmware versions with fixed offset for the sleep stats
- qcom,apq8084-rpm-stats
- qcom,msm8226-rpm-stats
- qcom,msm8916-rpm-stats
- qcom,msm8974-rpm-stats
oneOf:
- enum:
- qcom,rpmh-stats
- qcom,sdm845-rpmh-stats
- qcom,rpm-stats
# For older RPM firmware versions with fixed offset for the sleep stats
- qcom,apq8084-rpm-stats
- qcom,msm8226-rpm-stats
- qcom,msm8916-rpm-stats
- qcom,msm8974-rpm-stats
# SoC-specific compatibles that also read subsystem-level stats,
# falling back to "qcom,rpm-stats" for SoC-level stats only
- items:
- enum:
- qcom,shikra-rpm-stats
- const: qcom,rpm-stats

reg:
maxItems: 1
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/shikra.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@
};

sram@4690000 {
compatible = "qcom,rpm-stats";
compatible = "qcom,shikra-rpm-stats";
reg = <0x0 0x04690000 0x0 0x14000>;
};

Expand Down
9 changes: 9 additions & 0 deletions drivers/soc/qcom/qcom_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down
Loading