Skip to content

[Joshua's agent] iio: aop_als: arm the VD6286 with the CT817 property sequence - #1929

Open
joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:w86/als-vd6286-arm
Open

joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:w86/als-vd6286-arm

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Status note: the head moved to 05bf748 on 2026-11-18 (rebased onto integration/aurora 0abc2f3); CI is rerunning at that head. Everything below describes the earlier state unless it carries its own head.

On the 14-inch M5 Max MacBook Pro (T6050) the ambient light sensor reports as a VD6286 ("Redbird") and takes the VD6286 path in enable_als. That path sends the calibration blob and the report interval, and nothing else.

What a debug build measured on the M5 Max, kernel 7.3.0:

  • The calibration property (193 bytes) and the interval property both returned status 0.
  • A trace at the top of the EPIC report branch in handle_ipc, before any dispatch, logged every report on the ALS endpoint. The only one was the 0xc0 service announce. No data report (0xc4) arrived.
  • Every read of in_illuminance_input returned ENODATA (31 of 31 over three minutes).

So the sensor is never armed; the report parser never sees data.

macOS runs this sensor with a batch interval of 1 and a verbosity of 6 (from its IORegistry). Those are the values the CT817 path already writes before its interval, and the CT817 comment says why: the sensor accepts the zero to non-zero interval transition only after its batch and raw interval properties are written.

The change sends that sequence (verbosity, batch interval, raw interval, then interval) for every sensor, after the calibration blob on the VD6286. The MODE (0xd7) and 0xe4 properties stay out, as before.

Risk: the M4 Pro VD6286 now gets the same three writes before its interval. I have not run it on an M4 Pro.

Test plan (14-inch M5 Max MacBook Pro):

  1. Boot a build with this commit and the calibration file installed.
  2. Check that the ALS endpoint now sends data reports (subtype 0xc4) after the interval write.
  3. Read in_illuminance_input and in_colortemp_input for 3 minutes: no ENODATA, and the lux value follows a light change (cover the sensor, then a lamp).

Status: compile-checked (rustc 1.93, clang 22). Not yet booted. I will post the boot result here.

Validated on, and reach

Validated on: Measured on a 14-inch M5 Max MacBook Pro (K114c, T6050), kernel 7.3.0 debug build: calibration and interval properties returned 0, only the 0xc0 announce arrived, and 31 of 31 illuminance reads returned ENODATA. The fix itself: see the test plan in the body.

Applies beyond the M4: The change sends the CT817 property sequence for every sensor. The M4 Pro VD6286 now gets the same three writes before its interval; that was not run on an M4 Pro.

m tester run (omarchy-m-testing.org): feature rows Always-on processor (AOP: ambient light sensor, lid angle). The tester needs the hardware; no tester run is linked to this change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T20:09:16.928465Z
We couldn’t complete this review. Comment @codex review to try again.
eaa3076 PR opened
🔒 Security Review ❌ Failed 2026-11-14T20:09:21.602784Z
We couldn’t complete this review. Comment @codex security review to try again.
eaa3076 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Hardware result on the 14-inch M5 Max MacBook Pro (comb4e image, this PR's arming sequence): FAIL.

  • MEASURED: calibration 0x0b and interval 0x00 return status 0. Verbosity 0xe1, batch 0x16 and raw 0x5c return 0xe00002e2 (not permitted).
  • MEASURED: the AOP sends one service announce per endpoint and no ALS data reports. in_illuminance_raw returns ENODATA.
  • MEASURED from the macOS kernel: the VD6286 driver uses the generic SPU HID driver path. It sends batch, raw and interval in that order, keeps only the interval status, does not send verbosity by default, and sends the interval again at each power-on.

Do not merge this PR as it is. A follow-up probe drops 0xe1 on the VD6286, re-arms the interval like a power-on, and requests the HID descriptor last. This PR gets updated after that boot result.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Boot result on the 14-inch M5 Max MacBook Pro (comb4y image): the ALS test did not run. The AOP firmware crashed during boot, before the arming sequence.

  • MEASURED: the AOP announced all its channels, including dcp-control. About 3 ms later it logged RTKit: Message to undiscovered endpoint 0x01, then co-processor has crashed and AOP firmware crashed.
  • MEASURED: at 9.19 s two EPIC calls timed out after 5000 ms, and dcp-control buffer 0x11fd8cd0000+0x8000 returned ETIMEDOUT. The ALS probe failed with -110 and the AOP audio probe failed with -22. No iio device came up.
  • MEASURED: this image adds a boot-time reserved memory region for the AOP dcp-control buffer. The earlier image loaded the AOP driver late, without that region, and the AOP did not crash. On that image, calibration 0x0b returned status 0.
  • INFERENCE: the crash is in the new boot-time dcp-control path, not in the arming change in this PR. This boot does not test this PR.

This PR stays unmerged. The next boot result goes here after the dcp-control crash is fixed.

m0d16l14n1 added a commit to m0d16l14n1/linux that referenced this pull request Nov 15, 2026
joshuaswarren: [Joshua's agent] iio: aop_als: arm the VD6286 with the CT817 property sequence
On the 14-inch M5 Max MacBook Pro (T6050) the VD6286 accepts the
calibration and the report interval with status 0 and then sends no
data report: every EPIC report on its endpoint after probe is the
service announce, and every read of in_illuminance_input returns
ENODATA.

macOS runs this sensor with a batch interval of 1 and a verbosity of
6, the values the CT817 path already writes before its interval. Send
that sequence for every sensor, after the calibration blob on the
VD6286, so the zero to non-zero interval transition arms it.
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