Repository navigation
arm64: dts & PCI: apple: enable J773g port 2 Ethernet and T8132 multi-port deep sleep - #2770
DjDeveloperr wants to merge 3 commits into
Conversation
Enable the J773g Broadcom Gigabit Ethernet root port (port02) and its DART (dart_apcie2) alongside the port00 radio: - Drop the port-0-only apple,managed-sids / apple,dma-range clamps on &dart_apcie0 and &pcie0 and map bus 0x200 to &dart_apcie2 in iommu-map. - Drop dart_apcie2's power-domains reference (matching dart_apcie0, since ps_apcie_sys_gp stays off under the T8132 PMGR policy) and mark &dart_apcie2 and &port02 status = "okay". Signed-off-by: Diljit Singh <hey@djdev.me>
Describe the AP CLKREQ# GPIO on T8132 PCIe port 2 (AP GPIO 162, active low) in t8132-apcie-port2.dtsi and port 0's CLKREQ# GPIO (AP GPIO 160, active low) plus both ports' ADT maximum-link-speed values (Gen2 on port00, Gen1 on port02) in t8132-j773g.dts. These properties let the PCIe host driver restore CLKREQ# input direction and root-port link-speed caps when retraining T8132 multi-port links after deep sleep. Signed-off-by: Diljit Singh <hey@djdev.me>
…eep sleep Multi-port T8132 PCIe hosts (such as J773g with port0 radio and port2 Ethernet) do not use the J713 single-port managed-radio transaction. During deep sleep, apple-sleep lowers the shared apcie_gp and apcie_phy_sw domains, wiping every port's registers, RID2SID and MSI tables, and PHY state while leaving endpoints powered under PERST#. Register a per-port deep sleep recovery path for non-managed, non-tunneled apple,t8132-pcie hosts. Save each port's interrupt mask, clock policy, MSI configuration, and RID2SID mappings in suspend_noirq and keep the host on the awake path so apple-sleep stops all ports cleanly. On resume_noirq after a real deep wake, restore each port's defaults, DT tunables (falling back to port 0's tables when a peer port omits them), PHY refclks, DBI link speed and x1 width, RID2SID and MSI mappings, host-resumed DART, and root port config space, then deassert AP PERST# and retrain the link. Notify apple-sleep via apple_sleep_radio_port_up() once a port comes back up. Signed-off-by: Diljit Singh <hey@djdev.me>
|
Review of the three commits on top of #2762 (b5b3375, 3a049d0, edcee3b) at edcee3b. J713 looks unchanged. The managed-SID and dma-range clamps stay in t8132-jxxx.dtsi and are deleted only in t8132-j773g.dts. Error paths in the retrain (edcee3b):
Overlap with apple-sleep:
Values and constants:
DT:
Testing: the 3/3 J773g deep-sleep table covers the case where both ports come back. Missing are a row where one port fails to retrain (e.g. port 2 held down), followed by a second deep sleep, and a J713 deep-sleep row at edcee3b showing the managed radio path unchanged. Assisted-by: LLM (Claude:Opus 5.5) |
|
@RyanTheTide All review items from your 05:27Z review are fixed locally (
Holding the force-push on Assisted-by: LLM (Gemini:4 Neon) |
Summary
Enable Broadcom Gigabit Ethernet on J773g APCIe port 2 (
port02/dart_apcie2) alongside the port 0 radio, and add per-port suspend/resume link retraining for multi-port T8132 PCIe controllers across real deep sleep.Commits
b5b337568c161—arm64: dts: apple: t8132-j773g: enable Broadcom Ethernet on APCIe port 2: drops port-0-onlyapple,managed-sids/apple,dma-rangeclamps on&dart_apcie0and&pcie0, maps bus0x200to&dart_apcie2, and enables&dart_apcie2and&port02.3a049d07710e5—arm64: dts: apple: t8132: wire apcie clkreq GPIOs and J773g link speeds: wiresclkreq-gpiosfor port 2 (AP GPIO 162, active low) and J773g port 0 (AP GPIO 160, active low) plus ADTmax-link-speedcaps (Gen2 onport00, Gen1 onport02).edcee3b20673e—PCI: apple: suspend and retrain T8132 multi-port controllers across deep sleep: saves each port's interrupt mask, clock policy, MSI, and RID2SID mappings insuspend_noirq, and on real deep wake restores port defaults, DT tunables, PHY refclks, DBI link speed/width, RID2SID/MSI tables, host-resumed DART, and root port config space before deasserting PERST#, retraining each link, and callingapple_sleep_radio_port_up().Dependencies
djdev/t8132-apcie-port2-shared-regs, base branch) for sharedt8132-apcie-port2.dtsiandapple,pcie.yamlbindings.soc: apple: sleep: stop all enabled apcie ports before lowering apcie) for stopping all enabled APCIe ports before lowering APCIe inapple-sleep.Live Verification — 3/3 Real Deep Sleep (
dcp66-m4prod5-deepsleep)Tested on live M4 Mac mini (
J773g/T8132, macOS 27.226B123,7.3.0-ARCH-m4prod5):boot object resumesport 0(Radio)port 2(Ethernet)tg3 end00 -> 1port 0: link restored after deep sleep(5GT/s x1)port 2: link restored after deep sleep(2.5GT/s x1)UP 1000Mb/s Full1 -> 2port 0: link restored after deep sleep(5GT/s x1)port 2: link restored after deep sleep(2.5GT/s x1)UP 1000Mb/s Full2 -> 3port 0: link restored after deep sleep(5GT/s x1)port 2: link restored after deep sleep(2.5GT/s x1)UP 1000Mb/s Fullscripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks on all 3 commits. 0 oops/warnings/SErrors across all 3 wakes.Assisted-by: LLM (Gemini:4 Neon)