Skip to content

A7 (J85) camera: questions on the ISP DART before enabling it #466

Backlog

Description

@Etienne-T

I'm looking at the cameras on an iPad mini 2 Wi-Fi (J85, S5L8960X). Nothing camera-related is enabled yet. Before I describe the ISP DART in the device tree, I'd like to check a few points I couldn't settle from the ADT and the current drivers.

What I've measured on the device so far, with read-only accesses:

  • ISP, ISPSENS0 and ISPSENS1 are off under Linux (off-0 in genpd, PMGR words 0x300, 0x4000200, 0x4000200). With isp: Skip ISP power-up and ISP DART setup on A7 m1n1#20, they also stay off from m1n1 to Linux.
  • The four sensor pins (sensor_shutdown/sensor_extclk, and the second pair: pins 88, 89, 92, 93) are GPIO outputs driven low, with PERIPH = 0. No pinctrl user claims them.

From the J85 ADT (iOS 12.5.8, 16H88), dart-isp has two register windows (0x205b22000 and 0x205b24000, smmu-present = 1) but only one interrupt (AIC 40). The fault reflector is 0x20ffff000 for both windows, the same value as dart-scaler and dart-jpeg.

  1. Interrupt. Does an SMMU fault with no DART fault also raise AIC 40, and is the line level-triggered? If so, would a variant with two reg entries and one interrupt (for example apple,s5l8960x-isp-dart, falling back to apple,s5l8960x-dart) be acceptable in the binding and in apple-dart.c (OrchardLinux/linux)?
  2. Fault reflector. What block sits at 0x20ffff000? Is it safe to keep this value for both windows, as the A8 display and PCIe DARTs already do?
  3. Stream IDs. Which H6 masters use SIDs 0 to 3? Can any ISP master bypass the DART? The ADT has no-fault-clients = 8 (SID 3?). Does anything in Linux or m1n1 read it?
  4. Quiescing the H6. When the ISP domain is powered on, is there a known way on A7 to keep the H6 CPU and its DMA masters stopped until the DART is set up? Is there a status bit that shows they are stopped? Which domains and clocks are needed before the H6 revision register can be read?
  5. Existing camera work (media: apple-h4isp: Add front and rear camera capture on the iPhone 5 linux#66, iPhone 7: the rear and front cameras linux#86, the iPhone 6 ISP series in ITSMEFRTRUST/linux-on-iphone6): before your first ISP register access, what power, reset and DART states did you start from? Did you see the firmware do anything on its own before the IPC tables were set up? And how would you like A7 support split: DART, PMGR, then the ISP driver?

Thanks. I can run read-only checks on the J85 if that helps.

Activity

  1. hyorman commented on Dec 2, 2026

    @hyorman

    I have a J85 too (iPad mini 2 Wi-Fi, A1489) and I'm happy to test.

    • Omarchy A 0.4.6, kernel 7.3.0-rc1-orchard-apple-4k, tethered boot from a Mac.
    • iPadOS 12.5.8 (16H88) is still installed next to Linux, so the camera firmware is on the device.
    • I can run read-only checks, test kernels/modules and capture tests, and report the output. Each test kernel needs a cold DFU boot, so a few attempts per session work best.

    Let me know what you'd like run.

  2. henrikklee commented on Dec 2, 2026

    @henrikklee
    Contributor

    Thanks @Etienne-T, this is careful groundwork, and exactly the right order: DART first. I checked our kernel (OrchardLinux/linux main at c4800ea) and the 16H88 IPSW device trees. Short version: no new compatible is needed. The A7 ISP DART is the hardware the existing apple,s5l8960x-dart type is named after, and the driver already handles its layout (DART and SMMU windows, one interrupt).

    Evidence

    • dart-isp is the same on every A7 board I checked (J85, J71, N51, J85m): compatible = "dart,s5l8960x", reg 0x205b22000 (size 0x2000) and 0x205b24000 (size 0x4000), AIC 40, smmu-present = 1, no-fault-clients = 8, fetch-config = 0xe0000, diag-config = 0x100, reflector 0x20ffff000 for both windows. One mapper-isp child, reg 0.
    • The iPhone 7's dart-isp (D10 ADT) has the same layout: dart,t8010 then dart,s5l8960x, two windows, one interrupt, smmu-present, no-fault-clients = 8, one mapper with reg 0. iPhone 7: the rear and front cameras linux#86 merged it as "apple,t8010-dart", "apple,s5l8960x-dart" with reg-names = "dart", "smmu" and a single interrupt (dart_isp in t8010.dtsi) for the rear and front cameras.
    • In drivers/iommu/apple-dart.c, probe treats an smmu window with no smmu interrupt as "the DART's interrupt covers the SMMU too (dart-isp)". apple_dart_s5l8960x_irq() falls through to the SMMU error register when the DART error flag is clear. The reflector is written to both windows, and SMMU stream enable follows the DART's.
    • The 0x2000 DART window is fine. Probe needs at least 0x2000, and the S5L8960X registers end with the TTBRs at 0x40.
    • Power: in the A7 ADT, dart-isp's power gate 0x6d is the PMGR entry ISP_DART. It has no state register of its own, and its parent is ISP (0x18), which is ps_isp at 0x201d0. So power-domains = <&ps_isp> comes straight from the ADT.

    What to add, in arch/arm64/boot/dts/apple/s5l8960x.dtsi, so every A7 board gets it:

    /*
     * The camera ISP's DART and the SMMU in front of it (ADT dart-isp,
     * the same on every A7 board); the DART's one interrupt covers both.
     */
    dart_isp: iommu@205b22000 {
    	compatible = "apple,s5l8960x-dart";
    	reg = <0x2 0x05b22000 0x0 0x2000>,
    	      <0x2 0x05b24000 0x0 0x4000>;
    	reg-names = "dart", "smmu";
    	#iommu-cells = <1>;
    	interrupt-parent = <&aic>;
    	interrupts = <AIC_IRQ 40 IRQ_TYPE_LEVEL_HIGH>;
    	power-domains = <&ps_isp>;
    	apple,runtime-pm;
    	apple,error-reflector = /bits/ 64 <0x20ffff000>;
    	apple,fetch-config = <0x000e0000>;
    	apple,diag-config = <0x00000100>;
    	status = "okay";
    };
    

    The DART is on-chip on every A7, so it is on for all of them. Later, the ISP node goes in s5l8960x.dtsi too (ADT isp, compatible = "isp,s5l8960x", reg 0x205b00000/0x500000, AIC 36-39), with iommus = <&dart_isp 0>, <&dart_isp 1>, <&dart_isp 2>, <&dart_isp 3> as on the A10. The sensor pins and supplies go in the model files (s5l8960x-mini2.dtsi for J85/J86/J87, then mini3, air1 and 5s).

    One binding fix belongs in the same PR. apple,dart.yaml still says that two reg entries need two interrupts and interrupt-names, while its description (and the A10 ISP DART already on main) allows one interrupt. Please relax that rule so interrupt-names and a second interrupt are needed only when the SMMU has its own interrupt.

    Your questions, as far as we know

    1. Interrupt: AIC 40, level-high like every DART interrupt in our trees. On the A10 the one-interrupt setup is in use. Nobody has confirmed on an A7 that an SMMU-only fault raises AIC 40, so that is the first thing to prove once the ISP is powered.
    2. Reflector: we have no name for the block at 0x20ffff000. It is the ADT's value, and the same value iOS gives dart-scaler, dart-jpeg and the A8 display DART (t7000.dtsi). Using it for both windows is what the driver already does.
    3. Stream IDs: the ADT has one mapper, SID 0. Which H6 masters use SIDs 1-3 isn't known. The A10 binds all four to the ISP, so nothing goes untranslated, and I'd do the same. Nothing in our Linux or m1n1 reads no-fault-clients.
    4. Keeping the H6 stopped: we have no A7 data. On the A10, the ISP's CPU control register reads 0 (stopped) after power-on, and the firmware runs only when the driver writes "run" (t8010_isp.c, which also stops a CPU it finds running). For the A7, please take the order and the "stopped" bit from iOS 12's AppleH6CameraInterface before powering anything, not from trial and error.
    5. Split: (a) the DART node and binding fix (small, can be checked on its own: it probes and its registers read sensibly); (b) the ISP driver, the ISP node and the board wiring. No PMGR PR is needed: ps_isp, ps_ispsens0 and ps_ispsens1 are already in s5l8960x-pmgr.dtsi and match the ADT. The H4 driver for A5/A6 (docs: record J86 iPad mini 2 RAM bring-up evidence #66) programs an older IOMMU itself, so for the A7 the model is mtd: discover PPN geometry and harden NAND reads #86.

    PR flow

    • Kernel: a branch and PR against OrchardLinux/linux main, upstream-style commits (one topic each: binding, dtsi, later the driver) with your Signed-off-by. Never kernel patch files in orchard.
    • Device data: once the kernel side lands, we move orchard's kernel lock and update camera in devices/<board>/device.toml for the A7 boards, plus the bring-up notes, in an orchard PR. Every result you or @hyorman report gets recorded there.

    @hyorman, thank you for the second J85, that helps a lot. A good first read-only check, on your normal Omarchy A boot with nothing loaded: repeat Etienne's measurements, so we know they hold on a second unit and aren't board-specific:

    uname -r
    sudo grep -iE 'isp' /sys/kernel/debug/pm_genpd/pm_genpd_summary
    # PMGR state words for ps_isp, ps_ispsens0, ps_ispsens1 (read only), the same way Etienne read them:
    #   0x20e0201d0  0x20e020130  0x20e020138

    Please post the output here. Nothing in that powers anything on. Once the DART PR exists, a test kernel with it (probe messages and the first DART/SMMU register reads, ISP still off) would be the next step.

  3. Etienne-T commented on Dec 3, 2026

    @Etienne-T
    ContributorAuthor

    Thanks @henrikklee. The DART node and the binding fix are in OrchardLinux/linux#128, as two commits on main. The PR asks whether a first J85 RAM boot with it is fine before the A7 H6 power-up sequence is known.

  4. henrikklee commented on Dec 4, 2026

    @henrikklee
    Contributor

    OrchardLinux/linux#128 is merged, thanks @Etienne-T. The A7 ISP DART node is in for every A7 board but stays disabled for now, so a normal boot doesn't power the ISP. It gets switched on together with the ISP node in the camera PR. The answer to your question about a first J85 test is in the merge comment: OrchardLinux/linux#128 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions