Repository navigation
usb: typec: tipd: key the native display HPD path on a DT property, not T8140/T8142 - #2399
RyanTheTide wants to merge 4 commits into
Conversation
Three CD321x/SN201202x display policies were keyed on the SoC: on T8140 and T8142 the driver does not follow the partner's DP status (event 37 stays masked), does not synthesize an IRQ_HPD pulse for a quick HPD low/high, and does not send the display connector a recheck when a USB4 route starts. The reason is the display route, not the SoC: on those machines the display coprocessor's Type-C route has its own HPD path, which is why the gates came with it (46e2253: "Integration's DP status interrupt and its HPD rules stay off on those SoCs"). A new board with the same route would need another compatible in three places. Describe it on the controller instead: apple,display-native-hpd, read in tipd_init() into tps->display_native_hpd, and set on every SN201202x node of the T8140 and T8142 boards (J700, J704, J813, J815). Those boards keep their behavior, and every other board is unchanged. h17_display was also only set in tipd_resume(), so it was false from probe until the first resume on T8140 and T8142. The property is read at probe, so the IRQ_HPD rule holds from boot. Fixes: 7220ae0 ("usb: typec: tipd: follow the DP status of an SN201202x partner") Fixes: 3c9a8c5 ("usb: typec: tipd: key the CD321x display route on the selected mode") Fixes: 46e2253 ("usb: typec: keep the H17 display route handshake") Suggested-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Suggested-by: Diljit Singh <hey@djdev.me> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…iption The description of apple,display-native-hpd has a ": " in a plain scalar, which YAML reads as a mapping, so the schema does not parse. Make it a literal block. Fixes: ea26780 ("usb: typec: tipd: key the native display HPD path on a DT property") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Blockers: 3.
HW row: Neo J700 on this head, booted once with the new DTB and once with the current production DTB. Rear-port display hot-unplug/replug x5 comes back each time with no "Invalid DP pin assignment" or mux errors. J616s (no property): one dock/display hotplug as a regression check. Plus 0 AVC, 0 failed units and 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
Conflicts: apple,sn201202x.yaml (kept apple,display-native-hpd and integration's new properties), tps6598x.h (display_native_hpd replaces h17_display; kept integration's replug fields). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
tipd now takes the native display HPD path from the controller's apple,display-native-hpd property instead of the machine compatible. The lifecycle, quiesce and transaction fixtures model a native H17 (T8140) controller: add display_native_hpd to their struct tps6598x mocks, set it in the lifecycle fixture, and have the transaction fixture's device_property_read_bool() report the property, so the extracted tipd code builds and keeps the native path it had. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Merged integration/aurora (d1b022d); conflicts in apple,sn201202x.yaml and tps6598x.h resolved (kept both sides' properties/fields, h17_display dropped), plus the apple-dcp host-test mocks now carry display_native_hpd. tipd objects, t8140-j700/t8142-j704/j813/j815 dtbs and the apple-dcp host tests (92/92), sn201202x-transport and j613-mux-order build/pass. |
|
The rebase and the host-test mocks are done. Still needed: keep the T8140/T8142 machine check as the fallback when apple,display-native-hpd is absent (a Stage 2 DTB without the property must keep today's behaviour), fold the YAML quoting fix into the first commit, then a J700 row with both the new and the current DTB (rear-port display replug x5) and a J616s hotplug regression row. |
Problem
drivers/usb/typec/tipd/core.cpicks three DisplayPort policies by SoC compatible:cd321x_uses_dp_sid():!apple,t8140 && !apple,t8142. Follow the partner's DP status (event 37). From 7220ae0, scoped in the adaptation.cd321x_update_work():!apple,t8140 && !apple,t8142. On a USB4 start, ask the display connector to recheck. From 3c9a8c5.tipd_resume():h17_display = apple,t8140 || apple,t8142. Do not synthesize an IRQ_HPD pulse. From 46e2253.The reason is not the SoC. On those machines the display coprocessor's Type-C route has its own HPD path (46e2253: "Integration's DP status interrupt and its HPD rules stay off on those SoCs"). A new board with that route would need its compatible added in three places.
h17_displaywas also set only intipd_resume(), so it was false from probe until the first resume.Change
apple,display-native-hpdon the SN201202x node (documented inapple,sn201202x.yaml).tipd_init()reads it intotps->display_native_hpd, and the three sites use that flag.t8140-j700.dts(2),t8142-j704-usb.dtsi(3),t8142-j813-usb.dtsi(2, used by J813 and J815).DT coverage
From
dtc -I dtb -O dtsof the built DTBs:t8140-j700,t8142-j704,t8142-j813andt8142-j815are every T8140/T8142 DTB in the Makefile.Credit
Chris Kearney wrote the DP status follow and the display-route keying (7220ae0, 3c9a8c5). Diljit Singh wrote the H17 route handshake (46e2253). Both are credited with Suggested-by.
Testing
Build (buildbox, LLVM=1, release config +
TYPEC_SN201202X=m, both tipd KUnit suites=m,TYPEC_TPS6598X_DEBUG_COMMANDS=y, W=1), tree = this branch plus #2398:make -j8 W=1 drivers/usb/typec/tipd/passes.core.o,i2c.o,spmi.oand all six KUnit test objects build. The only warning is the existingi2c.c:21enum cast, which is untouched.KUnit was not run: the build host is at load ~450. The test objects compile.
DTBs build:
apple/t8140-j700 t8142-j704 t8142-j813 t8142-j815 t6040-j616s t6041-j614c. The binding YAML parses. dtschema is not installed on the build host, sodt_binding_checkwas not run.Still to run
Hardware rows: pending.
ls /sys/class/typecshows port0 and port1. With the dock and display on the rear port: hot-unplug and replug the display. Expect the display to come back as on the current kernel, and no "Invalid DP pin assignment" or mux errors injournalctl -k -b | grep -iE 'cd321x|sn201202x|typec'.Assisted-by: LLM (Claude:Opus 5.5)