Skip to content

kernel: Motion sensors on the A9 and A10 through the Always-On Processor - #101

Merged
henrikklee merged 5 commits into
OrchardLinux:mainfrom
brkosebay:j71t/aop
Nov 12, 2026
Merged

henrikklee merged 5 commits into
OrchardLinux:mainfrom
brkosebay:j71t/aop

Conversation

@brkosebay

@brkosebay brkosebay commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Part 2 of 23 of the iPad 5 (J71t) series in this repository; merge after #102.

Problem

The A9 AOP hosts the accelerometer, gyroscope, pressure and ambient-light sensors. Its firmware needs boot arguments and per-device calibration that m1n1 did not pass on S8003, and a reloaded AOP (after kexec or sleep) lost its sensor firmware state, so the sensors did not come back.

Change

m1n1 passes the A9 AOP boot arguments and sensor calibration. The kernel selects a certified AOP reload path through device-tree match data (bindings, DT, mailbox, pmdomain, IIO and AOP driver patches), keeps the AOP power domain and firmware state for that reload, and refuses a suspend that would interrupt the firmware's boot. The J71t firmware recipe gains the AOP pieces, the gyroscope and pressure drivers are enabled, and J71t's accelerometer and gyroscope move from missing to working, and its light sensor from untested to working.

Testing

  • Hardware: iPad 5 Wi-Fi (J71t). Hands-on testing on 2026-11-11 with an integrated build of this series, made before the final failure-path fixes, covered the AOP sensors.
  • 2026-11-12: the accelerometer, gyroscope and ambient-light sensor were tested by hand on J71t and work.
  • Host: the Linux test suite passes at this branch's head, and the kernel and m1n1 patch series apply on apple-16k and apple-4k. At the top of the series the applied kernel tree is identical to the one in the built release image.
  • Other boards that share these drivers or compatibles have not been tested.

Dependencies

Depends on #102.

This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "j71t: AOP sensors with a retained firmware state for reload".

This update keeps the branch's earlier history: it merges the current base into the branch and adds the reworked change as a new commit on top.

🤖 Generated with Claude Code

@brkosebay brkosebay changed the title AOP sensors and certified warm reload j71t: AOP sensors with a retained firmware state for reload Nov 12, 2026
henrikklee pushed a commit to brkosebay/hardware that referenced this pull request Nov 12, 2026
The A9 (S8000/S8003) has the A10's Always-On Processor (AOP): its
firmware runs the accelerometer, gyroscope and pressure sensor. Add the
A9 to the AOP driver (the window onto its SRAM, its extra boot
arguments), a service property call for the factory calibration m1n1
passes, and gyroscope and pressure IIO drivers. J71t gets its AOP
firmware from its IPSW and enables the sensors; the accelerometer,
gyroscope and light sensor were tested by hand on J71t.

From orchard PR OrchardLinux#101 (commit a54e204): the sensor support only. The
PR's reload of a retained AOP across kexec (checksummed shutdown
logs, a power-state observer, the pr_flush export, the warm_state
attribute) and its suspend precheck are not part of this topic; the
AOP still starts once per boot.
@henrikklee henrikklee changed the title j71t: AOP sensors with a retained firmware state for reload kernel: Motion sensors on the A9 and A10 through the Always-On Processor Nov 12, 2026
@henrikklee
henrikklee marked this pull request as ready for review November 12, 2026 21:53
henrikklee pushed a commit to brkosebay/hardware that referenced this pull request Nov 12, 2026
The A9 (S8000/S8003) has the A10's Always-On Processor (AOP): its
firmware runs the accelerometer, gyroscope and pressure sensor. Add the
A9 to the AOP driver (the window onto its SRAM, its extra boot
arguments), a service property call for the factory calibration m1n1
passes, and gyroscope and pressure IIO drivers. J71t gets its AOP
firmware from its IPSW and enables the sensors; the accelerometer,
gyroscope and light sensor were tested by hand on J71t.

From orchard PR OrchardLinux#101 (commit a54e204): the sensor support only. The
PR's reload of a retained AOP across kexec (checksummed shutdown
logs, a power-state observer, the pr_flush export, the warm_state
attribute) and its suspend precheck are not part of this topic; the
AOP still starts once per boot.
brkosebay and others added 4 commits November 13, 2026 05:57
The A9 (S8000/S8003) has the A10's Always-On Processor (AOP): its
firmware runs the accelerometer, gyroscope and pressure sensor. Add the
A9 to the AOP driver (the window onto its SRAM, its extra boot
arguments), a service property call for the factory calibration m1n1
passes, and gyroscope and pressure IIO drivers. J71t gets its AOP
firmware from its IPSW and enables the sensors; the accelerometer,
gyroscope and light sensor were tested by hand on J71t.

From orchard PR OrchardLinux#101 (commit a54e204): the sensor support only. The
PR's reload of a retained AOP across kexec (checksummed shutdown
logs, a power-state observer, the pr_flush export, the warm_state
attribute) and its suspend precheck are not part of this topic; the
AOP still starts once per boot.
Apple's device trees list the same AOP services and calibration
properties on the iPad 6 as on the iPad 5, and the A10 AOP is
compatible with the A9's: let the gyroscope and pressure drivers serve
the T8010 AOP and calibrate its accelerometer as on the A9. Untested on
the A10.
Apple's BuildManifests give every iPad 5 model the AOP firmware
aopfw-ipad6faop, both iPad 6 models aopfw-ipad7baop and both iPad 7
models aopfw-ipad7caop. Enable the AOP in the shared iPad 5 and iPad 6
files (the iPad 7 names its own firmware) and add the firmware to the
recipes of J71s, J72s, J72t, J72b, J171 and J172; the iPad 7 output
hashes come from its 17.7 IPSW. Untested on those boards.
Map the gyroscope feature to apple_aop_gyro. With the AOP sensors in
the A9 device tree, the accelerometer and gyroscope nodes exist on every
A9 and A10 board: untested there (J71t: working), as the accelerometer
already was on the A10. Driver list regenerated from a built apple-16k
kernel.
The A10 iPad recipe test lists the firmware steps and file names the
J72b and iPad 7 recipes may hold; they now also build their AOP
firmware (aop-image@1, aop-ipad7b and aop-ipad7c).
@henrikklee

Copy link
Copy Markdown
Contributor

Landing the sensor part as your commit: the A9 in the AOP driver (SRAM window, boot arguments, service properties and factory calibration), the gyroscope and pressure drivers, the accelerometer calibration, and the AOP firmware for J71t. Not in this topic: the retained AOP reload across kexec (checksummed shutdown log, power-state observer, pr_flush export, warm_state attribute) and the suspend precheck; the AOP starts once per boot as before. On top: Apple's BuildManifests give every iPad 5 model your J71t's AOP firmware, so the AOP is enabled in the shared iPad 5 file; the iPad 6 (both models) and iPad 7 (both, own ipad7c firmware) get it too, and the gyroscope, pressure sensor and calibration serve the A10 AOP as well. Your previous head is kept as tag contrib/brkosebay-j71t-aop. Please check rotation, the gyroscope and the light sensor on the next nightly.

@henrikklee
henrikklee merged commit c7b9238 into OrchardLinux:main Nov 12, 2026
11 checks passed
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.

2 participants