Skip to content

dt-bindings: display: apple,dcp: match the Type-C DP IN routes in use - #2831

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
code-health/dt-bindings-apple-dcp-20261123
Nov 22, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
code-health/dt-bindings-apple-dcp-20261123

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

dtbs_check of the in-tree Apple DTBs reports 102 errors against display/apple,dcp.yaml, and dt_binding_check fails on the apple,dcp-typec-routes.yaml example:

  • apple,t6030-dcpext and apple,t6031-dcpext are used with the apple,dcpext fallback but are missing from the compatible list.
  • The J414/J416 T6020 external DCPs name their Thunderbolt DP IN crossbar controls typecN-dpin0/1, as apple,dcp-typec-routes.yaml describes. A conditional block that listed a few SoCs rejected -dpin names, and more than 8 mux controls, on every other SoC.
  • The typec-routes example's t6020-dcpext node lacks reg, mailbox, IOMMU and apple,bw-scratch, all of which apple,dcp.yaml requires.

Change

  • Add the two compatibles to the dcpext list.
  • Drop the SoC-list block. The block before it already caps every non-T6050 DCP at 10 controls named dp-xbar, typecN or typecN-dpin0/1, which is what the DTs use. Route names are now checked the same way on every DCP, with no extra per-SoC entry.
  • Complete the example with the T6021 dcpext2 values and give it a unit address.

Documentation-only.

Testing

Still to run

Nothing: there is no runtime effect.

Details

Remaining after this change:

t6030-j514s.dtb / t6030-j516s.dtb: dcp@2d2c00000, dcp@2d6c00000 (apple,t6030-dcpext): reg / reg-names: ['coproc'] is too short

Logs (lab store): traces/ci/20261123-code-health/logs/dtbs-check.log (before, all schemas), dtbs-check-dcp-after.log, dt-binding-dcp-after.log.

Assisted-by: LLM (Claude:Opus 5.5)

dtbs_check reports about 100 errors on the in-tree Apple DTBs against
apple,dcp.yaml:

- apple,t6030-dcpext and apple,t6031-dcpext are used with the
  "apple,dcpext" fallback (t6030-dcp.dtsi, t6031 display files) but are
  missing from the dcpext compatible list.
- The T6020 external DCPs on J414/J416 name their Thunderbolt DP IN
  crossbar controls typecN-dpin0/1, as apple,dcp-typec-routes.yaml
  describes. A conditional block listing a few SoCs rejected -dpin names
  and more than 8 mux controls on every other SoC. The block before it
  already caps all non-T6050 parts at 10 controls and dpin0/1, which is
  what the DTs use. Drop the SoC list instead of adding another entry,
  so the route names are checked the same way on every DCP.
- The apple,dcp-typec-routes.yaml example has a t6020-dcpext node without
  the reg, mailbox, IOMMU and bandwidth scratch properties apple,dcp.yaml
  requires. Add them, with the values of the T6021 dcpext2 node, and a
  unit address.

Documentation-only change. dt_binding_check for display/apple,dcp is
clean. dtbs_check of all Apple DTBs against apple,dcp.yaml goes from
about 100 errors to 8 (the t6030-dcpext nodes describe only their coproc
region).

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at 5e127c8.

  1. apple,dcp.yaml: the removed block only ever tightened the rules. It capped mux-controls at 8 and banned -dpinN for everything outside t6030-dcpext/t8132-dcpext/t6050. Every non-T6050 DCP still gets the preceding block (lines 582-597: at most 10, ^(dp-xbar|typec[0-9]+(-dpin[01])?)$). Removing it therefore can't make any DTS fail. The in-tree users that it rejected now pass on the real rule: t602x-j414-j416.dtsi:108/192 (10 and 9 entries), t603x-j514s-j516s-hdmi.dtsi:52 (10), t8132 j604/j713 (7/6), t6030-dcp.dtsi:144/244 (9).
  2. No in-tree DTS exceeds the remaining cap. The only -dpin2/3 and >10-entry lists are in t6050-*, which keep their own 21/dpin[0-3] rule.
  3. The rule is looser for SoCs whose xbar has no DP IN controls, but the driver still checks this. dcp_typec_route_wiring() (dcp-fabric.c:4668-4678) looks up typecN-dpinM by name and returns -EINVAL unless the control is mux[1 + M] of an xbar with enough controllers. The xbar node carries the capability, so no per-SoC list is needed.
  4. The t6030/t6031-dcpext compatibles match t6030-dcp.dtsi:128/228 and t6031-dieX.dtsi:157/251/359/425. The example's reg/mbox/iommu/bw-scratch values match t6021-display2.dtsi:79-90 (the 64-bit high word is dropped for the example's 1/1 cells).

Nit (not for this PR): the driver also accepts a legacy typecN-usb4 control (dcp-fabric.c:4683), which the mux-control-names pattern rejects. No in-tree DTS uses it today.

@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.

Adversarial pre-PR checklist (§1–§6) review at 5e127c841afcca5ebc83ccf7e44ae3453efbee20:

  • §1 No model gating: Pass — removes the per-SoC if/not/contains allowlist in apple,dcp.yaml that blocked -dpin0/1 and >8 mux controls outside four listed SoCs. Every non-T6050 DCP now validates uniformly under the preceding rule (maxItems: 10, ^(dp-xbar|typec[0-9]+(-dpin[01])?)$), while the driver (dcp_typec_route_wiring() in dcp-fabric.c:4668-4679) still enforces hardware xbar controller counts from DT. apple,t6030-dcpext and apple,t6031-dcpext match the in-tree apple,dcpext fallback nodes (t6030-dcp.dtsi:128, t6031-die*.dtsi). The completed apple,dcp-typec-routes.yaml example matches t6021-display2.dtsi:79-90 (with 1/1 cells) and satisfies apple,dcp.yaml required properties.
  • §2 Production-ready / §3 Safety: Pass — documentation/schema-only change; no runtime code or weakened validation.
  • §4 Clean-room & attribution: Pass — single commit with human author/committer (Ryan Murray <ryan@aurorasilicon.org>), human Signed-off-by, zero AI trailers in commit metadata, and Assisted-by: disclosed in the PR body.
  • §5 Evidence: Pass for schema-only change (dt_binding_check clean; dtbs_check against apple,dcp.yaml reduced from 102 to 8 pre-existing T6030 reg errors tracked in #2827). CI note: Host tests/host-tests passed, while Device tree checks/dt-checks is still IN_PROGRESS — wait for dt-checks to finish green before merging into MERGETRAIN-LINUX4.
  • §6 Naming: Pass.

Non-blocking nit: mux-controls description in apple,dcp.yaml:446-450 still names only T6030 and T8132 for the two DP IN tunnel states (T6020 J414/J416 uses them as well); fine for a follow-up.

Verdict: APPROVE (diff is clean; hold merge for MERGETRAIN-LINUX4 until dt-checks completes green).

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merge-train adversarial review (MERGETRAIN-LINUX4) at 5e127c8: no blockers. Merges clean on integration/aurora, alone and together with #2828-#2832.

Full review

VERDICT: NO BLOCKERS

Blockers: none.

Checked:

  • I scanned every mux-control-names list in arch/arm64/boot/dts/apple/.dts at the head. Every list
    outside T6050 has at most 10 entries and matches ^(dp-xbar|typec[0-9]+(-dpin[01])?)$:
    t602x-j414-j416.dtsi:108 (10 entries) and :192 (9); t6030-dcp.dtsi:144/:244 (9 each);
    t603x-j514s-j516s-hdmi.dtsi:52 (10); t8132-j604.dts:444/:509 (7 each); t8132-j713-j715.dtsi:190/:243
    (6 each).
  • Only the t6050-* files use -dpin2/3 or more than 10 entries (up to 15). They still match their own rule,
    since the top-level rule allows 21 entries and dpin[0-3], and the first allOf block excludes T6050.
  • So the block this PR removes was already failing on j414/j416 (t6020-dcpext) and on the j514s/j516s HDMI
    node. Removing it cannot add a new failure. The remaining allOf block (apple,dcp.yaml:582-597) still
    applies to every DCP outside T6050.
  • The new compatibles match their in-tree users: t6030-dcpext at t6030-dcp.dtsi:128/228 and t6031-dcpext at
    t6031-dieX.dtsi:157/251/359/425. The driver matches t6030-dcpext at dcp.c:10134.
  • The t6031-dcpext nodes now fall under the apple,bw-scratch required rule, because only t6031-dcp is
    exempt. All four nodes carry apple,bw-scratch (and are status = "disabled"), so this adds no new failures.
  • The commit message names the compatible list, the SoC rule and the example changes. dt-checks CI passes.

Nits (not blocking):

  1. The removed rule rejected typecN-dpin* on SoCs whose xbar has no DP IN states (for example T8103/T8112/
    T6000). After this PR the schema no longer catches that DT mistake; only the driver does, at bind time
    (dcp_typec_route_wiring() returns -EINVAL; the earlier review cites dcp-fabric.c:4668-4678, which I did
    not re-read). That is acceptable because the SoC list was already wrong (it failed in-tree DTs), but the
    loss should be known.
  2. Still open from the earlier review: the mux-controls description at apple,dcp.yaml:446-450 still names only
    T6030 and T8132 for the DP IN states, but T6020 J414/J416 and the T603x HDMI boards use them too.
  3. Still open from RyanTheTide (not for this PR): the driver also accepts a legacy typecN-usb4 name that the
    pattern rejects; no in-tree DT uses it.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Checked at cdce3146 (#2828-#2831 merged onto integration/aurora 120d6aa, clean), dtschema 2026.9.

dt_binding_check for apple,dcp goes from 7 errors to 0. CHECK_DTBS over all 138 Apple DTBs with all schemas goes from 1465 to 1349 errors with no new error anywhere. Errors attributed to apple,dcp.yaml go from 100 to 8 (the 102 in the description counts the same base log slightly differently), and 24 "failed to match any schema" lines for t6031-dcpext also go. The 8 left are the T6030 dcpext reg/reg-names entries.

The removed if/not/contains block only tightened limits (8 mux controls, no -dpinN) outside its SoC list; the block before it still caps every non-T6050 DCP at 10 and allows -dpin[01], so nothing a DT or the driver relies on loses coverage.

Unrelated and already present on base: the apple,t6030-dcp nodes in the j514s and j516s DTs match no schema, and t8122 has two dt-core errors for the j613-25g83-profile property.

@RyanTheTide
RyanTheTide merged commit 83858b3 into integration/aurora Nov 22, 2026
2 checks passed
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.

2 participants