Repository navigation
usb: typec: tipd: take the T8140/T8142 HPD rules from the port's DT - #3748
RyanTheTide wants to merge 2 commits into
Conversation
Two CD321x display paths were gated on the root machine compatible: cd321x_update_work() skipped the out-of-band reprobe of the display connector after a USB4 route started on apple,t8140 and apple,t8142, and cd321x_typec_update_mode() made up no IRQ_HPD for a coalesced HPD pulse once tipd_resume() had set h17_display for the same two machines. h17_display was only set at a resume, so before the first sleep it was false on those machines too. Describe the rule on the port instead: a port whose DT gives apple,no-hpd-synthesis passes the display side only the HPD changes the controller reports. The flag is read once in tipd_init(), so it holds from the probe. Every T8140 and T8142 port with a DisplayPort route (J700, J704, J813, J815) gets the property; the J815 MagSafe port has no route and is left out. Document the property in the SN201202x binding and model it in the apple-dcp host fixtures that extract cd321x_update_work() and tipd_init(). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
There was a problem hiding this comment.
Verdict: MERGE at 29870fd
Checked: binding, the J700/J704/J813-J815 DTS(I) nodes and core.c.
no_hpd_synthesisis read once intipd_init()and replaces both the machine-wide t8140/t8142 check before the USB4 reprobe andh17_display.h17_displayhad no other user (the field is gone and it builds).- Every T8140/T8142 port with a DP route gets the property.
Follow-ups (not holds): - Deliberate behaviour change:
h17_displaywas set only intipd_resume(), so before the first sleep these ports synthesised IRQ_HPD for coalesced pulses. Now they never do, from boot. That is the intended rule, but a cold-boot hotplug row on J700 or J813/J815 is the one to watch. - The reprobe exclusion is now per port. Ports without the property on these machines (the J815 MagSafe hpm5) are now reprobed after a USB4 route starts where the machine check used to skip them. They have no DP route, so it should be a no-op.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Correct. The two machine checks become one port property, set on every T8140/T8142 port with a DP route. Ports without it (other SoCs, J815 hpm5) keep today's paths. The one real change, suppression from probe instead of after the first resume, only matters without a connector fwnode, which these ports always have.
Still to do: a merge-up (it conflicts with main), then the J700 row (external display hot plug, plus a USB4 device on the other port). Because tipd is shared, also one non-T814x SN201202x row. The T8142 boards' rows should come from their owners. I've queued the J700 and second-generation rows.
- apple,sn201202x.yaml: main added apple,no-data-role-swap where this branch adds apple,no-hpd-synthesis. Keep both. - tipd core.c: main now replays HPD low before a coalesced pulse; keep its comment and add this branch's apple,no-hpd-synthesis line. main also set h17_display from the machine compatibles at the top of tipd_init(). This branch replaces h17_display, so read apple,no-hpd-synthesis there instead, before anything can use it, and drop the later read. - apple-dcp transaction.py: keep this branch's no_hpd_synthesis field. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merged main into this branch as
Against main Local checks on the merge tree, arm64 + asahi config, LLVM=1:
What's left:
#3747 also changes |
|
Independent review of merge
|
|
J773g (M4 Mac mini,
|
What: the T8140/T8142 HPD rules in tipd come from the port's DT, not the root machine compatible. The new boolean
apple,no-hpd-synthesisreplaces (1)!of_machine_is_compatible("apple,t8140") && !of_machine_is_compatible("apple,t8142")before the out-of-band connector reprobe after a USB4 route starts, and (2)tps->h17_display, which onlytipd_resume()set, so it was false until the first sleep. It suppressed a made-up IRQ_HPD for a coalesced HPD pulse. The flag is now read once intipd_init(). Every T8140/T8142 SN201202x with a DP route gets the property: J700 hpm0/hpm1, J704 hpm0/hpm1/hpm3, and J813/J815 hpm0/hpm1 (sharedt8142-j813-usb.dtsi). The J815 MagSafe hpm5 has no DP route and is left out. Binding documented.Tested: at 29870fd:
make W=1 drivers/usb/typec/tipd/builds with no new warnings;apple/t8140-j700.dtb,t8142-j704.dtb,t8142-j813.dtbandt8142-j815.dtbbuild with CHECK_DTBS=y and no warnings, and the property appears 2/3/2/2 times;dt_binding_checkforapple,sn201202x.yamlis clean; apple-dcp host selftests 99/99 ok. No hardware row yet.Risk: two-way door. T8140/T8142 only. One behaviour change: the IRQ_HPD suppression now holds from probe, not only after the first resume. That path runs only when DRM is not reachable, because the connector fwnode is always set on these ports, so in practice the behaviour is unchanged.
Not yet: a J700 (Neo) row. My module one-shot on the Neo failed in my tooling before this code ran, so it is still owed. T8142 boards (J704/J813/J815) are not ours; their rows should come from their owner. This relies on the DT being correct.
Detail
tps6598x.h:h17_displayis renamed tono_hpd_synthesis.lifecycle.py,transaction.py) gain the field, and the J700 fixture sets it.