Repository navigation
arm64: dts: apple: t8140/j700: ANS2, SMC, SPMI and CPU frequency scaling (reworked) - #23
Merged
Merged
Conversation
This was referenced Sep 25, 2026
RyanTheTide
marked this pull request as ready for review
September 25, 2026 07:12
RyanTheTide
force-pushed
the
series/neo-prerequisites-20260924
branch
from
September 25, 2026 14:54
021cafc to
2903144
Compare
RyanTheTide
changed the base branch from
series/neo-prerequisites-20260924
to
aurora-wip
September 25, 2026 14:55
Add "apple,tahiti-e" and "apple,tahiti-p" compatibles for the A18 Pro
efficiency and performance CPU cores respectively. As with the M4 cores,
there is no longer a generational codename, so we assign the core
compatible based on SoC codename ("Tahiti") plus core type (E-Core /
P-Core).
Acked-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Yureka Lilian <[email protected]>
Reviewed-by: Sven Peter <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
Add the power domains used by the ANS2 storage controller and the SPMI controller, and the always-on domains of the power management co-processor and of the SMC I2C masters, placed in the existing blocks by register offset: - ans (0x278) and the domains of the PCIe link between the ANS2 controller and the NAND: apcie_gp (0x258), apcie_sys_gp (0x2a0), apcie_st (0x310), apcie_sys_st (0x3a0) and apcie_phy_sw (0x3c0), - pmp (0x3d0) and pms_sram (0x3d8), the power management co-processor and its SRAM, - nub_spmi0 (mini PMGR 0x58), the SPMI controller the PMIC sits on, - smc_i2cm1 and smc_i2cm2 (mini PMGR 0x8030, 0x8038), I2C masters used by the SMC firmware. The offsets and always-on flags match the PMGR description generated from the ADT for Yureka Lilian's A18 Pro series. apcie_sys_gp is given apcie_gp as its parent, as in the T8132 description; the generated A18 Pro description lists no parent for it. The ANS link has only been run with this dependency in place, so it is kept. The ANS co-processor is handed over running and cannot be reset through PMGR (asserting its reset raises an SError), so its domain is always-on. nub_spmi0, pmp, pms_sram and the two SMC I2C masters are always-on too; pmp, pms_sram and the I2C masters have no kernel consumer. The apcie domains are not always-on: the NVMe controller holds them once a board enables it. Also replace the file header with a plain description of the file. Link: https://lore.kernel.org/r/20260911-apple-a18-pro-initial-devicetrees-v2-7-08d06cf011d4@cyberchaos.dev Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
Add the nub SPMI controller at 0x308714000 (AIC interrupt 487, power domain nub_spmi0) and the Baku PMIC on it at USID 0xe. Export the PMIC scratch registers that the SMC reboot driver uses as NVMEM cells: the boot stage (0xf701), the boot error and panic counts (low and high nibble of 0xf702) and the shutdown flag (0xf70f, bit 3). The shutdown flag is what makes an SMC power-off request power the machine off instead of rebooting it. The ADT places the PMIC's legacy scratch area at 0xf700. The cell offsets and bit fields within it follow the layout used with the other Apple PMICs, as in the Stowe PMIC description on T8122; they have not been checked against what iBoot or macOS write on this machine. Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
Add the SMC and its ASC mailbox. The SMC register window at 0x30c600000 is the ADT's smc reg[0] and the SRAM at 0x30de00000 is the iop-smc-nub region-base. The mailbox sits at 0x30c608000; its AIC interrupts 581 to 584 are listed in the binding's send-empty, send-not-empty, recv-empty, recv-not-empty order. The existing macsmc driver attaches through the "apple,t8103-smc" fallback. Children: - gpio, the SMC GPIO controller, - hwmon, with the six CPU cluster die temperatures: Te05 and Te0S for the E cluster, Tp01, Tp05, Tp09 and Tp0D for the P cluster, - reboot, SMC reboot and power-off using the PMIC NVMEM cells. The CPU die channels are the first temperature channels on purpose. J700 carries an interim CPU thermal policy, until its CPU thermal limits are described as DT thermal zones, and that policy reads the first six temperature channels of this node. Other sensors belong to the board files. Both nodes are disabled here; the board enables them. Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
Add the ANS2 storage controller: its ASC mailbox at 0x389608000 (AIC 1007 to 1010), the SART address filter at 0x38dc50000 and the NVMe controller (AIC 1039). As on T8132, the NVMMU has its own register window, so the controller takes three regions: the non-secure controller alias at 0x3cdcc0000, the ANS co-processor at 0x389600000 and the NVMMU at 0x38dcc0000. The ADT sizes the controller alias at 0x10000, but the linear submission queue registers at +0x24908..+0x24910 lie in the same alias, so the region is 0x30000 long. The NVMMU window size, 0x60000, is the ADT's. Besides ans and apcie_sys_st the controller holds apcie_phy_sw, the third power domain the binding requires for T8140: with that domain off, the ANS PCIe link to the NAND falls to L1 idle and the firmware reports a link timeout on its first read. The ANS firmware is started by iBoot and handed over running, and how it is handed over depends on the boot chain, so the nodes are disabled here and enabled by the board. Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
Add the DVFS controllers of the E cluster (0x210e20000) and the P cluster (0x211e20000) and their OPP tables, and point the CPU nodes at them. The tables are the ADT's voltage-states1-sram for the E cluster, six states from 816 MHz to 2.424 GHz, and voltage-states5-sram for the P cluster, 17 states from 744 MHz to 4.044 GHz. opp-level is the hardware P-state written to the controller. The controllers carry only the "apple,t8140-cluster-cpufreq" compatible, as the binding documents: the T8140 DVFS status register layout is not known, so no T8112 fallback is claimed. The transition latency has not been measured on this SoC, so the OPPs have no clock-latency-ns and apple-soc-cpufreq reports its DVFS transaction timeout as the transition latency instead. The CPU nodes have no capacity-dmips-mhz either; the core capacities have not been measured. With the interim J700 CPU thermal policy, the cpufreq driver holds both clusters at their lowest state until the board enables that policy. Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
… sizes Switch the CPU nodes from the Sawtooth and Everest compatibles to "apple,tahiti-e" and "apple,tahiti-p", the compatibles the CPU binding defines for the A18 Pro efficiency and performance cores, and add the L1 cache sizes so that cacheinfo reports them: 128 KiB instruction and 64 KiB data cache on the E cores, 192 KiB and 128 KiB on the P cores. The compatibles and cache sizes are those of Yureka Lilian's A18 Pro device tree series. Also drop a stray blank line between cpu@1 and cpu@2. Link: https://lore.kernel.org/r/20260911-apple-a18-pro-initial-devicetrees-v2-7-08d06cf011d4@cyberchaos.dev Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
Enable the ANS2 NVMe controller and the SMC on the MacBook Neo, and add the SMC sensors shared by the Apple laptops through hwmon-common.dtsi and hwmon-laptop.dtsi, as the other laptop boards do. macsmc-hwmon skips keys that this SMC does not have. Set apple,cpu-thermal-policy on the SMC hwmon node. It enables the interim J700 CPU thermal policy, which stands in until the CPU thermal limits are described as DT thermal zones: the policy throttles on the six CPU die channels that the SoC file lists first, and holds both clusters at their lowest state whenever fresh readings are missing. Without it the T8140 cpufreq driver never leaves the lowest state, so this is what enables CPU frequency scaling here. The driver rejects the property on other machines, which is why it is set in the board file. Also set /chosen/bootargs to "arm64.nowfxt". This is a temporary measure. The secondary cores lose architectural state in WFIT, so SMP needs the kernel to stay off WFxT in its delay loop, and the kernel does not yet do that on T8140 by itself. Until it does, boot chains that pass this DT's /chosen/bootargs through unchanged rely on this property to boot with SMP. A loader that supplies its own command line replaces the property and has to pass arm64.nowfxt itself. Assisted-by: LLM checkpatch sparse Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide
force-pushed
the
series/neo-j700-ans-cpu-board-20260925
branch
from
September 25, 2026 15:33
755111e to
118ffba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
J700 board and T8140 SoC device-tree additions for storage, SMC, SPMI/PMIC and CPU frequency scaling, reworked after the 2026-09-25 maintainer audit and rebased onto
aurora-wip(which now carries the reworked #10, #22 and #21).What changed since the audited head (755111ef)
dt-bindings: arm: cpus: Add Apple A18 Pro CPU core compatiblesis applied from lore (with Krzysztof Kozlowski's Acked-by and Sven Peter's Reviewed-by) instead of our re-typed copy.dtbs_checkexcept for the five CS42L83 supplies inherited from arm64: apple: T8140/J700 platform prerequisites (reworked) #10.smc_hwmonandsmc_rebootchildren), ANS mailbox, SART and NVMe move from the board file and from appended&soc {}blocks intot8140.dtsiin unit-address order; ANS and SMC are disabled in the SoC file and enabled by the board; the board includeshwmon-common.dtsiandhwmon-laptop.dtsilike the other laptops.pmp/pmp_mboxnodes (the PMP-v2 driver is parked with cpufreq: apple: J700 T8140 cpufreq and SMC CPU thermal policy (reworked; PMP-v2 parked) #22), 80 of the 86 hwmon channels (unverified placements and raw-key labels; the six CPU die channels the thermal policy needs stay first), the boardapple,always-onoverrides, the AICregreformat,idle=wfi(the default) andpmp_v2.thermal_policy=0from the boot arguments./chosen/bootargsisarm64.nowfxtonly, inside the existingchosennode and documented as temporary: the secondary cores lose state in WFIT.apcie_sys_gpkeepsapcie_gpas parent (as on T8132) with the message stating that the generated A18 Pro PMGR description lists no parent and that the ANS link has only been run with the dependency in place.Checks:
CHECK_DTBS=y apple/t8140-j700.dtbafter every commit against the merged bindings (#10, #21, #22),dt_binding_checkoncpus.yaml,checkpatch --strict --codespell, dtcW=2.Not booted on the J700 in this form. The DT is content-identical to the audited one apart from the dropped PMP nodes and hwmon channels, but a boot of the merged
aurora-wipis still owed: NVMe adoption, cpufreq reaching the top states under the SMC policy, SMC reboot/power-off.🤖 Generated with Claude Code