Skip to content

m1n1: Pass the A9 AOP's boot arguments and sensor calibration - #135

Merged
henrikklee merged 1 commit into
OrchardLinux:mainfrom
brkosebay:a9/aop-boot-arguments
Nov 15, 2026
Merged

henrikklee merged 1 commit into
OrchardLinux:mainfrom
brkosebay:a9/aop-boot-arguments

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

Problem

The A9 AOP driver on main reads apple,aop-target, apple,chip-id and apple,chip-revision from the device tree, and the motion sensor drivers read their factory calibration from properties of the same kind. iBoot puts these values in the ADT, but nothing on main copies them into the FDT. Going by the driver's probe, the A9 AOP (and with it the accelerometer, gyroscope and pressure sensor) cannot start without them. This is read from the code; main's AOP path has not been run on an A9 without this patch.

Changes

One m1n1 patch, 0021-kboot-Pass-the-A9-AOP-s-boot-arguments-and-sensor-ca.patch:

  • copies aop-target (from iop-aop-nub), chip-id (from /chosen) and chip-revision (from /arm-io) into the AOP node as apple,… properties;
  • copies each motion sensor's factory calibration from its ADT node below iop-aop-nub into the sensor child node of the same name, with an apple, prefix. Calibration that iBoot left as an unresolved syscfg/ reference is skipped.

It is the m1n1 patch from #101, unchanged. #101 landed only the kernel side.

Testing

Numbering

The file keeps the number 0021 that it has in #107, which carries the identical file. Whichever of the two lands first, the other merges cleanly, and the next update of #107 drops its copy. Until #107 lands, 0015–0020 are unused on main; the patches still apply in order.

🤖 Generated with Claude Code

The A9 AOP driver needs the AOP target, chip ID and revision from the
bootloader, and the A9/A10 motion sensors take their factory
calibration from the device tree. Copy them from Apple's device tree
on every board that has them. Numbered 0015, after main's 0014.

[Orchard: from orchard PR OrchardLinux#135, commit 31b3ad7]
@henrikklee
henrikklee force-pushed the a9/aop-boot-arguments branch from 31b3ad7 to b984bbb Compare November 15, 2026 09:44
@henrikklee

Copy link
Copy Markdown
Contributor

Landed on current main as m1n1 patch 0015 (renumbered after main 0014), your authorship, unchanged otherwise. The series applies to the pinned m1n1 and builds. It also gives the A10 motion sensors their factory calibration. Your original head is kept as tag contrib/brkosebay-a9-aop-boot-arguments.

@henrikklee
henrikklee merged commit c20ced7 into OrchardLinux:main Nov 15, 2026
11 checks passed
henrikklee added a commit to jerricky26/hardware that referenced this pull request Nov 15, 2026
…on upright again

Smart Cover: the second hall sensor (PMIC GPIO 10 on the iPad 5 and 6,
the A8 analogue on Air 2 and mini 4) detects the cover folded back
behind the iPad, not a closed cover. Measured on a J71b: folding back
toggles only GPIO 10; closing toggles GPIO 0 then GPIO 10. It was
described as a second SW_MACHINE_COVER switch with a wake event, so
folding the cover back locked the iPad. Only the front sensor is a
cover switch and wake event now.

Rotation: since m1n1 passes the factory calibration (OrchardLinux#135), the iPad 6
accelerometer reports upright as y = -1 g, like the iPad 5's (measured
-0.93 g). The 180-degree mount matrix from before calibration turned
every orientation upside down; the iPad 6 and 7 use the identity
matrix, as the iPad 5 does.
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