Repository navigation
iio: aop_motion: T8142 (M5) accelerometer and gyroscope, enabled on J815 - #2220
Conversation
a1f15f7 to
0163f09
Compare
|
Blockers: 1.
HW row: J815 on this head (0163f09) with the aura#306 loader: accel and gyro direct reads and buffer, Assisted-by: LLM (Claude:Opus 5.5) |
0163f09 to
7694ed4
Compare
|
@RyanTheTide all three are fixed in
The commit message says all of this. The "Tested on the J815" line now says it was an earlier build that sent the properties to every service. Checks:
The J815 row on this head (direct reads and buffer, |
7694ed4 to
be6bfcd
Compare
|
Two follow-ups on the head above:
|
|
Re-review of 7694ed4: no blockers. Earlier points:
The commits carry only the author's Signed-off-by. I found nothing new. Rows:
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: HOLD at be6bfcd339b5
Blockers:
drivers/iio/common/aop_sensors/aop_motion.rs:294-334(merge conflict againstmain5c2f6c56):65ddaa0adc(iio: aop_motion: calibrate once per boot and idle-stop direct reads) already landed commita187c625faed(dev_dbg!for kept calibration ataop_motion.rs:340) and splitControl::start()/stop()intoControl::calibrate()(once per AOP boot / after firmware sleep) andControl::start_reports()/stop_reports(). Rebase ontomain, dropa187c625faed, port the companion writes intostart_reports()/stop_reports(), and verify whetherPROP_MODE(0x3d = 2) belongs incalibrate()or must be resent on everystart_reports().- PR description (final line): remove the trailing attribution footer line per pre-PR checklist §4 (zero tool or model attribution in PR body, title, or commits).
- Hardware evidence (pre-PR checklist §5): no hardware row at the PR head. After rebasing onto
main, add exact-head rows for (1) J815 (T8142) with theaurora-silicon/aura#306loader (accel/gyro direct reads and buffer,in_*_sampling_frequency= 100 matching observed rate,|accel|~1 g at rest, suspend/resume + post-resume read, 0 AVC, 0 failed units, 0 new kernel errors) and (2) one non-T8142 Mac (e.g. T8132 or T6041) on the shared 50 Hz path confirming no regression.
Checked:
- Full diff, 4 commits, mergeability against
main, DT bindings (apple,aop-motion.yaml,apple,aop-devmotion.yaml,apple,t8152-aop.yaml),t8142-j815.dts,aop_motion.rsOF-table protocol dispatch, and pre-PR checklist §1–§6. - Driver design (OF
IdInfoProtocoltable,rate_hz()forin_*_sampling_frequency, failingstart()on refused companion properties, best-effortstop()), §1 no model gating, §2 no cmdline/module params or race sleeps, §3 machine-supplied calibration, commit DCO (Nick <[email protected]>), and §6 naming are clean.
Evidence
- Fork PR:
m0d16l14n1/linux:j815/t8142-aop-motion->aurora-silicon/linux:main(no fork CI workflows triggered or approved). - Merge state:
mergeable: false,mergeStateStatus: DIRTYagainstmain5c2f6c56bbbc(conflict indrivers/iio/common/aop_sensors/aop_motion.rswith65ddaa0adccc). - CI at
be6bfcd339b5:dt-checksSUCCESS,host-testsSUCCESS (re-run needed after rebase ontomain, includingpr-text). - Loader dependency:
aurora-silicon/aura#306is merged (2026-11-20). - Commits audited:
f34690178f17,a187c625faed(superseded by65ddaa0adc),a773579a297b,be6bfcd339b5— all have human author/committer and humanSigned-off-by:with no attribution trailers. - Non-blocking:
Documentation/devicetree/bindings/soc/apple/apple,t8152-aop.yaml:115-118:devmotion6omitsunevaluatedProperties: false(compareaccel,gyro, andapple,t6041-aop.yaml).arch/arm64/boot/dts/apple/t8142-j815.dts:190-192:aop_accelomitslabel = "accel-base";(comparet8132-laptop.dtsi).
The M5 AOP firmware offers the accelerometer, gyroscope and devmotion6 services as T8132's does (J815 ADT iop-aop-nub accel and gyro, with their calibration in the same properties). Allow them as children of apple,t8142-aop and add their T8142 compatibles. Signed-off-by: Nick <[email protected]>
The M5's (T8142) accelerometer and gyroscope services take the calibration and the report interval and then never report. macOS 27.2.1 sends three more properties around the interval (from the AOP's message rings in a hypervisor trace of the MacBook Air 15" M5): 0x3d = 2 after the calibration and 0x16 = 1, 0x5c = 0 before the interval, and to stop, 0x16 = 0 and 0x5c = 0 before the zero interval. Send them to the M5 services, at 100 Hz, the interval macOS sends in the same trace. The protocol (interval, companion properties) is the match data of new apple,t8142-aop-accel and apple,t8142-aop-gyro entries in the OF table, so the next chip on this firmware generation only needs table entries, and in_*_sampling_frequency reports the rate the service was started at (100 on the M5, 50 elsewhere). A companion property the firmware refuses fails the start, as a refused interval does, with the status in the log; on the way to a stop they stay best effort. Other chips are left as they are. Tested on the J815 with an earlier version of this change that sent the properties to every service: both services report, |accel| about 1 g at rest, through direct reads (started on demand) and the buffer. Signed-off-by: Nick <[email protected]>
The J815 ADT lists the AOP's accel and gyro services, with their calibration in the same properties as on T8132 and T6041. Describe them, and devmotion6 (the firmware's orientation service), under the J815 AOP. The boot loader copies the calibration in (aura: "kboot: pass the AOP motion sensor calibration on T8142"); without it the services stay off. Signed-off-by: Nick <[email protected]>
be6bfcd to
0751534
Compare
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
@DjDeveloperr updated to J815 row at this head, with aura Still owed: a suspend/resume read on this head, and a T8132 row for the 50 Hz path. The two optional nits ( |
Signed-off-by: Nick <[email protected]>
|
Merge it please |
There was a problem hiding this comment.
Verdict: FINISH, then merge at 8c2b88cf2b2a
Blockers: Starting the T8142 service now mutates three settings before enabling reports. A later write can fail after an earlier setting was applied, or the interval can be applied with its reply lost. Both probe and regular start return on the first error without attempting stop, and the regular path still records the stream as inactive. Add best-effort rollback for a partial start and preserve the original error. Include cases for one companion succeeding before the next fails and for an applied interval with a lost reply.
Checked: The new compatible-specific match data keeps the legacy 50 Hz path separate, and the companion writes now live in the report start/stop callbacks. The current J815 receipt predates the merge head. Please post exact-head resume/read and legacy 50 Hz regression evidence, and close the remaining binding items listed in the PR description.
Evidence
Inspected the exact source paths for start, probe, buffer enable and regular stream synchronization. The stream becomes active only after every start write returns success.
An M5 (T8142) start writes three companion properties and then the interval. A write could fail after earlier ones were applied, or the interval could be applied with its reply lost; both the probe check and a regular start returned on the first error without a stop, while the stream was recorded as stopped. start_or_undo() makes the writes in order and, on the first failure, stops the reports best effort (the stop's companion properties, then the zero interval, each only logged) and returns that first error. The 50 Hz services without companion properties get the same undo of their single interval write. Host tests cover a companion taken before the next is refused, an interval applied with its reply lost, the legacy single write and a clean start; dropping the undo fails three of them. Signed-off-by: Nick <[email protected]>
The T8142 AOP's devmotion6 child refers to the devmotion binding like the accel and gyro children do, but unlike them did not close it to other properties. Add unevaluatedProperties: false, as for its siblings. Signed-off-by: Nick <[email protected]>
The J815's accelerometer sits in the base, as on the T8132 and T604x laptops, which label theirs "accel-base" for user space. Signed-off-by: Nick <[email protected]>
|
Addressed at
Still owed: a J815 row at this head with a suspend/resume and a read after it (next). The legacy 50 Hz row needs a T8132 machine, which we don't have; anyone with an M4 Air who can run a read at this head would close it. |
There was a problem hiding this comment.
Verdict: HOLD at bff52f0e for the current hardware evidence. The partial-start source blocker is resolved.
Checked: A failed companion or interval write now triggers all applicable stop writes and a zero interval on a best-effort basis. The caller receives the original start error, and a failed stop companion cannot skip the zero interval. All 14 exact-head host cases passed independently, including the failed second companion and interval applied with lost reply. The updated devmotion child closes unevaluated properties, and the accelerometer label follows the existing base-sensor convention. The owner reports a clean binding check and no new DTB warnings.
The J815 receipt predates the rollback fix. Retain the exact-head J815 suspend/resume and post-resume read plus a non-T8142 50 Hz regression, or maintainer disposition for the missing evidence.
There was a problem hiding this comment.
Verdict: MERGE at bff52f0ee04c
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: A failed companion or interval write now triggers all applicable stop writes and a zero interval on a best-effort basis. The caller receives the original start error, and a failed stop companion cannot skip the zero interval. All 14 exact-head host cases passed independently, including the failed second companion and interval applied with lost reply. The updated devmotion child closes unevaluated properties, and the accelerometer label follows the existing base-sensor convention. The owner reports a clean binding check and no new DTB warnings.
The J815 receipt predates the rollback fix. Retain the exact-head J815 suspend/resume and post-resume read plus a non-T8142 50 Hz regression, or maintainer disposition for the missing evidence.
Follow-ups (not blocking): exact-head J815 suspend/resume read row, non-T8142 50 Hz regression or maintainer disposition
|
Merging at |
What: accelerometer and gyroscope on the M5 (T8142) AOP, enabled on J815. The T8142 services need the report properties macOS sends, at 100 Hz; their protocol is the match data of new
apple,t8142-aop-accel/-gyroOF entries. Rebased ontomain's calibrate-once / idle-stop rework. A start that fails part-way is undone (review), and the two binding/DT nits are in.Tested: host tests
apple/aop-motion14/14 atbff52f0ee04c(4 new start/undo cases; dropping the undo fails 3); the kernel builds with it (Rust, LLVM);apple-dt-check.sh: 141 DTBs, 0 new warnings,apple,t8152-aop.yamlbinding check clean. J815 (MacBook Air 15" M5) at0751534fadac, before the undo with auramain(calibration copied in, aura#306): accel and gyro 5/5 direct reads, |accel| 1.001-1.003 g at rest,in_*_sampling_frequency100 Hz matching the report rate, buffer 4800 B in 2 s. Regression at boot: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors.Risk: two-way door. T8142 machines only, through the new compatibles; other chips match
apple,aop-accel/-gyroas before (50 Hz, no companion properties).Not yet: a J815 row at
bff52f0ee04cwith a suspend/resume cycle and a read after it; a non-T8142 row (T8132 Air, 50 Hz path), which no one here has.Details
0x3d = 2after the calibration, then0x16 = 1and0x5c = 0before it. To stop, it sends0x16 = 0and0x5c = 0before the zero interval. These come from the AOP's message rings in a hypervisor trace of the J815.in_*_sampling_frequencyreports the rate the service was started at (100 on the M5, 50 elsewhere).start_or_undo()is shared with the host test.unevaluatedProperties: falseon the T8142 AOP'sdevmotion6, as on its siblings.label = "accel-base"on the accelerometer, as on the T8132 and T604x laptops.Changed on this head: rebased onto
main.main's 65ddaa0 already has the debug-level "kept calibration" line, so that commit is gone. The companion properties now sit instart_reports()/stop_reports()ofmain's split, and the probe checks once that the service accepts the calibration and the interval.Evidence
J815, macOS 27.2 stub, aura
main508390223 as the boot loader, this head merged with the other J815 PRs into one test kernel onmain2943fff.accel+gyro direct reads 5/5, sampling_frequency 100/100 Hz, buffer 4800 B in 2 s.