Skip to content

kboot: pass the AOP motion sensor calibration on T6000 and T8112 - #124

Merged
RyanTheTide merged 1 commit into
mainfrom
gaps10/aop-motion-cal-t6000-t8112
Nov 9, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
gaps10/aop-motion-cal-t6000-t8112

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Extends aura#35 (motion calibration handover) to the M1 Pro (T6000) and M2 (T8112).

The ADTs on both have /arm-io/aop/iop-aop-nub/{accel,gyro} with the same six *-cal properties and the same container layout as the J616s (header byte 3 = 1, one location-0 entry). kboot only copied them inside dt_set_aop_firmware(), which returns early on everything except T6040/T6041/T8132. On T6000 and T8112, kboot now finds the OS AOP node (apple,t6000-aop / apple,t8112-aop, status okay) and runs the existing dt_set_aop_motion_cal() on it. Nothing else changes: iBoot already runs the AOP there, so there are no firmware segments to hand over.

The J316s and J413 DTs already describe the accel and gyro children (linux#1094). The Linux aop_motion driver reads the properties and otherwise logs "no ... from the bootloader, sensor left off".

Status

Draft. Trials pending (lane GAPS10), as aura-try one-shots on the M1 Pro and the M2:

  • six properties present under /proc/device-tree/aop@*/{accel,gyro}, byte-identical to the ADT;
  • aop-sensors-accel and -gyro IIO devices report: |a| ~ 9.8 m/s^2 at rest, gyro ~ 0;
  • boot gate unchanged (failed units, AVC, display, audio probe; no playback).

If the M1/M2 firmware needs a different nCal boot argument (as T6040 did, linux#745), that is a kernel follow-up.

🤖 Generated with Claude Code

The M1 Pro (T6000) and M2 (T8112) ADTs carry the accelerometer and
gyroscope calibration in the same accel-/gyro- properties and container
format as the M4 Pro, but kboot only copied them on T6040, T6041 and
T8132, where it also hands the AOP firmware segments over. Without the
properties the Linux aop_motion driver leaves both sensors off.

On T6000 and T8112, copy just the calibration into the accel and gyro
children of the OS AOP node. iBoot already runs the AOP firmware there,
so nothing else changes. A missing node, child or property is skipped
as before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 (j413, T8112) receipt (GAPS10, silent)

Setup: aura-try RAM-only Stage 2 = aura#124 head over the live recipe, with the j413 accel/gyro nodes enabled as in linux#1288. Kernel: 7.3.0-aurora-gaps10aop2 = integration 83df8e4b + linux#1288 (0064b755 + 9330cb74), with no test-only code. Stage 2 was not committed and Stage 1 was not touched.

  • Calibration handover: all six accel/gyro calibration properties are present in the OS DT. Each is byte-identical to the firmware device tree (sha256 compared on the host; values are not published).
  • AOP services: the AOP announces the accel and gyro services, and aop-sensors-accel and aop-sensors-gyro IIO devices appear.
  • At rest (50 direct reads 20 ms apart): |a| = 9.798 m/s^2 (min 9.789, max 9.811), all 50 samples distinct. Gyro |w| = 0.276 deg/s. 0 read errors.
  • Gate: 0 AVC (Enforcing) and 0 err-level kernel lines. The failed units are only the known trial noise (aurora-stage2-commit) and the separate speakerguardd switchtest regression, which happens without this change too.
  • Restore: the Mac went back to its production chain with boot.bin unchanged.

Without the nCal change (the test kernel showed this), Linux overwrites the firmware's nCal and the AOP never announces accel or gyro.

The M1 Pro (T6000) row follows.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M1 Pro (j316s, T6000) receipt (GAPS10, silent)

The setup is the same as the M2 row: aura#124 head, j316s accel/gyro enabled, kernel gaps10aop2 (integration 83df8e4b + linux#1288, no test-only code), aura-try RAM-only, Stage 2 not committed.

  • Calibration handover: all six calibration properties are present. Each is byte-identical to this Mac's firmware device tree. The T6000 values differ from the T8112 ones, as expected.
  • IIO devices: aop-sensors-accel and aop-sensors-gyro appear.
  • At rest: |a| = 9.823 m/s^2 (min 9.811, max 9.836), 49 of 50 samples distinct. Gyro |w| = 0.618 deg/s. 0 read errors.
  • Gate: 0 AVC and 0 err-level kernel lines. The failed units are only the same known two as on the M2.
  • Restore: the Mac went back to its production chain with boot.bin unchanged.

Both T8112 and T6000 are now proven.

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 9, 2026 10:01
@RyanTheTide
RyanTheTide merged commit 61f2fe6 into main Nov 9, 2026
12 checks passed
@RyanTheTide
RyanTheTide deleted the gaps10/aop-motion-cal-t6000-t8112 branch November 9, 2026 10:01
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.

1 participant