Skip to content

crypto: apple: T8142 (M5) SIO AES engine, enabled on J815 - #1905

Merged
RyanTheTide merged 5 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-aes
Nov 22, 2026
Merged

RyanTheTide merged 5 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-aes

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Enables the M5's (T8142) SIO AES engine on both M5 MacBook Airs (J813, J815). The driver already handles revision 5 (#1622), so this adds the T8142 compatible, the DT nodes and the enables.

From the J815 ADT (/arm-io/aes, aes,s8000, aes-version 5):

  • The same three register windows as T8140: engine 0x3a500c000, shared control 0x3882dc000, auxiliary control 0x388078000.
  • IRQ 1246, DART-SIO stream 1 (mapper-aes).
  • Power state: PMGR device AES (id 96, +0x3a0) under SIO (id 66, +0x2b0). SIO is owned by its firmware, so ps_sio is apple,firmware-owned. The SIO DART gets ps_sio as its power domain.

Commits: binding → driver match (apple,t8142-aes → revision 5 data) → T8142 nodes (disabled) → enables in t8142-j813-j815.dtsi.

Changed on this head (review): the four enables moved from t8142-j815.dts to the shared t8142-j813-j815.dtsi, because the engine is part of the SoC and the J813 has no board-specific wiring for it. The J813's DTB therefore changes, and it has no row yet. Rebased onto integration/aurora cc14570.

The engine registers at priority 150, below the CPU's aes-ce, so it is used only when asked for by driver name, as on the J616s and J700.

Tested on J815 (MacBook Air 15" M5), macOS 27.2 stub, on the earlier head (same driver and nodes):

  • apple-sio-aes-crypto 3a500c000.crypto: AES engine rev 5 ready (readiness 0x01023f80, 42-bit DMA, ECB/CBC/CTR, priority 150)
  • /proc/crypto: ecb-aes-apple-sio, cbc-aes-apple-sio, ctr-aes-apple-sio, all selftest: passed.
  • SIO DART: version 0204, 16 streams, AS 42 -> 42.

Checks on this head: W=1 adds no warnings in drivers/crypto/ at any commit, the J813 and J815 DTBs build, dt_binding_check and CHECK_DTBS with apple,aes.yaml are clean on both, and checkpatch --strict is clean.

Still owed (HW rows): J815 and J813 on this head with the default command line: /proc/crypto lists the three algorithms with selftest: passed; then one s2idle cycle and modprobe -r apple-aes && modprobe apple-aes, and the self-tests pass again. This checks that the SIO firmware brings the engine's domain back after a sleep, since ps_sio is firmware-owned. Pass also needs 0 SIO DART faults, 0 failed units and 0 new kernel errors.

Part of the J815 bring-up: board results are summarised in discussion #135.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr ready for review: rev 5 engine on the J815 (27.2 stub), ecb/cbc/ctr-aes-apple-sio self-tests pass. Green and mergeable.

Assisted-by: Claude Opus 5.5

@m0d16l14n1
m0d16l14n1 force-pushed the j815/t8142-aes branch 2 times, most recently from 0529692 to 02b9425 Compare November 20, 2026 23:05
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Rebased onto current integration/aurora (b4cd7b3e15f4). The new head is 02b9425c and it is mergeable again.

  • Conflict: one, in t8142-peripherals.dtsi. Integration added the ProRes ps_scodec power domain (0x2c0) where this PR adds ps_sio (0x2b0) and ps_aes (0x3a0). All three nodes are kept, and the AES commits are otherwise unchanged:
    • the binding, driver and J815 enable commits are patch-id identical;
    • the SoC DTS commit only resolves that hunk.
  • Checks:
    • checkpatch --strict 0/0/0 on all four commits;
    • drivers/crypto/apple-aes.o builds with W=1 and no warnings;
    • the J815 and J813 DTBs build, and the J815 one has aes okay under sio.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 1.

The driver match (drivers/crypto/apple-aes.c:709) and the binding entry are consistent with the T8140 rev-5 data. The DT nodes carry the ADT windows, IRQ 1246 and DART-SIO stream 1, ps_aes sits under the firmware-owned ps_sio, and the SIO DART now has that power domain (arch/arm64/boot/dts/apple/t8142-peripherals.dtsi:70-92, 617-637).

  1. All four commits carry Assisted-by: Claude Opus 5.5 above the Signed-off-by. Commits should hold only the human sign-off, so drop that trailer. The PR body's last line should then read Assisted-by: LLM (Claude:Opus 5.5).
  2. arch/arm64/boot/dts/apple/t8142-j815.dts:523-541 enables ps_sio, ps_aes, sio_dart and aes on the J815 only. The engine belongs to the T8142, and t8142-j813.dts includes the same t8142.dtsi and t8142-j813-j815.dtsi, so the J813 has the same block and no board-specific wiring. Move the four enables into t8142-j813-j815.dtsi, next to the other shared enables, so both Airs get the engine, and add a J813 run.
  3. Because ps_sio is apple,firmware-owned, apple_pmgr_ps_power_on()/_off() return early for it (drivers/pmdomain/apple/pmgr-pwrstate.c:419, 437). After a sleep, the engine therefore works only if the SIO firmware has its domain up again. The self-tests run once, at registration, so the current evidence does not cover that. Please add the post-resume check below.

HW row: J815 and J813 on this head with the default command line. /proc/crypto lists ecb/cbc/ctr-aes-apple-sio with selftest: passed. Then one s2idle cycle, modprobe -r apple-aes && modprobe apple-aes, and the self-tests pass again. Pass also needs 0 SIO DART faults, 0 failed units and 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

The M5's SIO AES engine is the T8140 one (ADT aes-version 5, the same
three register windows). Add its compatible.

Signed-off-by: Nick <nekreshen@yandex.ru>
The J815 ADT describes the M5's SIO AES engine as revision 5 with the
T8140's register windows, so match apple,t8142-aes to the revision 5
data.

Signed-off-by: Nick <nekreshen@yandex.ru>
From the J815 ADT: /arm-io/aes (aes,s8000, aes-version 5) with the engine,
shared control and auxiliary control windows at 0x3a500c000, 0x3882dc000
and 0x388078000, IRQ 1246, on DART-SIO stream 1 (mapper-aes). Its power
state is PMGR device AES (id 96, +0x3a0) under SIO (id 66, +0x2b0), which
the SIO firmware owns. Add both power states and the engine, disabled,
and give the SIO DART its power domain.

Signed-off-by: Nick <nekreshen@yandex.ru>
Enable the SIO AES engine and its SIO DART and power states on both M5
MacBook Airs. The engine is part of the T8142, and the J813 includes the
same SoC description with no board-specific wiring for it. The engine
registers below the CPU's aes-ce, so it is used only when asked for by
driver name.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@RyanTheTide done.

  • The trailers are dropped.
  • The four enables moved into t8142-j813-j815.dtsi, so the J813 gets the engine.
  • Rebased onto cc14570.
  • dt_binding_check and CHECK_DTBS with apple,aes.yaml are clean on J813/J815.

HW rows owed: the J815 and J813 self-tests, then s2idle + modprobe -r/modprobe with the self-tests again.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-review of 8cc2127: No blockers.

Earlier points: 1 (commit trailers) resolved: all four commits carry only the human Signed-off-by. 2 resolved: the ps_sio, ps_aes, sio_dart and aes enables are now in arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi:393-411, so both Airs get the engine. 3 (the engine's domain after a sleep, since ps_sio is firmware-owned) is still open as evidence only; the code has no change to make for it.

Since the last review only the enables moved and the branch was rebased; the binding, the driver match (drivers/crypto/apple-aes.c:709) and the SoC nodes are unchanged.

Nit: the title still says "enabled on J815"; it is now both J813 and J815.

HW row: J815 and J813 on this head with the default command line: /proc/crypto lists ecb/cbc/ctr-aes-apple-sio with selftest: passed; then one s2idle cycle, modprobe -r apple-aes && modprobe apple-aes, and the self-tests pass again. Pass also needs 0 SIO DART faults, 0 failed units and 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train note: #1806 (same board, J815 DP alt-mode) landed on integration/aurora in batch 1 (tip 606d37e) and now conflicts with this branch in arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi. Our review here is still no blockers. Could you merge integration/aurora into the branch (or rebase onto a new branch, no force push needed)? It goes into the next batch once it is clean and CI is green.

Signed-off-by: Nick <nekreshen@yandex.ru>

# Conflicts:
#	arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked at 73bb6dd. The merge's only resolution is in t8142-j813-j815.dtsi: the &jpeg1 block from integration/aurora stays, and the SIO AES block (&ps_sio, &ps_aes, &sio_dart, &aes) follows it unchanged. Against the current tip the branch adds exactly its 4 files (+61), the same commits reviewed before. Approving at this head.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@RyanTheTide merged integration/aurora (b241e35) into the branch, no force push: 73bb6dd9.

The only conflict was in t8142-j813-j815.dtsi, where both sides had appended blocks after &cpu9. Both are kept: integration's (cluster power gate, display power, encoder, ANE, JPEG), then the four AES enables. Against integration, the merge adds only those four nodes.

CHECK_DTBS on the J704/J813/J815 DTBs gives the same 4 warnings as integration/aurora itself (the existing disp0_piodma alias), none new.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide
RyanTheTide merged commit 4ac9958 into aurora-silicon:integration/aurora Nov 22, 2026
2 checks passed
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.

2 participants