Repository navigation
arm64: dts: apple: t6041-j575c: describe the boot NOR and its NVRAM - #2851
Conversation
|
Review at c6b729c. Thanks, this looks right to me. It is the same description as the J614c/J616c (#1458) and the J773s, and the offsets match the ADT you posted on #1498.
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial pre-PR checklist review (§1–§6) at c6b729cecddcb70e1eaad181112a04a07f8c21ee (REQUEST_CHANGES).
Checklist Summary
- §1 (No model gating): Pass — pure board devicetree addition in
arch/arm64/boot/dts/apple/t6041-j575c.dts. - §2 (Production-ready / default cmdline): Pass — works on default kernel command line.
- §3 (Safety — Boot NOR / NVRAM): Pass — verified against the J575c ADT (macOS 27.0.1 / 27.2.1,
#1498comment):/arm-io/qspi(0x229118000+arm-io0x200000000=0x429118000, IRQ 1573) matchest604x.dtsi:2008(qspi: spi@429118000)./arm-io/qspi/spinor/anvram(0x700000,0x100000) matchesnvram: partition@700000.- Only the
nvrampartition is exposed; iBoot firmware (0x20000..) andsyscfg(0x680000..) are not described, andCONFIG_MTD_PARTITIONED_MASTERis unset inarch/arm64/configs/defconfig, so regions below0x700000are not exposed as writable MTD devices. - 10 MHz single-lane (
spi-rx-bus-width = <1>,spi-tx-bus-width = <1>) and always-onnor_flash_vccregulator matcht6041-j614c-j616c.dtsi:2696-2744(#1458).
- §4 (Clean-room & attribution): Pass — single commit (
c6b729cecddc) carries human author/committer and humanSigned-off-by:only; PR body includesAssisted-by:. - §5 (Evidence): Blocked — see Blockers below. Both CI checks (
dt-checks,host-tests) are green. - §6 (Naming): Pass — references existing userspace CLI tool names (
asahi-nvram,asahi-bless) and in-tree DTS conventions.
Blockers
- §5 (Evidence) — Boot test was not run on a DTB built from this PR head (
c6b729ce):- The J575c test booted a patched
7.3.0-1-40DTB rather than a DTB built fromc6b729ceonintegration/aurora, and does not report the regression checks (0 SELinux denials, 0 new kernel errors in addition to 0 failed units). - Please boot J575c with the DTB built from
c6b729ce(or the updated head) and report/proc/mtd,asahi-nvram read,asahi-bless --get-boot/-l, and the regression counts.
- The J575c test booted a patched
- §5 (Evidence) — Writable
nvrampartition has no write verification:- The partition is exposed read-write (no
read-only;property), which is the pathasahi-bless --set-boot/asahi-nvram writeuse, yet writes were explicitly not tested. - Aligning with Ryan's review point #3: please run one safe write round-trip (
asahi-bless --set-bootto macOS -> reboot to macOS -> set back to Aurora -> reboot) with a DFU recovery Mac on hand, or explicitly mark the partitionread-only;/ state in the PR if writes are intentionally deferred.
- The partition is exposed read-write (no
Non-blocking Nits
t6041-j575c.dts:2020:nor_flash_vccadds a second top-level/ { ... };block instead of sitting inside the existing root node near line 23.- Follow-up: consider consolidating the
&qspi/&ps_qspi/nor_flash_vccblock intot604x-j575-j773.dtsi(as noted by Ryan) once validated on J773s as well.
Assisted-by: LLM (Gemini 4 Neon)
The J575c leaves the QSPI controller disabled and describes no flash, so no MTD partition is labelled "nvram" and asahi-nvram and asahi-bless have nothing to open. Describe the boot NOR as the J614c/J616c do: the always-on supply, the jedec,spi-nor flash at 10 MHz single-lane, the nvram partition and its alias, and the QSPI power state. The J575c's ADT (macOS 27.0.1 and 27.2.1) has the same controller and layout: /arm-io/qspi is "qspi,qspimc" at 0x229118000 with IRQ 1573 (the t604x.dtsi qspi node), and /arm-io/qspi/spinor/anvram is 0x700000, 0x100000. Tested on a J575c with a device tree built from this commit: the flash probes (JEDEC ef6517, spi-nor-generic), the "nvram" partition appears as a 1 MiB MTD device, asahi-nvram reads it through the read-only node and asahi-bless reports the boot target. Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
c6b729c to
e40efd7
Compare
|
Thanks both. Updated (head e40efd7, rebased on f5fae3c):
Assisted-by: LLM (Claude:Opus 5.5) |
|
Re-review at e40efd7 (first pass was at c6b729c). Earlier points: the regulator is now in the root node (t6041-j575c.dts:46-54), and the rest of the DT block is unchanged from c6b729c. The rows I asked for are in: a boot on a DTB from this head, and the full write round trip, including the refusal without the table row. The I checked the window against your live ADT dump on #1498. The boot ranges (firmware up to 0x680000, syscfg up to 0x6a4000) all end below the partition, and Two small things:
Looks good to me. Assisted-by: LLM (Claude:Opus 5.5) |
|
e40efd7 merges without conflicts on integration/aurora daa9e2d. The DT commit is needed either way. The second commit adds a J575c row to apple_qspi_boards[], which #2817 removes in favour of the DT partition and the probed flash part; if #2817 lands first, that commit can be dropped and the J575c is admitted through the part table. @7robertodantas could you confirm in the Testing section that the write rows ran on f5fae3c plus both commits of this branch? |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial pre-PR checklist (§1–§6) re-review at e40efd7325135a4b82b9c59fdc04e162ecca7281 (dt-checks: success, host-tests: success).
Verdict: APPROVE — all prior blockers from c6b729ce are resolved, both CI checks are green, and the J575c exact-head read, negative-control write refusal, full macOS/Aurora write round-trip, and regression counts are verified.
Checklist Verification (§1–§6)
- §1 (No model gating): Pass. Commit 1 (
d75593af3d3b) is a pure board devicetree description (arch/arm64/boot/dts/apple/t6041-j575c.dts). Commit 2 (e40efd732513) adds the J575c row to the existingapple_qspi_boards[]allowlist indrivers/spi/spi-apple-qspi.c; this is unavoidable on currentintegration/aurorawhile draft PR#2817(DT-partition + probed-part admission) has not yet landed, and the commit message clearly explains why the row is required. - §2 (Production-ready / default cmdline): Pass — boot NOR discovery and NVRAM reads work on the default command line; writes retain the existing deliberate root runtime
read_only=Nopt-in.nor_flash_vccis cleanly placed inside the existing root node (t6041-j575c.dts:20-24). - §3 (Safety — Boot NOR / NVRAM): Pass — verified against the live J575c ADT (macOS 27.0.1 and 27.2.1):
/arm-io/qspi(0x229118000+0x200000000=0x429118000, IRQ 1573) matchest604x.dtsiand theapple_qspi_boards[]aperture./arm-io/qspi/spinor/anvram(0x700000,0x100000) matchesnvram: partition@700000; boot firmware (0x20000..0x680000) andsyscfg(0x680000..0x6a4000) remain unexposed withCONFIG_MTD_PARTITIONED_MASTERdisabled.apple_qspi_probe()(spi-apple-qspi.c:1035-1042) requires exact DT partition equality, andapple_qspi_nvram_modify()(spi-apple-qspi.c:726-745) verifies live JEDEC IDef6517(W25Q64) and SR1/SR2/SR3 againstbp_ok == 0before any real WREN goes on the wire.
- §4 (Clean-room & attribution): Pass — both commits (
d75593af3d3b,e40efd732513) carry human author/committer (Roberto Dantas <7robertodantas@gmail.com>) and humanSigned-off-by:only, with zero AI trailers in commits. - §5 (Evidence): Pass —
dt-checksandhost-testsare green one40efd73,CHECK_DTBS=yandcheckpatchare clean, and J575c (M4 Max) hardware testing verified:- DTB + kernel built from
f5fae3cbb(exact parent ofd75593af) + this branch:spi0.0JEDECef6517,mtd30x700000..0x800000"nvram",asahi-nvram read(39 variables),asahi-bless --get-boot/-l. - Negative control without commit 2 refused cleanly (
NVRAM denied: reason=layout opcode=06, NVRAM unchanged). - Full write round-trip with
read_only=N:asahi-bless --set-boot-macos-> macOS boot -> boot picker -> Linux ->asahi-bless --set-boot "Aurora Alarm"-> Aurora boot, changing onlysystem:boot-volume. - Regression counts: 0 failed units, 0 AppArmor denials (Arch), 0 new kernel warnings.
- DTB + kernel built from
- §6 (Naming): Pass.
Non-blocking Notes
- Please clarify in the PR Testing section (as @RyanTheTide noted) that the write round-trip kernel was built from
f5fae3cbbplus both commits of this branch (e40efd73). - Merge coordination: if
#2817lands before this PR, commit 2 (e40efd73) can be dropped cleanly and J575c will be admitted via#2817's DT+part path.
Assisted-by: LLM (Gemini 4 Neon)
|
Review at e40efd7: one blocker (commit 2), the DT commit is fine.
Could you split it, so this PR keeps the DT commit only (no rebase needed, a revert commit or a fresh branch both work)? The J575c then gets writes through #2817's partition and part checks once that lands, with no row to delete afterwards. As soon as the head is DT-only, the train merges it on Dj's approval. Assisted-by: LLM (Claude:Opus 5.5) |
e40efd7 to
d75593a
Compare
|
Thanks. Split as asked: the head is now d75593a, the DT commit alone (the same commit you both reviewed; the branch On the kernel question: the write rows ran on f5fae3c with only I can run the J575c through #2817 (window [0x700000, 0x800000), W25Q64 Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist re-review at d75593af3d3b3ad200b1c4389b4d2fe890471d83 (dt-checks: success, host-tests: success).
Verdict: APPROVE — cleanly split to the DT-only commit (d75593af3d3b), removing the apple_qspi_boards[] per-board table entry in favor of #2817, with green CI and exact-head J575c hardware verification.
Checklist Verification (§1–§6)
- §1 (No model gating): Pass — pure board devicetree addition in
arch/arm64/boot/dts/apple/t6041-j575c.dts(+46/-0). Dropping theapple_qspi_boards[]row eliminates board gating; NVRAM writes will come generically via#2817's DT-partition + probed-part admission. - §2 (Production-ready / default cmdline): Pass — works on the default kernel command line with no extra parameters or hacks;
nor_flash_vccsits cleanly inside the existing root node (t6041-j575c.dts:20-24). - §3 (Safety — Boot NOR / NVRAM): Pass — verified against the live J575c ADT (macOS 27.0.1 and 27.2.1):
/arm-io/qspi(0x229118000+0x200000000=0x429118000, IRQ 1573) matchest604x.dtsiqspi;/arm-io/qspi/spinor/anvram(0x700000,0x100000) matchesnvram: partition@700000.- Boot firmware (
0x20000..0x680000) andsyscfg(0x680000..0x6a4000) remain unexposed (CONFIG_MTD_PARTITIONED_MASTERis unset). - On current
integration/aurora,spi-apple-qspifails closed on writes (NVRAM denied: reason=layout opcode=06), leaving J575c NVRAM safely read-only until#2817lands.
- §4 (Clean-room & attribution): Pass — single commit
d75593af3d3bcarries human author/committer (Roberto Dantas <7robertodantas@gmail.com>) and humanSigned-off-by:only (zero AI trailers in commits); PR body includesAssisted-by:. - §5 (Evidence): Pass —
dt-checksandhost-testsare green ond75593af3d3b,CHECK_DTBS=yandcheckpatchare clean, and J575c (M4 Max) hardware testing onf5fae3cbb+ this exact commit confirmed:spi0.0JEDECef6517,mtd30x000000700000-0x000000800000 "nvram",asahi-nvram -d /dev/mtd3ro read(39 variables),asahi-bless --get-boot/-l.- Negative control (
read_only=N) refused cleanly (NVRAM denied: reason=layout opcode=06, NVRAM unchanged). - Regression counts: 0 failed units, 0 AppArmor denials (Arch, no SELinux), 0 new kernel warnings vs baseline.
- Separate out-of-PR write round-trip test also confirmed the partition offset/size works end-to-end.
- §6 (Naming): Pass.
Ready for MERGETRAIN-LINUX4.
Assisted-by: LLM (Gemini 4 Neon)
3cd5e0b
into
aurora-silicon:integration/aurora
Summary
The J575c leaves the QSPI controller disabled and describes no flash, so there is no MTD partition labelled
nvramand
asahi-nvram/asahi-blesshave nothing to open.This copies the J614c/J616c boot NOR description (#1458) to the J575c: the always-on supply, the
jedec,spi-norflash at 10 MHz single-lane, the
nvrampartition and its alias, andps_qspi.DT only. On the current integration tree the J575c NVRAM stays read-only:
spi-apple-qspirefuses every program orerase (
NVRAM denied: reason=layout) because the J575c has noapple_qspi_boards[]row. Writes come with #2817,which admits them by the DT partition and the probed part instead of a board table.
The values come from the J575c ADT (macOS 27.0.1 and 27.2.1, same in both), as posted on #1498
(issuecomment-7064323735):
/arm-io/qspiqspi,qspimc, 0x229118000, IRQ 1573t604x.dtsiqspi(spi@429118000), unchanged/arm-io/qspi/spinor/anvramnvram: partition@700000/arm-io/qspi/spinor/firmware,syscfgTesting (Mac Studio, M4 Max, J575c)
Kernel from integration/aurora f5fae3c; one-shot trial Stage 2 with the DTB built from f5fae3c plus this commit
(same tree as d75593a; CHECK_DTBS clean).
Read:
spi0.0JEDECef6517(spi-nor-generic);1 fixed-partitions partitions found on MTD device spi0.0,0x000000700000-0x000000800000 : "nvram";/proc/mtdmtd3: 00100000 00001000 "nvram";asahi-nvram -d /dev/mtd3ro readlists the store (39 variables);asahi-bless --get-boot/-lreport the Auroravolume and list macOS and Aurora.
Regressions: 0 failed units, 0 AppArmor denials (Arch, no SELinux), no new kernel warnings compared with the same
kernel on the installed device tree.
Writes on this DT: with
read_only=N,asahi-bless --set-boot-macosis refused,NVRAM denied: reason=layout opcode=06; nvram unchanged.Write round trip, not part of this PR: the same kernel with only
spi-apple-qspi.korebuilt with a J575capple_qspi_boards[]row (W25Q64ef6517,bp_ok0; it was the second commit here, dropped in review in favour ofspi: apple-qspi: admit NVRAM writes by the DT partition and the part #2817).
read_only=N, back toYafter each write; nvram backed up first:asahi-bless --set-boot-macossystem:boot-volumechangedasahi-bless --set-boot "Aurora Alarm"system:boot-volumechangedmake ARCH=arm64 CHECK_DTBS=y apple/t6041-j575c.dtb(dtschema from pip): no warnings (J614c/J616c too);checkpatch clean.
Not done: the optional read-only
firmwarepartition (kept the same as the J614c/J616c), moving the block intot604x-j575-j773.dtsi(needs a J773s boot), and writes through #2817 on the J575c (I can run that row once #2817is ready for it).
Assisted-by: LLM (Claude:Opus 5.5)