Repository navigation
Conversation
Youwes09
force-pushed
the
t8132-dapf
branch
2 times, most recently
from
October 30, 2026 05:26
dd87c94 to
a259f3a
Compare
pmgr_adt_power_is_active() lets a caller power a device only if it is off and leave it as it was found. Like pmgr_set_mode_recursive(), it follows each gate's parents: on T8132, dart-ane's gates are virtual, under an ANE_SYS that is off at boot. Assisted-By: LLM Signed-off-by: Youwes09 <yuvi.shen@outlook.com>
dapf_entries hardcodes the DAPF reg index of a fixed set of DARTs. On
T8132, dart-pmp, dart-dcp and dart-dcpext0 have no DAPF, and their reg
at that index is a PS_PROT page shared by many DARTs, which raises an
SError when written. Newer SoCs also have DAPFs on DARTs the table does
not name: dart-ave0/1 and dart-ane0 on T6040/T6041, dart-pmp0/1 on
T6050 and dart-ane1 on T8152.
Walk every DART under /arm-io and take the DAPF from its "instance"
property, which types each reg range by fourcc in one of two layouts:
{type, unit, name[8]} per range, or {type, name[8]} per DART range with
the DAPF in the range after them. The entry count tells them apart.
Fall back to the table for a DART with no instance list.
Assisted-By: LLM
Signed-off-by: Youwes09 <yuvi.shen@outlook.com>
On T8132, T8142 and T8152, dart-ave has a DAPF but lists no filter data, so there is nothing to write, yet it was reported as an error. Look the data up before powering the device and skip the DAPF if there is none. Assisted-By: LLM Signed-off-by: Youwes09 <yuvi.shen@outlook.com>
The DAPF is clock gated with the device behind its DART. On T8132, T8140, T8142 and T8152, the DART lists no gates of its own; they are on the device named without "dart-" (isp, ane, ave, pmp), so those DAPFs were written unpowered. An empty clock-gates, as on T8132's mtp and aop, counts as none. Power the device only if it is off, and power it down again only then: the old code gated a device it found running. If the state cannot be read, power the device and leave it on rather than write to it unpowered. Assisted-By: LLM Signed-off-by: Youwes09 <yuvi.shen@outlook.com>
DAPF init was skipped on T8132 because it raised an SError. With each DAPF found from the ADT and its device powered, the full set initializes. Without the MTP's DAPF, its DART reports a SID exception as soon as the MTP starts and RTKit never gets a HELLO, so the keyboard and trackpad stay dead. Assisted-By: LLM Signed-off-by: Youwes09 <yuvi.shen@outlook.com>
This was referenced Nov 5, 2026
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.
DAPF init was skipped on T8132 because it raised an SError.
dapf_entrieshardcodes each DART's DAPF reg index, but on T8132 dart-pmp, dart-dcp and
dart-dcpext0 have no DAPF, and the reg at that index is a PS_PROT page shared
by many DARTs.
Changes
pmgr_adt_power_is_active()reports whether a device and theparents it depends on are powered. Virtual gates (dart-ane's on T8132, under
an ANE_SYS that is off at boot) have no state of their own.
/arm-ioand take theDAPF from its
instanceproperty, in either layout:{type, unit, name[8]}per reg range (the range of type DAPF), or
{type, name[8]}per DART range(an entry of type DAPF puts the DAPF in the range after them). The entry
count tells them apart. The table is now only a fallback for DARTs with no
instance. No chip checks.a DAPF but no filter data; it was reported as an error.
device named without
dart-(isp, ane, ave, pmp). Power it only if it isoff and restore it after; if its state cannot be read, power it and leave it
on rather than write unpowered.
kboot_boot().ADT collection
Simulated against every ADT in GravityLinux/adt-collection; each DART that
gets initialized is exactly one whose
instancelists a DAPF:The table missed ave0/ave1/ane0 on T6040/T6041, pmp0/pmp1 on T6050 and ane1
on T8152.
Testing
J713 (Mac16,12, 13" M4 Air), macOS 26.6.2 firmware, booting Linux 7.3: no
SError, keyboard and trackpad work.
A debug build read each DAPF's registers before and after init:
iBoot leaves no configuration to preserve.
is rounded up to a 4-byte boundary (
...000reads back...003).initializing once in m1n1 is enough.
Not tested on other SoCs.