Skip to content

arm64: dts: apple: t8132-apcie-port2: keep shared APCIe register windows - #2762

Draft
DjDeveloperr wants to merge 2 commits into
integration/aurorafrom
djdev/t8132-apcie-port2-shared-regs
Draft

DjDeveloperr wants to merge 2 commits into
integration/aurorafrom
djdev/t8132-apcie-port2-shared-regs

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Summary

t8132.dtsi defines five shared APCIe register windows on &pcie0 (axi2af, cio3pll, clkgen, phy-block, phy-ip) that drivers/soc/apple/sleep.c maps to apply ANS PCIe tunables across deep sleep.

t8132-apcie-port2.dtsi overwrote &pcie0's reg and reg-names with only config, rc, port0, phy0, port2, phy2, silently dropping all five shared windows on every T8132 board including t8132-apcie-port2.dtsi (J773g, J623, J624, J604). As a result apple-sleep logs no PCIe tunables for ANS and refuses deep sleep.

Retain all five shared windows alongside port2 and phy2.

Verification

  • scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.
  • t8132-j773g.dtb compiles cleanly with all 11 &pcie0 register windows (config, rc, port0, phy0, axi2af, cio3pll, clkgen, phy-block, phy-ip, port2, phy2).
  • Draft pending live J773g 27.2 deep-sleep hardware row currently running on 7.3.0-ARCH-m4prod2.

Assisted-by: LLM (Gemini:4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Checked 635c382: the five added windows match t8132.dtsi's &pcie0 exactly (addresses, sizes, names), and the PCIe driver looks up port%d / phy%d by name, so putting the shared windows before port2/phy2 changes nothing for it. This fixes the J604 (and the desktop boards that include t8132-desktop.dtsi) along with the J773g.

The underlying trap is that a board dtsi must restate the whole reg list to add one port, so the next shared window added to t8132.dtsi gets dropped the same way. Worth a comment in t8132-apcie-port2.dtsi saying the list must stay a superset of the base node's, or a dtbs_check schema rule requiring the shared names on apple,t8132-pcie.

LGTM once the J773g deep-sleep row is in (no "no PCIe tunables for ANS", deep sleep entered and resumed).

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Updated 9dcdf336d2683 with a comment above &pcie0 in arch/arm64/boot/dts/apple/t8132-apcie-port2.dtsi noting that the reg/reg-names override replaces the base property whole and must stay a superset of &pcie0's shared windows in t8132.dtsi (scripts/checkpatch.pl --strict 0/0/0, all t8132-*.dts dtc OK).

Live J773g 27.2 deep-sleep verification row (dcp63-m4prod3-full) is running now and will be attached once complete.

Assisted-by: LLM (Gemini:4 Neon)

Boards that enable APCIe port2 on T8132 (such as J773g) combine the
shared APCIe register windows (axi2af, cio3pll, clkgen, phy-block,
phy-ip) with the port2 and phy2 windows.

Allow up to 11 reg entries and add the optional port2/phy2 pair after
phy-ip for apple,t8132-pcie.

Signed-off-by: Diljit Singh <hey@djdev.me>
t8132.dtsi defines the 9 shared APCIe register windows (config, rc,
port0, phy0, axi2af, cio3pll, clkgen, phy-block, phy-ip) on &pcie0.
Including t8132-apcie-port2.dtsi replaced reg and reg-names with only 6
entries, dropping the 5 shared windows needed by the T8132 PCIe
controller when port2 is enabled (for example on J773g Ethernet).

Keep the 5 shared windows in reg and reg-names and append port2 and phy2
after phy-ip.

Signed-off-by: Diljit Singh <hey@djdev.me>
@RyanTheTide

Copy link
Copy Markdown
Contributor

On the tip (daa9e2d) t8132-apcie-port2.dtsi still overrides pcie0's reg-names with only config, rc, port0, phy0, port2, phy2, so the five shared windows are still dropped on every board that includes it; this fix is not on integration/aurora and applies cleanly there. The only thing the draft was waiting for was the J773g deep-sleep row. #2770 and #2763 report real deep-sleep cycles on kernels that carry this change; @DjDeveloperr, if one of those boots shows no "no PCIe tunables for ANS" line with this head, posting it here would let this leave draft, and #2770 is stacked on it.

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