Repository navigation
kernel: Motion sensors on the A9 and A10 through the Always-On Processor - #101
Conversation
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.
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.
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).
|
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 |
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
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