Repository navigation
arm64: dts: apple: t6050-j716s: Touch ID, fan control and the left-front USB4 router - #3281
rolotrealanis98 wants to merge 7 commits into
Conversation
The J716s's SEP (ADT sep, dart-sep) is the J716c's and the J714s's: the same mailbox, power domain and fabric parents. Include the J716c's SEP hand-off: the "sep" alias through which the boot loader reserves the SEP firmware and adds its manifests, the mailbox and ps_sep, and FAB8_SOC and FAB0_PIOGW left to the firmware while the pre-booted enclave owns them. The driver selects its T6050 profile by the SoC. Signed-off-by: Rolando Trevino <[email protected]>
The J716sAP ADT's spi2/mesa is wired as on the J714s and the J716c: the Mesa sensor (sensor-id 0x3356) at 8 MHz on chip select 0, powered by NUB GPIO 21 and signalling data ready on AP GPIO 138. Describe it with this board's factory data names, and expose AP GPIO 138: the reserved ranges covered it, so the sensor's interrupt failed to map (hwirq 0x8a, -6). 112 and the other unnamed pins stay reserved. The J716s ADT coverage manifest names the sensor's node. Signed-off-by: Rolando Trevino <[email protected]>
The J716s SMC takes a manual target for either fan as the J714s's does: writing a speed sets F0md/F1md to manual and F0Tg/F1Tg to the target, the fan follows it, and writing 0 returns the fan to the SMC, which then drives it as before (it stops it at idle). Mark both fans with apple,fan-manual-control, as on the J714s and the J716c. The driver clamps a target to the fan's own F*Mn..F*Mx range, read from the SMC. Signed-off-by: Rolando Trevino <[email protected]>
The J716sAP ADT's left-front router (/arm-io/acio1, acio-cpu1, dart-acio1, apciec1, dart-apciec1) has the J714s's addresses, interrupts, LSTX pin (AOP 79) and router, NHI, DART and PCIe tunnel tunables, and the same host DROM (UID 1). Take t6050-j714s-left-usb4.dtsi as it is and override the one difference: this board's atc-phy1 tunable_LN0/LN1_RX_TOP_CIO_DFLT leave the RX_TOP field at 0 (<0x35c 0xe00 0x0>, as ATC2's do), where the J714s's set it to 0x200. t6050-peripherals.dtsi leaves its inventory apciec1_dart out for the J716s too, as for the J714s and the J716c: the router dtsi has its own in the pcie-tunnel-1 container. The J716s ADT coverage manifest names the router, its DART and mailbox, the tunnel, and dart-apciec1's new path. Signed-off-by: Rolando Trevino <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
…B4 PCIe tunnel The apple,pcie binding forbids interrupt-names on an apple,t6050-pciec node: only the apple,t6040-pciec branch names its interrupts. The PCIe-C driver takes its single port interrupt by index, so the "port0" name was never read. Enabling the node on the J716s makes CHECK_DTBS report "False schema does not allow ['port0']" for t6050-j716s.dtb, a warning the J714s description already carries. Drop the unused name from the shared J714s/J716s left-port description. Signed-off-by: Rolando Trevino <[email protected]>
There was a problem hiding this comment.
Verdict: FINISH, then merge at 2204099f1900fc2b3c5bb0e6a6696ac920e54502
Blockers:
- The newly added literal PHY tuning overrides are described as coming from the firmware-provided tuning table. Remove the literal values from the public patch and use a board-data handoff, or provide a public-clean origin and an owner review. Keep the raw source data in the private record.
- The latest commit removes an interrupt name from the shared USB4 include. That changes the existing J714s/J716c consumers as well as J716s. Please report the effective DT delta and an existing-board router/PCIe hotplug smoke, along with the new board's left-front USB4 enumeration. The original J716s row predates the shared-file change and only checked driver binding with no USB4 device.
Checked: Read the board wiring, reserved GPIO ranges, existing binding checks, shared include and fan-control evidence. The DTS inspection relates to wiring and scope; Touch ID enrollment and the new USB4 feature row are still outstanding. No lab writes were run for this review.
|
J716s row at the new head 2204099 (16" MacBook Pro M5 Pro, macOS 27.3 beta stub; the J716s kernel 7.3.0-g0f96ca644485 with this PR's description, DTB rebuilt with the interrupt-names removal;
|
…the board file Commit 2204099 ("arm64: dts: apple: t6050-j716s: drop interrupt-names from the left USB4 PCIe tunnel") removed the "port0" name from t6050-j714s-left-usb4.dtsi, which the J714s also includes, so it changed an existing board's description as well. Put the line back in the shared file and delete the property from &apciec1 in t6050-j716s.dts instead. The apple,pcie binding names interrupts only on apple,t6040-pciec, and the PCIe-C driver maps the port interrupt by index, so the J716s's CHECK_DTBS warning goes away while the J714s and J716c DTBs stay as they are on main. Signed-off-by: Rolando Trevino <[email protected]>
… tunables to the boot loader The left-front port's PHY (atc1_phy) carried this board's CIO80 RX_TOP tunables (ADT atc-phy1 tunable_LN0/LN1_RX_TOP_CIO_DFLT) as literal values in the board file. Tunables are board data the boot loader copies from the ADT, so they should not be repeated in the source. Drop the literals. Delete the two properties from &atc1_phy instead, so the J714s's own values in t6050-j714s-left-usb4.dtsi are not inherited either. The apple,combo-phy binding makes the CIO tunables optional and the PHY driver skips an absent one, so the port probes as before; the RX_TOP CIO step is applied once the boot loader fills these properties from the ADT. Signed-off-by: Rolando Trevino <[email protected]>
|
Both addressed at d1551b6:
The J716s row at this head, the left-front USB4 enumeration with a real device, and Touch ID enroll/verify will follow. |
There was a problem hiding this comment.
The current DTS drops both J716s override literals and restores the shared interrupt name, with the deletion scoped to J716s. The reported 139-DTB comparison resolves my existing-board delta concern. Please confirm the landing method with the owner. The earlier commits containing the tuning literals must stay out of main under the public-source rules. The J716s DT now also omits those controls until the bootloader supplies board data. A driver bind at the old head cannot validate that path. Please report exact-head left-front USB4 router, PCIe tunnel enumeration and detach with the new effective DT. Touch ID enrol/verify and hosted dt-checks are still pending.
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict at d1551b67: nearly there. Two items, then merge.
- The row at this head. The body's Tested row is at
2204099f("the d1551b6 row follows"). Since thent6050-j716s.dtsand the sharedt6050-j714s-left-usb4.dtsichanged (the RX_TOP CIO tunables were dropped, and the interrupt name went back into the shared file). Please post the J716s boot atd1551b67as a single "SHA + Mac + result" line. The readiness bot only counted the SHA text in the body. Your 139-DTB comparison covers the J714s. - The review bot's open change request at
d1551b67("confirm the landing method with the owner"): please answer it on the PR so it clears.
Nit (follow-up, not blocking): this adds T6050_J716S to the board exclusion #if !defined(T6050_J714S) && !defined(T6050_J716C) in the shared t6050-peripherals.dtsi. The list existed before this PR, but each board added to it makes the shared file more board-specific. A board-side /delete-node/ or status override would avoid that. The same goes for including t6050-j716c-sep.dtsi and t6050-j714s-left-usb4.dtsi from another board: if they're T6050-wide, they could be renamed to t6050-sep.dtsi / t6050-atc1-usb4.dtsi.
|
J716s boot at d1551b6: pass (16" MacBook Pro M5 Pro, macOS 27.3 beta stub; the J716s kernel 7.3.0-g0f96ca644485 with this head's t6050-j716s.dtb, which differs from the 2204099 DTB only by atc1_phy's two rx-top-cio properties).
Landing method (for the review bot's request): squash merge, so the earlier commits that carried the tunable literals never reach main. Nit: agreed. The board exclusion and the cross-board includes can become a board-side override and T6050-wide file names in a follow-up. |
|
Merge-train note at |
|
Heads-up from the K-board side, so the J716s isn't left with half its ports. The J716s ADT (adt-coverage/t6050-j716s.txt) also lists |
erikwb
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at d1551b67
Blockers:
arch/arm64/boot/dts/apple/t6050-peripherals.dtsi:1599: this head conflicts with main’s ATC1 DART guard and the J716s board additions. Use the currentT6050_ATC1_USB4_ROUTERselector so the tunnel supplies oneapciec1_dartprovider and the disabled PIO DMA node still resolves it.- The J716s test at this DT head confirms Touch ID verification, fan target visibility and router probe. On the resulting head, attach a real left-front USB4/Thunderbolt device, verify PCIe tunnel enumeration and detach, and check for DART or ACIO errors. Repeat the Touch ID and fan checks on that build.
Checked: The SEP, fingerprint, SMC fan, ACIO/NHI, DART, PHY and PCIe bindings cover the final nodes. Fan limits come from the SMC. The J716c DTB is byte-identical to its base. Hosted DT and host checks passed at this head, but GitHub reports a conflict with main.
Evidence
- Nit, not blocking:
arch/arm64/boot/dts/apple/t6050-j716s.dts:606in42ea73ea: the older commit still installs board-specific RX_TOP tuning literals. The last commit removes them, but a merge commit would bring the older revision into main. The final tree is clean; if you rebuild the branch for the conflict anyway, folding that commit away keeps the literals out of history. - Compiled J716s and J716c at
859e8a29andd1551b67. The J716s GPIO ranges expose 80 and 138 and keep pin 112 reserved. SPI chip select 0, AP IRQ 138 and NUB GPIO 21 resolve to the intended providers. The ACIO child address translation places its DART at2a9a80000and the NHI at2a9f00000; the tunnel’s DART resolves at2ac000000. The interrupt-name and RX_TOP deletions apply only to J716s. - The latest author comment identifies the tested DTB at
d1551b67and reports a successful fingerprint verify from an existing enrollment. The router was idle without a partner. That does not exercise the PHY with the two optional tunables absent or test PCIe enumeration. J716s PR evidence
…OM's evidence The J716s's atc-phy0 CIO RX_TOP value is not in hand (14-inch boards use 0x200, the 16-inch K116s and J716c 0x0) and no boot loader exports it, so leave it unset on this board: the PHY driver skips an absent CIO80 tunable, as #3281 does for its ATC1. The shared overlay keeps 0x0 for the K116 boards only. The ATC2 host DROM comment claimed the boot loader replaces it; on the laptops nothing does (no usb4-N-nhi alias). Its evidence is that the body, everything but the CRC and router UID in bytes 0..8, is the same on K114s, K116s, J714s and J716c for both acio0 and acio2. Signed-off-by: Ryan Murray <[email protected]>
…ight router dt-checks' ADT coverage step broke on the two PCIe tunnel DARTs, which moved from the inventory (/soc/iommu@2a4000000, /soc/iommu@384000000) into their tunnels. Map them there, and map the nodes this series describes: apciec0/2, acio0/2, dart-acio0/2, acio-cpu0/2, atc-phy0 and hpm0, as #3281 does for ATC1. J716s MISSING 696 -> 686, broken 0. Signed-off-by: Ryan Murray <[email protected]>
|
Superseded by #3696: the same three blocks rebuilt on current main (e6c7b03) as three clean commits, so the earlier commits with the RX_TOP tuning literals stay out of main's history without a force push of this branch. Against d1551b6 it takes the shared |
The merge of main kept main's &pinctrl_aop block (#3281: pin 79 valid for acio1) and this branch's later block (77 and 81), and the later one won, so AOP pin 79 was reserved again and acio1 could not take its LSTX pin back (-EINVAL). Keep one gpio-reserved-ranges, after the router includes, that leaves 77, 79 and 81 valid, as t6050-j714c.dts does.
…ight USB4 router The J716s ADT has the left-back port (hpm0, atc-phy0, usb-drd0, acio0, acio-cpu0, dart-acio0, apciec0, dart-apciec0) and the right port's USB4/Thunderbolt router (acio2, acio-cpu2, dart-acio2, apciec2, dart-apciec2) at the T6050 addresses (adt-coverage/t6050-j716s.txt), but its device tree described neither: the left-back port was absent and the right port got USB only. Enable them as the K boards do. The ATC0 enable overlay is renamed from t6050-k114-k116-atc0.dtsi to t6050-atc0-enable.dtsi, since it is no longer K-board only, and gives the J716s the 16-inch RX_TOP value. The right router takes t6050-max-atc2-router.dtsi, the ATC2 DP tunnel and the router domains as in t6050-k114-usb.dtsi, with the K114sAP host DROM (the boot loader replaces it), and the AOP GPIO controller exposes pins 77 and 81. The shared ATC0 connector label typec2 becomes atc0_typec: the J716s already calls its right connector typec2. Labels are not in the DTBs, so only t6050-j716s.dtb changes; every other T6050 DTB is byte-identical, and CHECK_DTBS reports the same as main. The left-front router stays with aurora-silicon#3281 and the MagSafe controller with aurora-silicon#2397. Signed-off-by: Ryan Murray <[email protected]>
What: describe three more blocks of the J716s (16" MacBook Pro, M5 Pro), each as the J714s/J716c already do: the SEP hand-off and the Touch ID sensor (spi2/mesa, AP GPIO 138), userspace fan targets (apple,fan-manual-control), and the left-front port's USB4/Thunderbolt router with its PCIe tunnel.
Tested: J716s (macOS 27.3 beta stub) at d1551b6 with this PR's J716s description (DTB on the J716s kernel tree): SEP bound, the fingerprint sensor bound with its data-ready interrupt on AP GPIO 138, fprintd sees the device and verify matched an enrolled finger; both fan targets writable with the SMC's own min/max; the left-front router bound (off until a USB4 partner attaches); 0 failed units, 0 SError, 0 new kernel errors. dt-checks steps and checkpatch --strict pass (Evidence).
Risk: two-way door · J716s only (its board file; t6050-peripherals.dtsi changes only under T6050_J716S).
Not yet: a USB4/Thunderbolt device on the left-front port on this head; Touch ID enrol/verify on this head (the same description is used every day on the tester's J716s).
Details
hand the SEP over: the J716s's SEP is the J716c's and the J714s's; includet6050-j716c-sep.dtsi(the "sep" alias the boot loader reserves the firmware through, the mailbox, ps_sep, FAB8_SOC and FAB0_PIOGW left to the firmware). The driver selects its T6050 profile by the SoC.describe the Touch ID sensor: the ADT's spi2/mesa is wired as on the J714s and J716c (sensor-id 0x3356, 8 MHz, chip select 0, NUB GPIO 21 power, AP GPIO 138 data ready). AP GPIO 138 was inside the reserved ranges, so the sensor's interrupt failed to map; it is now exposed (only 80 and 138 are).let userspace set the fans: the J716s SMC takes a manual target for either fan and hands the fan back on 0, measured on this machine: fan 1 went from 0 to ~1750 rpm on a 1750 target and back to SMC control within 2 s on 0; a 1000 target was clamped to the 1350 minimum. The driver clamps to the SMC's own FMn..FMx.add the left-front port's USB4 router: the ADT's acio1, acio-cpu1, dart-acio1, apciec1 and dart-apciec1 equal the J714s's (addresses, interrupts, LSTX pin, tunables, host DROM) except atc-phy1's RX_TOP CIO tunables, sot6050-j714s-left-usb4.dtsiis included and the J716s board file deletes those two properties (no literal values; they are left to a boot-loader handoff, which T6050 does not do yet, and the PHY driver skips an absent CIO tunable). The board file also deletes the tunnel'sinterrupt-names, which the apple,t6050-pciec binding does not allow (the driver takes that interrupt by index); the shared include is unchanged, so only t6050-j716s.dtb differs from main. The inventory apciec1 DART is left out as for the J714s/J716c.The J716s ADT coverage manifest names the new nodes and dart-apciec1's new path.
Order with other PRs: based on main. #2275, #2277, #2278, #2283, #2285, #2291 and #2922 also append to the end of t6050-j716s.dts, so whichever lands second keeps both blocks; with #2277/#2291 the reserved pin ranges take the union (80, 81, 134, 138, 139 exposed:
<0 80>, <82 52>, <135 3>, <140 81>). I'll rebase onto whichever lands first. The MagSafe 3 controller (hpm5) is left to #2397, which shares it across the M5 MacBook Pros.Evidence