Repository navigation
arm64: dts: apple: t6040, t8142: name the ANE CPU floor OPP (apple,ane-cpu-opp) - #3741
Conversation
The ANE CPU cluster floor applied only where the root compatible matched a machine name kept in the table (apple,t6040, apple,t8142), and High Power mode had a fallback on the apple,j714s machine name for DTBs from before apple,high-power-mode. Add a boolean apple,ane-cluster-floor on the CLPC node of the machines where the floor was measured (T6040 in t6040.dtsi, T8142 J704 and J813/J815), document it in the PMC binding, and read it instead of the machine name. Drop the j714s fallback: t6050-j714s.dts has carried apple,high-power-mode since linux#2784. For every in-tree DTB the resolved ANE floor and High Power mode are the same as before. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Draft sweep 12-05: parked; main changed the design under this PR.
Suggested path (owner call): (1) a DT-only change adding |
Conflicts in drivers/soc/apple/clpc.c, apple,pmc.yaml and t8142-j813-j815.dtsi resolved to main's version: main reads the ANE CPU floor from apple,ane-cpu-opp. The next commit replaces the rest of this branch's apple,ane-cluster-floor property with that one. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The CLPC holds the CPU cluster whose frequency sets the Neural Engine's speed at a floor while ANE work is in flight. On T6040 and T8142 it finds that cluster and floor only through a machine-compatible match in its table (apple,t6040: cpu-map cluster2 at 3.756 GHz; apple,t8142: cluster1 at 4.176 GHz), the fallback for DTBs without apple,ane-cpu-opp. Point apple,ane-cpu-opp at the measured floor OPP in the CPU tables, as the T6050 and T8132 trees do: opp12 (3.756 GHz) of T6040's second P-cluster table, and the 4.176 GHz P-cluster OPP on J704 and J813/J815. The driver resolves the same cluster and frequency from it on T6040 and J813/J815. J704 has no /cpus/cpu-map, so the fallback found no cluster there and the property gives it the floor for the first time. Drop this branch's earlier apple,ane-cluster-floor boolean and driver change; the machine-name fallbacks stay until the Stage 2 DTBs carry the property. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Second pass 12-05: redone as DT-only on main. Merged main (ef8a1bf, conflicts resolved to main), then 5504c96 replaces the branch content: |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: FINISH at 5504c96
Failure: The exact PR-text job rejects the description because the Tested and Risk lines are missing. The current Testing heading includes extra words before its colon, and the body has no Risk line. Add plain Tested and Risk lines, distinguishing the seven validated DTBs and the physical rows still pending. The check reruns on a description edit. https://github.com/aurora-silicon/linux/actions/runs/47465868828/job/145502403293
Checked: All seven exact DTBs compile, and each CLPC phandle resolves to an OPP used by the intended CPU table. The T6040 boards select 3.756 GHz, and the three T8142 boards select 4.176 GHz. The J704 table is referenced by four CPUs, so the driver can resolve it without a CPU map. The existing driver and fallback are outside the diff. Exact hosted DT and Host test jobs passed.
There was a problem hiding this comment.
Verdict: MERGE at 5504c96
Checked: The edited PR description includes the Tested and Risk fields and passes the current canonical PR-text checker, including the author's commits. The empty-body control fails as expected. This resolves my prior description finding. The source SHA matches the seven devicetrees previously checked. Their CPU OPP phandles resolve to the intended clusters and rates, and the released-DT fallback stays available.
Hosted DT and Host passed. The hosted rerun for the edited description and native rows remain open.
|
Hardware row at exact head
How: one combined test kernel for eight PRs, not this PR alone. Kernel |
|
Merging with |
What: DT-only. The CLPC already prefers
apple,ane-cpu-opp(an OPP in the CPU table of the cluster whose frequency sets the ANE's speed) and falls back to the table'sane_cluster_machinematch without it. T6040 and T8142 still used that fallback. This names the measured floor OPP for them, as the T6050 and T8132 trees do:&clpc { apple,ane-cpu-opp = <&t6040_p1_opp_3756>; }(opp12, 3.756 GHz, second P-cluster table = cpu-map cluster2, same as the table'sane_cluster = 2,ane_cluster_khz = 3756000).apple,ane-cpu-opp = <&pcluster_opp_4176>(4.176 GHz P-cluster OPP = cluster1,ane_cluster_khz = 4176000).No driver or binding change (
apple,ane-cpu-oppis already in power/apple,pmc.yaml). main'sane_cluster_machineandhigh_power_machinefallbacks stay; dropping them is a later driver change once the fleet's Stage 2 DTBs carry the properties.Behaviour: on T6040 (J614s, J616s, J773s) and J813/J815 the driver resolves the same CPU cluster and floor frequency as the fallback does today. J704 has no
/cpus/cpu-map, so on main the fallback finds no cluster there (apple_clpc_cluster_cpu()returns -ENODEV) and J704 gets no CPU floor; with the property it gets the 4.176 GHz floor that J813 measured (same SoC). DTBs whose Stage 2 copy predates this keep the fallback, so nothing regresses before a Stage 2 refresh.This replaces the branch's earlier content (a new boolean
apple,ane-cluster-floor, driver reading it, and removal of the j714s High Power fallback); that is gone after the merge of main.Tested (local, merge of main ef8a1bf):
make CHECK_DTBS=yfor t6040-j614s/j616s/j616s-tether/j773s and t8142-j704/j813/j815: builds, no new warnings (the only one is the existingdisp0_piodmaalias on j813). The phandle in each DTB resolves to opp-hz 3756000000 (T6040) / 4176000000 (T8142).dt_binding_check DT_SCHEMA_FILES=power/apple,pmc.yamlclean.Rows: J616s (lab) with a Stage 2 DTB from this head: ANE work (MobileNetV1 loop) holds cluster2 at >= 3.756 GHz (
scaling_min_freq/QoS while in flight), released after. T8142 (J813/J815/J704) rows for whoever has those Macs.Tested: build only at 5504c96 (CHECK_DTBS, dt_binding_check clean); no hardware run at this head yet, J616s row queued.
Risk: two-way · M4 Pro family (T6040: J614s, J616s, J773s) and M5 (T8142: J704, J813, J815); J704 gains an ANE CPU floor it lacked.