Skip to content

usb: typec: tipd: take the J575c's LOCK key from the DT - #3146

Merged
DjDeveloperr merged 2 commits into
aurora-silicon:mainfrom
7robertodantas:tipd-inherited-key-from-dt
Nov 25, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-silicon:mainfrom
7robertodantas:tipd-inherited-key-from-dt

Conversation

@7robertodantas

@7robertodantas 7robertodantas commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What: Follow-up to #2875: the J575c's renegotiation key moves from the tipd table into its DT (apple,debug-lock-key = "575J" on hpm1-3), and the J575c row is dropped. This is half of what I said in #2875: the J716c row stays, so the table stays with one row (why below).
Tested: J575c at 2375501: hpm1-3 renegotiate their inherited connections at probe, a USB 3 drive comes up at 10 Gb/s (uas), and everything comes back after an s2idle cycle; 0 failed units, 0 new kernel errors.
Risk: two-way door · J575c; shared tipd code, but ports without apple,debug-lock-key and the J716c (table row kept) keep their current path.
Not yet: J716c (no hardware here; unchanged). The no-key fallback (older J575c DT) was last run on 7.3.0-1-110 with the same commits; that code has not changed since.

Details

In the #2875 review I said I'd move the LOCK key into the J575c and J716c DTs and drop cd321x_inherited_boards[]. This PR does the J575c half.

  • arm64: dts: apple: t6041-j575c: give the port controllers their LOCK key: apple,debug-lock-key = "575J" on hpm1-3, the three ports with apple,reset-inherited-usb2-connection. hpm0 (the debug port) is unchanged.
  • usb: typec: tipd: take the J575c's renegotiation key from the DT: the renegotiation takes the key from apple,debug-lock-key when the port has one, best effort as the J575c row was, and the J575c row is dropped. A port with the property but no key, from the DT or the table, gets a warning and keeps its connection, so a J575c booted with an older DT comes up as it did before usb: typec: tipd: J575c: renegotiate every inherited connection #2875 (USB2 on those ports) instead of failing.

The DT commit comes first, so the driver change is never in a tree without the key in the J575c DT.

J716c: not changed. Its row stays in the table, with its key and its behaviour (a failed renegotiation fails the probe). Moving its key to the DT would also make the J716c boot port a debug port for the driver's other uses of apple,debug-lock-key: no HChk and no USBw for a controller still in its boot power state at the probe, and the T6050 post-sleep replug. That needs testing on a J716c, and I don't have one. Once someone does it, the table can go.

Those other uses don't run on the J575c ports: the debug link rearm needs a debug link that a sleep cut (these ports have none), HChk/USBw need a controller still in its boot power state at the probe (the J575c ports are in S0 already), and the post-sleep replug is apple,t6050-dwc3 only. One visible effect: with the key, the three ports get the debugfs replug file (root only, does nothing unless written).

Checks: checkpatch 0 errors, 0 warnings on both commits; CHECK_DTBS with apple,sn201202x.yaml clean for t6041-j575c and t6050-j716c.

Evidence

Exact head: kernel 7.3.0-1-113 built from main d7b0aec plus these two commits; its source tree is identical to 2375501 (git diff empty). Stock command line; DT = t6041-j575c.dtb from the same tree, one-shot trial Stage 2.

USB 3 drive on 1-06, USB2 hub with keyboard on 1-08, DP monitor on 1-0a, HDMI.

Run Renegotiated Drive Other
this PR's DT (key on hpm1-3) 1-0a 18.405 s, 1-06 18.406 s, 1-08 18.408 s 10 Gb/s, uas no no apple,debug-lock-key warning; idle: 1-06, 1-08, 1-0c suspended, 1-0a (DP) active
then one s2idle cycle (rtcwake, 30 s) 10 Gb/s, uas after the resume DP, HDMI and keyboard back, no replug or rearm

Regression: SELinux N/A (Arch, AppArmor: 0 denials), 0 failed units. Kernel errors: nothing from tipd. Against clean main boots (7.3.0-1-114, main a73023b, no s2idle) the only additions are the s2idle cycle's lines (genpd_prepare -11 on the dwc3 controllers, brcmfmac LPAS setup failed (-107), ptp: parent end0 should not be sleeping), the shutdown's watchdog did not stop! and the debugfs tracing automount notice. Against a boot from before this change with an s2idle cycle (7.3.0-1-106, #2875), the only additions are the debugfs notice and devmotion6's probe ... failed with error -5, which every main boot today also has. Error lines also present on main: the ASM2214 xHCI firmware is missing, DCP unexpected lane count, devmotion6 -5, a USB2 hub keyboard's -71 retry.

Earlier run, same two commits on 48470aa + #2875 (kernel 7.3.0-1-110), with the integration DT (no key): no port renegotiated, inherited connection not reinitialized: no apple,debug-lock-key on the three ports, drive at 480M usb-storage, probe OK, 0 failed units.

The tipd driver renegotiates the connection that a J575c port inherits
from the boot chain (apple,reset-inherited-usb2-connection). The DISC
command it sends for that needs the controller unlocked by LOCK with
the board's key, the board number reversed. The driver keeps that key
in a table of machines. Describe it on the three ports that are
renegotiated, with the binding's apple,debug-lock-key, so the driver
can take it from there instead of its table.

The key is the one the driver uses today ("575J"). Elsewhere the
driver reads the property for a debug link that a sleep cut (these
ports have none), for the boot power state's HChk and USBw (the J575c
ports are in S0 already at the probe), and for the post-sleep replug
of a T6050 host. None of that runs on these ports.

Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
The renegotiation of an inherited connection took its LOCK key, and
whether a failure fails the probe, from a table of machines
(cd321x_inherited_boards[]). The J575c ports now carry their key in
apple,debug-lock-key, which the partner replug already reads. Take the
key from there when the port has one, and drop the J575c row.

A port with its key in the DT is left as it was when the renegotiation
fails, as the J575c row asked. The J716c keeps its row and its
behaviour: its DT has no key yet, and a failure still fails its probe.
A port with the property but no key either way keeps its connection as
it is, with a warning, so a J575c booted with an older DT comes up as
before the renegotiation instead of failing.

Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
@7robertodantas
7robertodantas requested review from a team as code owners November 25, 2026 10:02
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:usb Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at 2375501a: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok in the PR body at 2375501a
Conflicts ok none
PR text ok Risk: two-way · J575c; shared tipd code, but ports without apple,debug-lock-key and the J716c (table row kept) keep their current path.

Areas: area:bringup, area:usb

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@7robertodantas 7robertodantas changed the title J575c: take the inherited connection's LOCK key from the DT usb: typec: tipd: take the J575c's LOCK key from the DT Nov 25, 2026
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 25, 2026

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 2375501aa80a

Blockers: none

Checked: Full diff audit of the J575c apple,debug-lock-key = "575J" DT migration on hpm1-3, removal of the J575c table entry from cd321x_inherited_boards[] while keeping the J716c entry intact, graceful fallback behavior for older J575c DTs without the property, exact-head J575c USB3 + s2idle verification row in the PR body, and all 4 CI checks green (0 active, 0 failing).

Evidence
  • DT and driver diff (2375501aa80a): adds apple,debug-lock-key = "575J" to hpm1-hpm3 in the J575c DTS, removes the J575c quirk row from cd321x_inherited_boards[], preserves the J716c row unchanged, and retains best-effort fallback when the DT property is absent.
  • CI at 2375501aa80a (paginated check-runs by latest run ID): 4/4 green (dt-checks, host-tests, pr-text, readiness; 0 active, 0 failed).
  • Hardware row in PR body: J575c at exact head 2375501a, hpm1-hpm3 inherited renegotiation, 10 Gb/s UAS USB 3 drive, s2idle cycle recovery, 0 failed units, 0 new kernel errors.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Nov 25, 2026
@DjDeveloperr
DjDeveloperr merged commit e2da95c into aurora-silicon:main Nov 25, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:usb Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants