Skip to content

arm64: dts: apple: j316s, j413: enable the AOP accelerometer and gyroscope - #1288

Merged
RyanTheTide merged 3 commits into
integration/aurorafrom
gaps10/aop-motion-t6000-t8112
Nov 9, 2026
Merged

RyanTheTide merged 3 commits into
integration/aurorafrom
gaps10/aop-motion-t6000-t8112

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

This pairs with aurora-silicon/aura#124 (merged). That aura change copies the accelerometer and gyroscope calibration from the ADT into the OS AOP node on T6000 (M1 Pro) and T8112 (M2).

This PR has three commits:

  • arm64: dts: drop status = "disabled" from the J316s and J413 accel and gyro service children.
  • soc: apple: aop: keep the firmware nCal on T8112 and T6000. AopHwConfig.ncal becomes Option<u64>.
    • T8112 and T6000 keep the image's own value, which is 1.
    • T6040 and T8132 still write 1, and the other SoCs still write 0.
    • When Linux overwrites nCal, the T8112/T6000 AOP never announces the accel or gyro services.
  • tools/asahi/aop-bootargs-tests.py: the host test covers the per-SoC values, with negative controls.

Proof

The kernel was 7.3.0-aurora-gaps10aop2 (integration 83df8e4 + these commits). Stage 2 was aura#124 over the live recipe with these DT nodes enabled, booted one-shot and RAM-only.

M2 (j413) M1 Pro (j316s)
6 calibration props in the OS DT, sha256 == ADT 6/6 6/6
aop-sensors-accel |a| at rest (50 reads) 9.798 m/s^2 (9.789-9.811), 50 distinct 9.823 m/s^2 (9.811-9.836), 49 distinct
aop-sensors-gyro |w| at rest 0.276 deg/s 0.618 deg/s
AVC / err-level lines 0 / 0 0 / 0

Per-Mac receipts are in the comments below. CI: host-tests, dt-checks, kunit and rust-build pass.

Assisted-by: LLM

🤖 Generated with Claude Code

…scope

The bootloader now hands the accelerometer and gyroscope calibration of
the M1 Pro (J316s) and M2 (J413) to the OS, as on the M4 Pro (aura#124).
The ADT carries it on both machines in the same properties and format.
Without it the aop_motion driver leaves the sensors off.

Drop the disabled status from both service children.

Assisted-by: LLM
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
The aop driver patches the AOP firmware boot arguments with nCal 0 on
T8112 and T6000. The J413 (M2) image carries nCal 1. With 0 the firmware
never announces its accelerometer and gyroscope services, so the
aop_motion driver has nothing to bind to. With the image value kept,
both services appear and report once the bootloader hands over their
calibration.

Make nCal optional per SoC. None leaves the image value in place. T8112
and T6000 use None. Every other SoC keeps the value it had: T6040/T8132
write 1, the others write 0.

Tested on the M2 (J413) with aura#124 and the J413 accel/gyro children
enabled. The firmware image value is 1. Accelerometer at rest: |a|
9.796 m/s^2 over 50 distinct samples. Gyroscope: 0.26 deg/s.

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 83df8e4 + linux#1288 (0064b75 + 9330cb7), 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 83df8e4 + 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.

AopHwConfig.ncal is now an Option, and patch_bootargs() takes an
optional value per key, so the generated harness no longer compiled.

Pass Some() values to the existing cases, and add these:
- a None key keeps the firmware value while the other keys are still
  patched;
- the per-SoC table, extracted from aop.rs: T8112 and T6000 keep the
  image nCal, T6040 and T8132 write 1, and the others write 0. Each case
  also runs through patch_bootargs().

Negative controls: None written as 0, T8112 forced to 0, T6040 forced
to 0 and T6000 forced to 1 must each fail.

Assisted-by: LLM
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
@RyanTheTide
RyanTheTide marked this pull request as ready for review November 9, 2026 10:16
@RyanTheTide
RyanTheTide merged commit cc9c40c into integration/aurora Nov 9, 2026
5 checks passed
@RyanTheTide
RyanTheTide deleted the gaps10/aop-motion-t6000-t8112 branch November 9, 2026 10:16
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