Repository navigation
usb: typec: tipd: key the macOS sleep entry and cable steps on the controller - #2638
Conversation
|
Thanks for doing the audit. The three selectors now read what the controller presents, and the effect-by-board list matches the DTs I checked. Some points:
For the J700, the cable step runs on every detach/attach while running. That needs a cable replug with the partner's enumeration and the SSPS/USBw lines checked, plus one s2idle, since the J700 keeps its old entry. Assisted-by: LLM (Claude:Opus 5.5) |
13bc4f8 to
116d08c
Compare
…ntroller
The macOS sleep entry and wake of an SN201202x, its USB-wake arm after
the PHYs' stop and the SSPS/USBw at a cable change were taken only on
the J714s (of_machine_is_compatible("apple,j714s")). Select them by
what the controller and its DT present instead:
- the sleep entry and wake: a polled controller (no interrupt in the
DT) that follows the system's power state (apple,sleep-ssps) and arms
no USB wake of its own (no apple,usb-remote-wake), for a firmware
sleep, from a port last known dry or mitigated, as before;
- the USB-wake arm: every controller with apple,sleep-ssps registers
for apple-sleep's notifier; it arms only with that macOS entry and a
connector with a partner, as before, and only the T6050 sleep's
.prepare_late calls the notifier;
- the cable change: an SN201202x whose DT asks for it with the new
apple,cable-change-ssps (set on the J714s's USB-C port controllers,
where macOS's sequence was traced), with a connector, while running,
and not one in a debug route (from before Linux, or opened through
debugfs). It is not
tied to apple,sleep-ssps: the J700's controllers follow the system's
power state, but macOS sends them only SSPS around a sleep.
On the J714s nothing changes, given a DTB built from this tree, except
that a USB-C controller in a debug route no longer gets the cable
sequence. The macOS entry now also applies to the other boards whose
DT marks polled SN201202x controllers with apple,sleep-ssps, J716c and
J813, and the USB-wake arm on the T6050 one (J716c). Neither has been
traced or tested with it.
Signed-off-by: Diljit Singh <hey@djdev.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
116d08c to
da8e8fb
Compare
|
Thanks. All three points are in the current stack:
On the M5 (J714s), the three together run with fdc15472 plus those properties: the test boot was clean, the cable sequence ran, every S3 took 10-11 ms, and the macOS entry and the USB-wake arm happened. The gate's sleeps are still going. Their numbers will follow here. 🤖 Generated with Claude Code |
|
M5 (J714s) gate for this stack (#2638 + #2639 + #2640). Kernel 7.3.0-m5-sship3 = integration/aurora 5b596e6 + the three, built on the M5. DTB fdc15472 plus the new controller properties (c0440c9e). Test boot: clean.
Sleeps: 5 of 5 logind deep sleeps CLEAN, 30 s alarm: 4 entered 40 s after a debugfs replug of 1-0a (the Dell port), 1 plain.
In the first sleep's log, every step these PRs key on the DT ran with result 0:
Afterwards the M5 was restored and verified on its default. 🤖 Generated with Claude Code |
|
Merged as d73563b, after review, green CI on da8e8fb and the J714s gate (5/5 on the stack). Untested on other boards. This turns on the macOS sleep entry for the polled 🤖 Generated with Claude Code |
Follows the project rule that behaviour is chosen by what the hardware or firmware presents, never by
of_machine_is_compatible()or SoC lists. This is the audit of the J714s gates added by #2597, #2598 and #2601. Follow-ups #2639 (replug key) and #2640 (SSPS rules, probe reset) stack on it.What changes
apple,sleep-sspsand noapple,usb-remote-wake, in a firmware sleep, from a port last known dry or mitigated.apple,sleep-sspsregisters for apple-sleep's notifier. The arm still needs the macOS entry plus a connector with a partner. Only T6050's.prepare_latecalls the chain.apple,cable-change-ssps, selects it. It is set on the J714s's USB-C port controllers, where macOS's sequence was traced. It still needs a connector, the running phase, and no debug route held from before Linux.apple,sleep-ssps: the J700's controllers have that property, but its DT says macOS sends them only SSPS around a sleep.Effect by board (from the DTs, compiled):
apple,cable-change-ssps.Neither J716c nor J813 has been traced or tested with the macOS entry.
Before merge
apple,cable-change-ssps, so without a refresh the rig loses the cable step. This merges together with usb: typec: tipd: take the replug's unlock key from the DT #2639 and usb: typec: tipd: the sleep's SSPS rules and the probe reset from the DT #2640, after a rig DTB refresh is gated and switched.Review: done. Changes from it: the cable step moved to its own property, controllers holding a debug route are skipped, debug routes opened through debugfs are skipped too, and the "untested" note was added. A J716s entry was wrong and is gone: J716s has no
apple,sleep-ssps.🤖 Generated with Claude Code