Repository navigation
arm64: dts: apple: j316s, j413: enable the AOP accelerometer and gyroscope - #1288
Merged
Merged
Conversation
…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>
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.
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. |
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: dropstatus = "disabled"from the J316s and J413accelandgyroservice children.soc: apple: aop: keep the firmware nCal on T8112 and T6000.AopHwConfig.ncalbecomesOption<u64>.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.
aop-sensors-accel|a| at rest (50 reads)aop-sensors-gyro|w| at restPer-Mac receipts are in the comments below. CI: host-tests, dt-checks, kunit and rust-build pass.
Assisted-by: LLM
🤖 Generated with Claude Code