Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ properties:
description: |
PMP report region and cluster effort lane. Increasing firmware effort
imposes a maximum-frequency QoS constraint alongside thermal cooling.
If the PMP is unavailable, cpufreq retains its fallback ceiling.
If the PMP is unavailable, cpufreq retains its fallback ceiling. A
disabled report node means the board does not run the PMP; where the
limit is optional for the SoC, no limit applies then.
items:
- items:
- description: PMP report region
Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/boot/dts/apple/t6050-base.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
* The clusters' controllers (t6050-dieX.dtsi) assert apple,firmware-managed-thermal, which the
* T6050 profile requires: the firmware keeps the voltage and PLL control. It does not lower a
* cluster's requested state on its own: on J714s, under a sustained all-core load, the PMP's
* fast-die effort reaches its maximum while the clusters stay at their top state, so boards
* whose PMP runs give each cluster apple,fast-die-effort (t6050-j714s.dts). Other boards are
* not qualified yet.
* fast-die effort reaches its maximum while the clusters stay at their top state (also seen
* on K116s), so each cluster gets apple,fast-die-effort (t6050-peripherals.dtsi), which
* applies on every board that runs the PMP.
*/
mcluster_opp: opp-table-mcluster {
compatible = "operating-points-v2";
Expand Down
20 changes: 0 additions & 20 deletions arch/arm64/boot/dts/apple/t6050-j714s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -465,26 +465,6 @@
status = "okay";
};

/*
* The PMP runs a control loop on the die's hot-spot sensors and publishes an effort for each
* cluster in its FAST-DIE-CE range, in the order of the ADT's fast-die-ctrl-ce-map: MACC0, MACC1
* and PACC_ANE (the P cluster). The OS enforces it as a frequency limit; the ADT's CLPC node lists
* the same range among its ptd-ranges. Without the limit the clusters keep their top state while
* the effort sits at its maximum under a sustained all-core load. Until the PMP reports that it
* runs (also on a boot without the PMP driver), cpufreq holds each cluster at its fallback limit.
*/
&cpufreq_mc0 {
apple,fast-die-effort = <&pmp0_report 0>;
};

&cpufreq_mc1 {
apple,fast-die-effort = <&pmp0_report 1>;
};

&cpufreq_pc {
apple,fast-die-effort = <&pmp0_report 2>;
};

&pmc {
/* PMP, CLPC and AP agents, once the PMP runs */
apple,static-voters = <0 1 3>;
Expand Down
25 changes: 25 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3702,3 +3702,28 @@
status = "disabled";
};
};

/*
* The PMP runs a control loop on die 0's hot-spot sensors and publishes an effort for each
* cluster in its FAST-DIE-CE range (pmp0_report, three lanes), in the order of the ADT's
* fast-die-ctrl-ce-map: MACC0, MACC1 and PACC_ANE (the P cluster). The ADT's CLPC node lists
* the same range among its ptd-ranges. The firmware does not lower the clusters' states itself
* (see the CPU OPP tables in t6050-base.dtsi): the OS enforces the effort as a frequency limit.
* The lanes are the SoC's, not a board's, so every T6050 board carries them. Die 1's clusters
* on a two-die part have no lane in this range and stay unmapped.
*
* The limit follows pmp0_report: a board that leaves it disabled does not run the PMP, and
* cpufreq then applies no limit, as without the property. Once the report is enabled, cpufreq
* holds each cluster at its fallback limit until the PMP reports that it runs.
*/
&cpufreq_mc0 {
apple,fast-die-effort = <&pmp0_report 0>;
};

&cpufreq_mc1 {
apple,fast-die-effort = <&pmp0_report 1>;
};

&cpufreq_pc {
apple,fast-die-effort = <&pmp0_report 2>;
};
10 changes: 10 additions & 0 deletions drivers/cpufreq/apple-soc-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,16 @@ static int apple_fast_die_init(struct cpufreq_policy *policy,

parsed = of_parse_phandle_with_fixed_args(cluster, "apple,fast-die-effort",
1, 0, &args);
/*
* A disabled report means the board does not run the PMP: there is no
* effort to follow, as without the property. The SoC's dtsi can then
* describe the lanes once for every board.
*/
if (!parsed && !of_device_is_available(args.np) &&
!priv->info->needs_thermal_policy) {
of_node_put(args.np);
return 0;
}
/* Required thermal admission must fail closed with an older DT. */
if (parsed == -ENOENT && !priv->info->needs_thermal_policy)
return 0;
Expand Down
Loading