Skip to content

arm64: dts: apple: t600x, t8112: describe the AOP motion sensor on every laptop - #2248

Closed
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
spec12/aop-motion
Closed

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
spec12/aop-motion

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The AOP accelerometer and gyroscope were described only on the J316s and J413 (165f4bd, 0064b75), because those were the two machines whose device trees were at hand. Their sibling laptops have the same AOP service but get no motion sensor.

Change

Move the accel and gyro children from t6000-j316s.dts and t8112-j413.dts to t600x-j314-j316.dtsi and the AOP node in t8112.dtsi. This reaches the J314s, J314c and J316c (M1 Pro/Max MacBook Pro) and the J415 and J493 (M2 laptops). The J473 (M2 mini) gets them under its disabled AOP node, where they do nothing. T8103, T602x and the desktops are not touched.

Testing

  • dtc before/after: the J316s and J413 DTBs are byte-identical. J314s, J314c, J316c, J415, J493 and J473 gain only the two nodes. J375c, J375d, J293 and J313 are unchanged.
  • The sensor appears only where the hardware has it. aop.rs (register_service) creates the device only when the firmware announces the service. aop_motion.rs starts it only with the calibration m1n1 copies from the ADT; without that it logs one info line and returns -ENODEV.

Still to run

  • J316s and J413: aop-sensors-accel and aop-sensors-gyro still listed in /sys/bus/iio/devices/*/name.
  • J314s, J314c, J316c, J415, J493 owners: the same two devices appear.

Assisted-by: LLM (Claude:Opus 5.5)

…ery laptop

The AOP accelerometer and gyroscope children were described only in
t6000-j316s.dts and t8112-j413.dts, the two machines whose Apple device
trees were at hand. The other 14" and 16" M1 Pro/Max MacBook Pros
(J314s, J314c, J316c) and the other M2 laptops (J415, J493) share the
same AOP and are left without them.

Nothing in the description is board specific. The AOP core creates a
service device only when the firmware announces the "accel" or "gyro"
service, and gives it the AOP child of the same name. The driver then
starts the sensor only with the calibration the bootloader copies into
that child from the Apple device tree, and returns -ENODEV with one
info line otherwise. On a machine without the sensor the child stays
unused.

Move the children to t600x-j314-j316.dtsi, next to the AOP enable of
every M1 Pro/Max laptop, and to the AOP node in t8112.dtsi, next to the
las and als services that are already there. The T8112 Mac mini (J473)
keeps its AOP disabled, so the children are inert there.

The J316s and J413 DTBs are byte-identical before and after.

Fixes: 165f4bd ("arm64: dts: apple: describe reference Mac motion and peripheral endpoints")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 1.

  1. Commit dc1465a ends with Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>. Drop that trailer and keep the human Signed-off-by. The PR body's Assisted-by: line already covers the help.

Otherwise this is sound. The children stay inert on a machine that lacks the sensor:

  • The AOP core creates a service device only for a service the firmware announces (register_service(), drivers/soc/apple/aop.rs:1608).
  • aop_motion.rs:145-152 returns ENODEV with one info line when a calibration property is missing.
  • The loader copies *-range-intr-cal, *-nominal-extr-cal and *-range-extr-cal into whichever accel/gyro child the OS AOP node has. It does this for any SoC, with no board list.

The J473 keeps &aop disabled. The J316s and J413 nodes move without changes, and the merged tree has exactly one copy of each child per AOP. The merge onto integration is clean, and dt-checks and host-tests pass.

Nit: drop the Fixes: tag. Describing the sensor on more boards is new hardware support.

HW row: optional, not needed to merge. On this head, J316s and J413 still list aop-sensors-accel/aop-sensors-gyro under /sys/bus/iio/devices/*/name. Owners of J314s/J314c/J316c/J415/J493 see the same two devices with changing samples. 0 AVC, 0 failed units, no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Replaced by #2793: the same changes with the commit trailers fixed, on the current integration/aurora.

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