Skip to content

soc: apple: clpc: take the ANE cluster floor and High Power from the DT - #3741

Draft
RyanTheTide wants to merge 1 commit into
mainfrom
gates/clpc-power-profile
Draft

RyanTheTide wants to merge 1 commit into
mainfrom
gates/clpc-power-profile

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: CLPC stops matching machine names. (1) The ANE CPU cluster floor used to apply only where the root compatible matched the table's ane_cluster_machine (apple,t6040, apple,t8142). It now needs a new boolean apple,ane-cluster-floor on the CLPC node. The property is added to t6040.dtsi, t8142-j704.dts and t8142-j813-j815.dtsi, and documented in power/apple,pmc.yaml. (2) The high_power_machine = "apple,j714s" fallback is gone, so High Power mode comes only from apple,high-power-mode. t6050-j714s.dts has carried that property since #2784. Audit gate: #2784 / #3083, section 3 MED.

Tested: at 33cc47b: CLPC KUnit on arm64 QEMU passes 18/18 (suites apple-clpc-gpu and apple-clpc-policy). Host tests clpc-gpu-demand and clpc-high-power-cleanup pass (3/3). The W=1 build of clpc.o is clean. CI's scripts/dtc/apple-dt-check.sh (base aurora/main vs head) finds 0 new CHECK_DTBS warnings, and the pmc.yaml dt_binding_check passes. The DT check below finds 0 differences across 45 CLPC nodes in 141 DTBs.

Risk: one-way door until the Stage 2 DTBs carry the property. The live DT on our Macs is the Stage 2 DTB, not the kernel's. Read-only check on 12-01: the J616s live CLPC node has no apple,ane-cluster-floor. So with this kernel, the J616s (T6040) and the T8142 boards lose the ANE cluster floor (ANE work still gets its DCS/fabric floor) until their Stage 2 DTB is refreshed. The same goes for a J714s whose Stage 2 DTB predates #2784: it would lose High Power mode. Affected Macs: J616s, J614s, J773s, J704, J813, J815, J714s.

Not yet: no hardware row. A J616s row needs a Stage 2 DTB with the property (trial plus promote), which I did not do. T8142 and J714s rows are owed by their owners. Please hold the merge until the J616s Stage 2 DTB carries the property, or merge it together with that refresh.

DT equivalence proof (fdt per compiled dtb)

Script proof_clpc.py (pylibfdt). It reads the old dtbs (aurora/main b2cd21f) with the old rules and the head dtbs with the new rules. The table is the first compatible in the driver's match list. Old ANE floor = the table has ane_cluster_khz and the root compatible has the table's machine. New ANE floor = the table has ane_cluster_khz and the node has apple,ane-cluster-floor. Old High Power = the property, or (the t6050 table and root apple,j714s). New High Power = the property.

t6040-j614s.dtb /power-management@5048aa000/performance-controller@1 table=t6040 ane_floor old=True new=True high_power old=False new=False SAME
t6040-j616s-tether.dtb /power-management@5048aa000/performance-controller@1 table=t6040 ane_floor old=True new=True high_power old=True new=True SAME
t6040-j616s.dtb /power-management@5048aa000/performance-controller@1 table=t6040 ane_floor old=True new=True high_power old=True new=True SAME
t6040-j773s.dtb /power-management@5048aa000/performance-controller@1 table=t6040 ane_floor old=True new=True high_power old=False new=False SAME
t6041-j616c.dtb /power-management@5048aa000/performance-controller@1 table=t6041 ane_floor old=False new=False high_power old=True new=True SAME
t6050-j714s.dtb /soc@200000000/power-management@286806000/performance-controller@1 table=t6050 ane_floor old=False new=False high_power old=True new=True SAME
t6050-k116s.dtb /soc@200000000/power-management@286806000/performance-controller@1 table=t6050 ane_floor old=False new=False high_power old=True new=True SAME
t8142-j704.dtb /soc/power-management@382700000/performance-controller@1 table=t8142 ane_floor old=True new=True high_power old=False new=False SAME
t8142-j813.dtb /soc/power-management@382700000/performance-controller@1 table=t8142 ane_floor old=True new=True high_power old=False new=False SAME
t8142-j815.dtb /soc/power-management@382700000/performance-controller@1 table=t8142 ane_floor old=True new=True high_power old=False new=False SAME
clpc nodes=45 differences=0

The other 31 CLPC nodes (t6020/1/2, t6041, the other t6050 boards, t8112, t8132, t8140, t8152) are False/False in both.

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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant