Skip to content

arm: apple: import the J713 ISP handoff - #34

Merged
RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
erikwb:j713/isp-import
Nov 6, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
erikwb:j713/isp-import

Conversation

@erikwb

@erikwb erikwb commented Nov 6, 2026

Copy link
Copy Markdown

Companion to aurora-silicon/aura#84. On the J713 the boot loader hands the camera (ISP) firmware over to the OS. It fills the control tree's empty isp-firmware-text/isp-firmware-data placeholders from the ADT, sets the ISP's apple,platform-id, and enables the ISP and its DARTs. On J713 the kernel gets its per-kernel tree through the J713 importer. The reservations reached it through the reserved-memory copy, but the platform ID and the enables didn't, and the importer refused the empty placeholders.

Change

  • New import step (j713_isp): it copies apple,platform-id to the OS tree's ISP, enables its DARTs, and enables the ISP last.
    • It acts only when the OS tree's ISP is disabled, the control tree's ISP is enabled with a nonzero platform ID and maps to it, and both OS placeholders received a reservation (nonzero reg, status = "okay", iommu-addresses owned by the OS ISP).
    • Otherwise the OS tree's ISP stays disabled and the boot goes on, since the camera is optional.
    • An OS tree whose ISP is already enabled reserves its own firmware and is left alone.
  • Reservations:
    • The reserved-memory copy skips the placeholders the boot loader left empty (no reg, or a zero one), so a refused handoff no longer fails the whole import.
    • It also skips the isp-heap window, which has no memory of its own.
    • An OS tree without the ISP owns none of its reservations, so their mappings are left out, as for an omitted AOP.
  • Host test: test_j713_isp_handoff covers:
    • a handoff: platform ID, ISP and DARTs enabled, reservations with their owner tuples pointing at the OS ISP;
    • a refused handoff (empty and zero placeholders), which must not refuse the import (fault 48);
    • an OS tree whose ISP is already enabled (49);
    • a malformed platform ID (50);
    • a control tree without the ISP (51);
    • an OS tree without the ISP.

Depends on

Testing

  • Host: test/py/tests/test_apple_j713_fdt.py: 9 passed, 1 skipped (private_captures). checkpatch is clean.
  • Build: apple_m1_defconfig (with CONFIG_APPLE_J713_FDT=y) and apple_j873_defconfig build with -Werror.
  • Hardware: on a J713 with this import, the aura handoff and #531's DT:
    • the kernel reserved this boot's firmware segments, with platform ID 0x17 and the ISP and its DARTs enabled;
    • the camera streamed 1920x1080, then started again at 1280x720;
    • the external DCP and speaker amp imports worked as before (tested together with arm: apple: import the J713 speaker amps configuration #33).

developed and tested by Claude (Anthropic), working with me on the J713

aura can hand the J713's camera firmware over to the OS: it fills the
control tree's empty isp-firmware-text and isp-firmware-data
placeholders from the ADT, sets the ISP's apple,platform-id and enables
the ISP and its DARTs. The reservations reach the OS tree's placeholders
of the same names through the reserved-memory copy. Carry the platform
ID over to the OS tree's ISP and enable its DARTs, then the ISP itself.

Skip the placeholders aura left empty, and the heap window, which has
no memory of its own, in the reserved-memory copy. An OS tree without
the ISP owns none of its reservations: leave their mappings out, as for
an omitted AOP. An incomplete handoff leaves the OS tree's ISP disabled
rather than refusing the boot for an optional camera, and an OS tree
whose ISP is already enabled reserves its own firmware and is left
alone.

Signed-off-by: Erik Bourget <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge train (MTR, 06/11): merging. Review: everything is in the J713 importer (j713_fdt.c), which only runs for the J713 per-kernel tree. The new step only enables the OS ISP when both placeholders got a reservation from the loader and the control ISP carries a nonzero platform ID; otherwise the camera stays off and the boot goes on. CI build is green, and test_apple_j713_fdt.py gives 9 passed, 1 skipped (base 8/1). This completes the J713 camera handoff with linux#531 and aura#84, both merged. We have no J713, so the hardware proof is your boot where the kernel reserved TEXT and DATA and streamed 1080p and 720p.

@RyanTheTide
RyanTheTide merged commit 0c8f416 into aurora-silicon:aurora-wip Nov 6, 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