Skip to content

media: apple: isp, arm64: dts: support 8-AMCC T6041 and NV12 LIM_RANGE - #2216

Open
astaff wants to merge 2 commits into
aurora-silicon:integration/aurorafrom
astaff:t6041/j616c-isp-camera
Open

astaff wants to merge 2 commits into
aurora-silicon:integration/aurorafrom
astaff:t6041/j616c-isp-camera

Conversation

@astaff

@astaff astaff commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Merge order: Please merge after #1954.

This branch starts from integration/aurora and merges cleanly on top of #1954 with zero conflicts.

Companion PRs:

Summary

This series enables apple-isp camera streaming on 8-AMCC T6041 (J616c, MacBook Pro 16" M4 Max), fixes NV12 quantization metadata, and exposes the detected camera sensor module name in sysfs:

  1. media: apple: isp, arm64: dts: support 8-AMCC T6041 and NV12 LIM_RANGE (4749bc96f242):
    • Add AMCC 6 (0x22c004000..0x22c1d62fc) and AMCC 7 (0x22e004000..0x22e1d62fc) filter ranges to &isp_dart0 in t6041.dtsi.
    • Add apple_isp_hw_t6041: count active AMCC ranges on isp_dart0 and size fw_mmio and DSID broadcast-clear windows to match, supporting both 6-AMCC binned and 8-AMCC full-die T6041 chips across >5 s runtime power-off and reopen cycles.
    • Set V4L2_QUANTIZATION_LIM_RANGE on NV12 in isp-v4l2.c to match P010, and update isp-v4l2-test.c.
  2. media: apple: isp: expose detected camera sensor name in sysfs (b4018aeb078d):
    • Expose a read-only sensor attribute on the apple-isp platform device (/sys/class/video4linux/videoX/device/sensor, documented in Documentation/ABI/testing/sysfs-driver-apple-isp) backed by canonical sensor module names in isp_setfiles[] (such as "imx958-uw" and "imx558").
    • Return -ENODATA prior to deferred camera startup so userspace (aurora-silicon/camera-denoise#14) can key low-light thresholds and framing capabilities on sensor identity rather than board lists.

Testing

  • ./scripts/checkpatch.pl --strict reports 0 errors, 0 warnings, 0 checks.
  • tools/asahi/run-host-tests.py --only isp-: 18 / 18 suites passed (including isp_test_sensor_names and isp_test_sensor_sysfs).
  • Hardware testing on J616c (M4 Max, 8 AMCCs) verifies NV12 and P010 capture at 1920x1080@30, runtime power-down and reopen (>6 s idle), and zero DART faults.

Still to do

  1. Have aurora-installer extract the sensor tuning file (apple/isp_2224_01XX.dat from /usr/libexec/appleh16camerad) into /lib/firmware/apple/ on first boot.

Enable camera support on full-die 8-AMCC T6041 parts (J616c) and fix NV12
quantization metadata:

- Add AMCC 6 (0x22c004000..0x22c1d62fc) and AMCC 7
  (0x22e004000..0x22e1d62fc) to &isp_dart0 in t6041.dtsi.
- Add apple_isp_hw_t6041 in isp-drv.c. The driver counts active AMCC ranges
  on isp_dart0 and sizes fw_mmio and DSID broadcast-clear windows to match.
  This supports 6-AMCC binned and 8-AMCC full-die T6041 chips across >5 s
  runtime power-off reopen cycles.
- Set V4L2_QUANTIZATION_LIM_RANGE on NV12 in isp-v4l2.c to match P010, and
  update isp-v4l2-test.c.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Expose a read-only 'sensor' sysfs attribute on the apple-isp platform
device (/sys/class/video4linux/videoX/device/sensor) backed by canonical
sensor module names in isp_setfiles[] (such as "imx958-uw" for the 12 MP
Center Stage ultra-wide IMX958 module and "imx558" for IMX558).

On hardware with deferred camera startup, sensor_show() returns -ENODATA
until the first stream detects the camera, then emits the detected sensor
identifier under video_lock so userspace services can select tuning and
framing capabilities by sensor property rather than per-board lists.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
@astaff

astaff commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Added a second commit (b4018aeb078d, media: apple: isp: expose detected camera sensor name in sysfs) exposing a read-only sensor attribute on the apple-isp platform device (/sys/class/video4linux/videoX/device/sensor, documented in Documentation/ABI/testing/sysfs-driver-apple-isp, returning -ENODATA until deferred camera detection completes) so aurora-silicon/camera-denoise#14 can key camera profiles on [sensor:imx958-uw] rather than board lists.

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