Skip to content

usb: typec: tipd: key the native display HPD path on a DT property, not T8140/T8142 - #2399

Draft
RyanTheTide wants to merge 2 commits into
integration/aurorafrom
sweep/tipd-display
Draft

RyanTheTide wants to merge 2 commits into
integration/aurorafrom
sweep/tipd-display

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

drivers/usb/typec/tipd/core.c picks 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_display was also set only in tipd_resume(), so it was false from probe until the first resume.

Change

  • New boolean DT property apple,display-native-hpd on the SN201202x node (documented in apple,sn201202x.yaml). tipd_init() reads it into tps->display_native_hpd, and the three sites use that flag.
  • The property is set on every SN201202x node of the T8140 and T8142 boards: t8140-j700.dts (2), t8142-j704-usb.dtsi (3), t8142-j813-usb.dtsi (2, used by J813 and J815).
  • These boards behave as before, except that the IRQ_HPD rule now applies from probe and not only after the first resume. Every other board is unchanged.
DT coverage

From dtc -I dtb -O dts of the built DTBs:

t8140-j700:  sn201202x nodes=2  apple,display-native-hpd=2
t8142-j704:  sn201202x nodes=3  apple,display-native-hpd=3
t8142-j813:  sn201202x nodes=2  apple,display-native-hpd=2
t8142-j815:  sn201202x nodes=2  apple,display-native-hpd=2
t6040-j616s: sn201202x nodes=4  apple,display-native-hpd=0
t6041-j614c: sn201202x nodes=4  apple,display-native-hpd=0

t8140-j700, t8142-j704, t8142-j813 and t8142-j815 are 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.o and all six KUnit test objects build. The only warning is the existing i2c.c:21 enum 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, so dt_binding_check was not run.

Still to run

Hardware rows: pending.

  • Neo (T8140 J700): ls /sys/class/typec shows 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 in journalctl -k -b | grep -iE 'cd321x|sn201202x|typec'.
  • J616s (T6040) and the M1 Pro and M2: no property, so behavior is unchanged. A dock or display hotplug on any one of them is a regression check.
  • Not bootable here: J704 (T8142), J813, J815. Their DT gets the property, so behavior stays as before.

Assisted-by: LLM (Claude:Opus 5.5)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant