Skip to content

usb: typec: tipd: take the J700 DP status exclusion from the port's DT - #3747

Open
RyanTheTide wants to merge 2 commits into
mainfrom
gates/tipd-t8140-dp-sid
Open

RyanTheTide wants to merge 2 commits into
mainfrom
gates/tipd-t8140-dp-sid

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: cd321x_uses_dp_sid() no longer reads the root machine compatible (!of_machine_is_compatible("apple,t8140"), kept by #3649). A port whose DT gives the new boolean apple,no-dp-sid-update takes the DP partner's HPD level from DATA_STATUS alone; both J700 SN201202x nodes get it, so the J700 keeps today's behaviour and every other SN201202x is unchanged. Binding documented in apple,sn201202x.yaml.

Tested: at 8244ebc: make W=1 drivers/usb/typec/tipd/ (arm64, clang 22) builds, with no new warnings; apple/t8140-j700.dtb builds with CHECK_DTBS=y and no warnings, and the dtb has the property on usb-pd@a and usb-pd@c; dt_binding_check DT_SCHEMA_FILES=usb/apple,sn201202x.yaml is clean; apple-dcp host selftests run.py (all groups) 99/99 ok. No hardware row yet (see Not yet).

Risk: two-way door. J700 only, and only if its DT lacks the property (an older DT with this kernel would turn on DP SID updates on the J700). No other board changes.

Not yet: a row on the J700 (Neo). A module one-shot on the Neo failed in my build tooling before any of this PR's code ran (the out-of-tree build's ABI did not match the running edge kernel), so the Neo row is still owed.

Detail
  • The apple-dcp lifecycle.py fixture models the J700 DT with a device_property_read_bool shim. transaction.py drops its now-unused of_machine_is_compatible shim.
  • The other root-compatible gates in tipd are in separate PRs: the T8140/T8142 HPD rules, the J613 data role swap and the J716c key table.

cd321x_uses_dp_sid() left the SN201202x DP status updates (DP_SID_UPDATE
and the DP SID status) unused on any machine compatible with
apple,t8140: the J700's external display pipe is kept across a hot plug
and does not retrain on an HPD change replayed from those updates.

Describe that on the port instead: a port whose DT gives
apple,no-dp-sid-update takes the HPD level from DATA_STATUS alone. Both
J700 ports get the property, so the J700 behaves as before, and no
driver check reads the root machine compatible for it any more.

Document the property in the SN201202x binding and model the J700 DT in
the apple-dcp host fixtures that extract cd321x_uses_dp_sid().

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team as code owners December 1, 2026 05:42

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 8244ebc

Checked: binding, the j700 DTS (both SN201202x nodes) and core.c. cd321x_uses_dp_sid() now reads apple,no-dp-sid-update from the port instead of the t8140 machine compatible. The in-tree J700 is the only T8140 DT, and it carries the property on both ports, so in-tree behaviour is unchanged. The host selftest stubs follow.
Follow-ups: none. Old-DT exposure on the J700 is noted in Risk.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:usb Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at e9c7ed3b: not ready yet

Check Detail
CI at head ok 5 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at e9c7ed3b
Conflicts ok none
PR text ok Risk: two-way · . J700 only, and only if its DT lacks the property (an older DT with this kernel would turn on DP SID updates on the J700). No other board changes.

Areas: area:bringup, area:usb

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

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Dec 2, 2026
DjDeveloperr
DjDeveloperr previously approved these changes Dec 2, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Correct: the same J700 behaviour from the port's DT, and other SN201202x ports are unchanged (property absent). The binding and fixtures match. Still to do: a merge-up (it conflicts with main), then the J700 row (DP partner hot plug and unplug on both ports). Because tipd is shared, it also needs a quick non-J700 SN201202x row. I've queued both.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 2, 2026
- apple,sn201202x.yaml: main added apple,no-data-role-swap where this
  branch adds apple,no-dp-sid-update. Keep both.
- apple-dcp transaction.py: main's tipd_init() now calls
  of_machine_is_compatible() for h17_display, so the probe fixture
  needs its of_machine_is_compatible shim again. Keep main's line.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged main into this branch as e9c7ed3b3333 (a merge commit, no rebase or force push).

  • apple,sn201202x.yaml: main added apple,no-data-role-swap where this branch adds apple,no-dp-sid-update. The merge keeps both.
  • apple-dcp/transaction.py: main's tipd_init() now calls of_machine_is_compatible() for h17_display. The probe fixture still needs its of_machine_is_compatible shim, so the merge keeps main's line instead of this branch's removal. Without it, probe-transaction-rollback fails to compile.

Against main 1b95b711bbc2, the merge changes 4 files (+16/−1): the binding, t8140-j700.dts, tipd/core.c and lifecycle.py.

Local checks on the merge tree, arm64 + asahi config, LLVM=1:

  • W=1 build of drivers/usb/typec/tipd/: no new warnings. The one warning, in i2c.c, is in a file this PR doesn't touch.
  • t8140-j700.dtb builds clean with CHECK_DTBS=y, with the property on both ports.
  • dt_binding_check DT_SCHEMA_FILES=usb/apple,sn201202x.yaml is clean.
  • The apple-dcp host selftests (run.py, all groups) pass 101/101. Clang 23 on the build host needed -Wno-unused-but-set-global; that's a harness warning, not this PR.

What's left:

  • One review of this merge from someone other than DjDeveloperr (the last pusher).
  • A J700 row at e9c7ed3b: DP partner hot plug and unplug on both ports.
  • A non-J700 SN201202x row, because tipd is shared.

@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) and removed merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Independent review of merge e9c7ed3b3333, by a reviewing agent that didn't make the merge: no blocking findings.

Against main, the merge is this PR's binding, J700 DT, core.c and lifecycle.py hunks. transaction.py is left as on main, which is right: main's tipd_init() now calls of_machine_is_compatible() for h17_display, and the probe fixture pulls that function in. The binding keeps both properties. Main added no new callers of cd321x_uses_dp_sid() or of the DP SID interrupt mask.

Note: #3747 and #3748 add lines at the same spots in the binding and in t8140-j700.dts, so whichever lands second needs a small merge-up.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J773g (Apple M4 Mac mini, T8132, firmware 27.2) receipt at exact head e9c7ed3b3333a5f7a531d48691df5a0d65a3bebd (booted separately from #3748), kernel 7.3.0-j773g-comp6a (boot_id=57875cbc-9f1a-4e72-94aa-866d4d596113): PASS.

  • Type-C ports enumerated cleanly: port0 ([host], partner=0x0f010100), port1 ([host], partner=0x73213102), port2 ([device], partner=0x731d3115).
  • DP-3 connected/enabled/On 3840x2160, 3/3 software DRM connector off -> detect cycles (405 ms each; not physical cable unplug), 2/2 rtcwake -d /dev/rtc1 -m freeze s2idle cycles clean (lspci/lsusb unchanged, DP-3 back), 0 tipd/DCP/WARN errors.
  • Caveat: kscreen-doctor --dpms off under the greeter was a no-op (dpms stayed On).

@aurora-silicon-review
aurora-silicon-review Bot requested review from maralcbr and removed request for joshuaswarren and maralcbr December 3, 2026 04:32

This branch has not been deployed

No deployments
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) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants