Skip to content

PCI/ASPM: L1 PM Substates and Clock PM by default where the DT routes CLKREQ# (M3 Air Wi-Fi) - #2735

Merged
DjDeveloperr merged 7 commits into
mainfrom
j615pwr2/aspm-dt-clkreq
Nov 24, 2026
Merged

DjDeveloperr merged 7 commits into
mainfrom
j615pwr2/aspm-dt-clkreq

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On devicetree platforms the default ASPM policy turns on L0s and L1 but leaves the L1 PM Substates (L1.1/L1.2) and Clock PM off, because both need CLKREQ# and the kernel can't tell whether it is wired. On Apple silicon Macs the Wi-Fi/Bluetooth link therefore never reaches L1.2. Arch and NixOS work around this in userspace with powersupersave; Fedora doesn't, and neither should have to.

Change

  1. PCI/ASPM: on links whose port node has supports-clkreq (the existing pci-bus-common property meaning "CLKREQ# is routed between root port and device"), add the supported L1 PM Substates to the default ASPM states and enable Clock PM by default. Links without the property don't change. aspm-no-l1ss / aspm-no-l1 still win, and the policy knobs work as before.
  2. t8122-j615.dts: supports-clkreq on the Wi-Fi port (port00). It started in the shared J613/J615 dtsi; the last commit moves it to the J615 board file, because all the CLKREQ# evidence is from the J615. The J615 DTBs are byte-identical either way; the J613 gets the line back with its own row. The J615 ADT gives the Wi-Fi bridge a CLKREQ function, the pins are muxed to it, and both ends advertise L1SS + Clock PM.

There are no chip or board checks and no new command-line or module parameters: the behaviour follows the DT property.

Testing (M3 MacBook Air 15, J615)

On the default policy (no knob), with this kernel change and the default J615 DTB plus only supports-clkreq on port00 (one-shot boot, fleet cmdline):

  • dmesg: ASPM: default states L1 ASPM-L1.1 ASPM-L1.2 PCI-PM-L1.1 (the Clock PM default logs at debug level); Wi-Fi (01:00.0) and BT (01:00.1) both show clkpm/L1.1/L1.2 on, still on after 3 resumes.
  • Wi-Fi 50/50 and 20/20 pings, BT powered, s2idle 3/3, no new kernel errors, 0 failed units.
  • s2idle 2.91 W, against 3.09 W without the change on the same Mac. Measured as battery drain over 120 s RTC-woken cycles.

Again at head e873def on the current J615 default (fleet81 + this PR, default policy, default cmdline, Stage 2 = default + only supports-clkreq):

  • Wi-Fi/BT links clkpm/L1.1/L1.2 on; the PCIe PHY power state goes to the same idle state macOS uses.
  • Awake idle, panel off: 232 and 252 mW lower than with L1SS + Clock PM turned off on the same boot (A/B/A/B, 90 s windows).
  • Wi-Fi 10 x 128 MiB each way: no slowdown (same-boot A/B: receive 104-144 Mbit/s on vs 88-106 off, send 259-277 vs 233-275).
  • BT powered, 300 s LE scan (69 devices), no hci0 timeouts. s2idle 2/2. 0 SELinux denials, 0 failed units, no new kernel errors.

Re-verified at exact head cee358115c4446 on J615 (default cmdline, Stage 2 = live J615 default + 1-line supports-clkreq; on pci@0,0):

  • Kernel probe before userspace: ASPM: default states L1 ASPM-L1.1 ASPM-L1.2 PCI-PM-L1.1, ClockPM+; both 01:00.0 (Wi-Fi) and 01:00.1 (BT) report clkpm=1 l1_aspm=1 l1_1_aspm=1 l1_2_aspm=1 l1_1_pcipm=1 and keep them after traffic, scan, and 2/2 s2idle resumes.
  • Wi-Fi 20/20 pings (3.105 ms avg), 5x 64 MiB TX 242-257 Mbit/s / RX 156-173 Mbit/s; BT 60 s LE scan (46 devices, 0 hci0 timeouts); same-boot A/B/A dark idle -188 mW total median (-145 mW SoC median); s2idle 2/2; 0 Oops/BUG/WARNING, 0 SELinux AVC denials, 0 new kernel errors.

Tested: J615 (M3 Air 15", T8122) exact head cee358115c4446 default-path row (L1.1/L1.2/ClkPM on at probe, Wi-Fi 5x64 MiB, 60 s BT LE scan, A/B/A dark idle power delta, s2idle 2/2, 0 AVC/oops/new errors); plus J313 backport row (2nd Mac signal).
Risk: Low — strictly opt-in via DT supports-clkreq (currently only J615 Wi-Fi port); links without the property and ACPI platforms are unchanged, and aspm-no-l1ss/aspm-no-l1 and pcie_aspm.policy overrides continue to take precedence.

Still to run

  • J613 row, then the line moves back to the shared dtsi.
  • BT audio (A2DP/isoc) under L1.2: no Bluetooth audio sink in our lab.
  • Other Macs: the ADTs of M1 (J313), M3 Pro/Max and M4 (J713, J773, J773s, J616c, J604) and M5 (J873s, J873) carry the same CLKREQ function on the Wi-Fi bridge. They get the property in follow-up DT changes, each with its own row (or the boot loader can set it from the ADT).
Reviewer detail

Why the property, not a policy change. Upstream enables L0s/L1 by default on DT platforms and deliberately leaves L1SS off because L1.2 without a routed CLKREQ# can hang a link. supports-clkreq is the existing binding (dtschema pci-bus-common) for exactly that fact, so the default follows the hardware description: links without it are untouched, aspm-no-l1ss/aspm-no-l1 still win (they strip aspm_support first), and the sysfs/pcie_aspm.policy knobs behave as before. Clock PM is the same story (CLKREQ#-based), so it gets the same default.

Where it hooks. pcie_aspm_override_default_link_state() (DT branch) ORs aspm_support & PCIE_LINK_STATE_L1SS into aspm_default when either end's node has the property; the "default states" info line now names the substates. pcie_clkpm_override_default_link_state() runs right after pcie_clkpm_cap_init() and sets clkpm_default when the link is Clock PM capable. Both are no-ops without the property and on ACPI.

J615 hardware basis. The J615 ADT gives the Wi-Fi bridge (pci-bridge0) a CLKREQ function and an L1 PM-substate control for the link; the DT muxes the CLKREQ pins on the PCIe controller; both functions of the BCM4388 (01:00.0 Wi-Fi, 01:00.1 BT) expose l1_1_aspm/l1_2_aspm/clkpm in sysfs. The ADTs of the other Macs listed under "Still to run" carry the same CLKREQ function on their Wi-Fi bridge.

Measurements (J615, fleet78, panel blanked, BAAC on force-discharge). Same boot, same USB-C topology, A/B/A/B with the policy knob (= the states this change makes default):

awake 60 s s2idle 120 s x2
default 3279 / 3209 mW 3086 / 3093 / 3091 / 3089 mW
powersupersave (L1.1/L1.2 + Clock PM) 2975 / 2968 mW 2886 / 2886 / 2894 / 2887 mW

Absolute numbers include a live USB4 link to the lab tether; the deltas don't depend on it. Data: traces/power/20261121-j615-f78-s2idle-floor (lab store).

Default-path row (the change itself). Kernel = fleet78 + commit 1, Stage 2 = the J615 default with only supports-clkreq; added on pci@0,0 (dtc diff 1 line), policy left at default: s2idle 2916 / 2911 / 2911 mW, awake 3131 mW; lspci L1SubCtl1 PCI-PM_L1.2- PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+, T_PwrOn 6 us. The kernel messages are the AER-enabled notice and the known 10x hci0: Failed to read codec capabilities (-22) that the stock kernel prints too. Data: traces/power/20261122-j615-l1ss-default.

Checks. make W=1 drivers/pci/pcie/aspm.o clean, checkpatch clean, CHECK_DTBS=y apple/t8122-j613.dtb apple/t8122-j615.dtb: no new warnings (one existing apple,macaudio dai-link warning).

… CLKREQ#

On devicetree platforms the default ASPM policy enables L0s and L1 but
leaves the L1 PM Substates and Clock PM off, because both need CLKREQ#
between the two ports and the kernel cannot see whether it is routed.

The devicetree can say so: "supports-clkreq" (pci-bus-common) states that
CLKREQ# is routed from the root port to the downstream device. On links
whose port node carries it, add the supported L1 PM Substates to the
default ASPM states and enable Clock PM by default if both ends support
it. Nothing changes for links without the property, "aspm-no-l1ss" and
"aspm-no-l1" still win, and the policy knobs work as before.

On an M3 MacBook Air (J615) the Wi-Fi/Bluetooth link then enters L1.1/L1.2
with Clock PM under the default policy, and s2idle draws 2.91 W instead
of 3.09 W.

Signed-off-by: Ryan Murray <[email protected]>
…uted

The Wi-Fi/Bluetooth module's CLKREQ# is wired to the SoC on the M3
MacBook Airs: the ADT gives the Wi-Fi PCIe bridge a CLKREQ function, the
pin is muxed to it, and both ends advertise L1 PM Substates and Clock PM.

Add "supports-clkreq" to the port so the link uses L1.1/L1.2 and Clock PM
by default.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merge-train adversarial review (MERGETRAIN-LINUX2) at 7bc29a8: NO BLOCKERS.

Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below.

Full review

#2735 PCI/ASPM: L1 PM Substates and Clock PM by default where the DT routes CLKREQ# (M3 Air Wi-Fi) @7bc29a89

VERDICT: NO BLOCKERS

drivers/pci/pcie/aspm.c:931-932 adds aspm_support & L1SS to aspm_default only when the root port or the endpoint node has supports-clkreq. It runs after the aspm-no-l1/aspm-no-l1ss stripping (aspm.c:905-919), so those still win. aspm.c:950-958 sets clkpm_default only if the link is clkpm_capable. It runs before pcie_set_clkpm(link, policy_to_clkpm_state(link)) (aspm.c:1295-1297), and clkpm_disable from the blacklist still overrides it inside pcie_set_clkpm(). Generic side effects: in-tree supports-clkreq users are the freescale and rockchip DTs. They put it on the host-controller node, which is not link->pdev (the root-port pci_dev) or the endpoint, so device_property_present() does not see it there. The only Apple user is the new &port00 (t8122.dtsi:1476) in t8122-j613-j615.dtsi:118-120. It is a DT property, not a chip check or a param.

Nits:

  • t8122-j613-j615.dtsi:113-120: the property goes into the shared J613/J615 dtsi, but the hardware basis (ADT CLKREQ function, pin mux) and every row are J615 only. If the J613 Wi-Fi module or its CLKREQ# routing differs, L1.2 without a working CLKREQ# can hang the Wi-Fi/BT link on J613. Either get the J613 row before merge or put the property in t8122-j615.dts only until then.
  • aspm.c:957: pci_info for every such link on every boot is fine but chatty. pci_dbg would do, since the "default states" line already names the substates.
  • Upstreamability: this changes the meaning of supports-clkreq for every DT platform that places it on a root-port node. That's fine in our fork, but expect pushback upstream.

Missing rows: J613 (same dtsi) default-path boot with L1.2 on, Wi-Fi/BT traffic and s2idle. On J615: a longer soak than 50 pings (Wi-Fi throughput plus an idle/wake cycle over minutes, and BT A2DP audio with Clock PM on, since L1.2 exit latency affects BT isoc). Deep-sleep interaction does not apply on T8122 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.

Reviewed at live head 7bc29a898525203ffe2636f256f5a1ac9fe6be18 against all 6 sections of pre-pr-checklist.md.

0 code/policy/attribution blockers — holding only for missing §5 hardware verification rows on the affected boards before APPROVE.

Verified (§1–§4, §6, CI)

  • §1–§2 Design & cross-SoC safety: Uses the standard DT property supports-clkreq rather than chip/board gates or new cmdline/module parameters. Verified across the whole tree that existing supports-clkreq users (freescale/imx8*, imx9*, rockchip/rk3568/rk3588) place it on the PCIe host-controller node, not on the root-port (link->pdev) or endpoint (link->downstream) nodes inspected by pcie_link_has_aspm_override(), so no non-Apple boards or other Apple boards are inadvertently changed.
  • §3 ASPM & Clock PM ordering:
    • In pcie_aspm_override_default_link_state(), link->aspm_default |= link->aspm_support & PCIE_LINK_STATE_L1SS runs after aspm-no-l1 and aspm-no-l1ss strip aspm_support, so DT opt-outs still win.
    • pcie_aspm_remove_cap() (used by pcie-apple.c for T6050 adopted ports and USB4 tunnels) clears L1 support, and pcie_config_aspm_link() strips L1SS whenever L1 is absent; pcie_aspm=off still returns early via !aspm_support_enabled.
    • pcie_clkpm_override_default_link_state() runs after pcie_clkpm_cap_init() and before pcie_set_clkpm(); clkpm_disable still takes precedence in pcie_set_clkpm().
  • §4 Clean-room & attribution: Both commits (b50908437311, 7bc29a898525) have human author/committer (Ryan Murray <[email protected]>) and human Signed-off-by: only (zero AI trailers); PR body includes Assisted-by:.
  • §6 Naming & CI: Clean; dt-checks and host-tests are both green on 7bc29a898525.

Remaining §5 hardware rows needed to APPROVE

  1. 13-inch M3 MacBook Air (J613): t8122-j613-j615.dtsi enables supports-clkreq; on &port00 for both J613 and J615, but all ADT/hardware evidence in this PR is J615-only. Please post a J613 default-path boot row confirming L1.1/L1.2 + Clock PM active, Wi-Fi/BT traffic, s2idle, and regression checks (0 SELinux denials, 0 failed units, 0 new kernel errors) — or scope &port00 { supports-clkreq; }; to t8122-j615.dts until J613 is verified.
  2. 15-inch M3 MacBook Air (J615): Please confirm 0 SELinux denials (AVC) on the default-path row and add a longer Wi-Fi throughput + BT audio (isoc/A2DP) soak under Clock PM + L1.2 (beyond 50/20 pings) to verify L1.2 exit latency does not disturb BT audio or sustained Wi-Fi.

Non-blocking nits

  • drivers/pci/pcie/aspm.c:951 (pcie_clkpm_override_default_link_state()): check || link->clkpm_disable alongside !link->clkpm_capable || link->clkpm_default. On a blacklisted pre-1.1 link with supports-clkreq, pcie_clkpm_cap_init() sets clkpm_disable = 1; without checking it here, clkpm_default is set to 1 and ASPM: default Clock PM (supports-clkreq) is logged even though pcie_set_clkpm() immediately refuses to enable Clock PM.
  • drivers/pci/pcie/aspm.c:957: consider pci_dbg() instead of pci_info(), as the preceding "ASPM: default states..." line already reports L1SS activation.

Assisted-by: LLM (Gemini 4 Neon)

pcie_clkpm_cap_init() sets clkpm_disable on blacklisted (pre-1.1) links,
and pcie_set_clkpm() then refuses Clock PM. The supports-clkreq default
still set clkpm_default and logged that Clock PM was on. Skip such links,
and log the default at debug level: the "ASPM: default states" line
already reports the L1 PM Substates.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Pushed e873def (fast-forward), which fixes both nits:

  • pcie_clkpm_override_default_link_state() now skips links with clkpm_disable set, so a blacklisted pre-1.1 link no longer reports a Clock PM default that pcie_set_clkpm() refuses.
  • The Clock PM default logs with pci_dbg().

New J615 rows at this head, on the current default (fleet81 + this PR, default ASPM policy and cmdline; DTB = the default plus only supports-clkreq on port00):

  • 0 SELinux denials, 0 failed units, Enforcing, no new kernel error lines (same classes and counts as on fleet81 without the PR).
  • Wi-Fi: 10 x 128 MiB each way, sending 259-269 Mbit/s and receiving 91-122 Mbit/s (signal -65 dBm, 40 MHz). In a same-boot A/B with L1SS + Clock PM on vs off, 3 transfers per arm, receive was 104-144 on vs 88-106 off and send 259-277 vs 233-275. L1.2 exit latency costs nothing measurable.
  • BT: powered, a 300 s LE scan saw 69 devices with no hci0 timeouts. s2idle 2/2 with Wi-Fi and BT back and the link states kept.
  • Power: idle with the panel off is 232 / 252 mW lower than with L1SS + Clock PM off (A/B/A/B on one boot).

Not covered: BT audio (A2DP/isoc). We have no Bluetooth audio sink in the lab. The J613 row is requested from the J613 owners. If you'd rather not wait for it, I can move supports-clkreq into t8122-j615.dts for now.

Numbers and method

Kernel 7.3.0-aurora-f81l1ss = fleet81 1b940c26 + b509084, 7bc29a8, e873def. One grub one-shot with a one-shot Stage 2 whose DTB differs from the default only by supports-clkreq on /soc/pcie@580000000/pci@0,0. After that, a plain reboot back to the default.

  • dmesg: pci 0000:01:00.0: ASPM: default states L1 ASPM-L1.1 ASPM-L1.2 PCI-PM-L1.1
  • sysfs: 01:00.0 and 01:00.1 clkpm=1 l1_aspm=1 l1_1_aspm=1 l1_2_aspm=1 l1_1_pcipm=1, unchanged after the Wi-Fi soak, the BT scan and both s2idles.
  • PMGR: APCIE_PHY_SW reads 0x1400024f (the value macOS idles at; 0x1f0000ff without L1SS). APCIE_GP and APCIE_ST are power-gated (actual state 0).
  • Power, 1 Hz SMC Total System Power, 30 s settle + 90 s, AC, panel off: on 3430 / off 3662 / on 3069 / off 3321 mW.
  • Same-day idle attribution on the unchanged default: enabling L1SS through the policy knob gives -221 mW system / -122 mW SoC, which matches.
  • Wi-Fi throughput: ssh stream between the buildbox (wired) and the Air (Wi-Fi), 128 MiB per transfer.
  • Kernel error lines on the PR boot: DCP AFK init props (2), BT Failed to read codec capabilities at boot (10, same 10 on fleet81), gfx PS after resume and dwc3 genpd_prepare -11 at suspend (both from the s2idles, also on fleet81).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at e873def: one blocker, in the DT commit; the ASPM code has none.

Since 7bc29a8 there is one new commit: pcie_clkpm_override_default_link_state() skips links with clkpm_disable set and logs at debug level. Both are Dj's nits, done as asked.

Code at this head:

  • The L1SS default is added after aspm_l1ss_init() and after the aspm-no-l1 / aspm-no-l1ss stripping, so the opt-outs still win and only supported substates are taken.
  • The Clock PM default is set after pcie_clkpm_cap_init() and before the first pcie_set_clkpm(); a blacklisted link is skipped, and the performance policy still turns both off.
  • All other in-tree DTs with supports-clkreq (freescale, rockchip) put it on the host-controller node, which is neither the root-port nor the endpoint device, so no other board changes.
  • No chip or board check, no parameter. A test merge onto integration/aurora 6732e74 is clean; dt-checks and host-tests are green.

Blocking:

  1. supports-clkreq sits in t8122-j613-j615.dtsi, so it states a board fact for the J613 too, and the PR has no J613 evidence: the ADT citation, the pin argument and every row are J615. The CLKREQ pin mux is SoC-level (t8122.dtsi), so it says nothing about the J613 board. If the J613 does not route CLKREQ#, its default boot puts the Wi-Fi/Bluetooth link into L1.2 without it. Dj's review holds on the same point and it is still open at this head. Either move the three lines into t8122-j615.dts now (the J613 gets them back with its own row), or post the J613 row first: default boot, L1.1/L1.2 and Clock PM on, Wi-Fi and BT traffic, s2idle, 0 AVC, 0 failed units, 0 new kernel errors.

Not blocking: BT audio (A2DP/isoc) under L1.2 is still unmeasured on the J615. The 300 s LE scan and the Wi-Fi A/B are good, but they do not exercise isoc latency; worth a row when a sink is available.

Assisted-by: LLM (Claude:Opus 5.5)

…3 is checked

The supports-clkreq line for the Wi-Fi port sat in the shared J613/J615
dtsi, so it also told the J613's kernel that CLKREQ# is routed there.
The CLKREQ# evidence (the ADT's CLKREQ function on the Wi-Fi bridge and
the hardware rows) is from the J615 only, and the pin mux in t8122.dtsi
says nothing about the board.

Move the property to t8122-j615.dts. The J615 DTBs are unchanged; the
J613 DTBs lose the property until a J613 row shows its link is fine
with Clock PM and L1.2.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Pushed 2384bc5: supports-clkreq moves from t8122-j613-j615.dtsi to t8122-j615.dts. The J613 rows aren't available, so the line now covers only the board the evidence comes from.

  • Decompiled DTBs before and after: t8122-j615.dtb and t8122-j615-25g83.dtb are identical. t8122-j613.dtb and t8122-j613-25g83.dtb lose only supports-clkreq on port00.
  • So the J615 rows at e873def still stand for this head. With the line gone, the J613 keeps today's behaviour: no L1SS or Clock PM default on its Wi-Fi link.
  • When someone with a J613 posts the row (default boot, L1.1/L1.2 + Clock PM on, Wi-Fi + BT traffic, s2idle, 0 AVC / 0 failed / 0 new kernel errors), the line can move back to the shared dtsi.

Assisted-by: LLM (Claude:Opus 5.5)

@mmdisbrow

Copy link
Copy Markdown
Contributor

Tested both drivers/pci/pcie/aspm.c commits from #2735 on an M1 MacBook Air (apple,j313, apple,t8103) with supports-clkreq; added to /soc/pcie@690000000/pci@0,0.

Machine and build

  • Hardware. MacBook Air M1 (apple,j313, apple,t8103), BCM4378 Wi-Fi (01:00.0, 14e4:4425) and Bluetooth (01:00.1, 14e4:5f69).
  • Firmware. asahi,os-fw-version: 13.5, asahi,system-fw-version: 26.6.2.
  • Kernel. Local 7.2.11-tier1-j313-ARCH+ build (omacom/linux-aurora 7.2.11) carrying PCI/ASPM: L1 PM Substates and Clock PM by default where the DT routes CLKREQ# (M3 Air Wi-Fi) #2735 commits b5090843 and e873def2, a 6-line pcie_link_has_aspm_override() backport from 7.3, and a 1-line fdtput addition of supports-clkreq; to the booted J313 DTB (verified with dtc). ASPM policy and the kernel command line were left at their defaults.

Boot, s2idle, and sustained 5 GHz Wi-Fi checks

  • dmesg logged pci 0000:01:00.0: ASPM: default states L1 ASPM-L1.1 ASPM-L1.2 PCI-PM-L1.1 PCI-PM-L1.2.
  • Both 01:00.0 and 01:00.1 report l1_aspm, l1_1_aspm, l1_2_aspm, l1_1_pcipm, l1_2_pcipm, and clkpm as 1 in sysfs.
  • lspci -vv shows L1SubCtl1: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ on 00:00.0 and 01:00.0, and LnkCtl: ClockPM+ on 01:00.0 and 01:00.1.
  • Across 3 s2idle cycles:
    • All 3 resumed cleanly with L1SubCtl1, ClockPM+, and 0 AER (TOTAL_ERR_COR=0, TOTAL_ERR_FATAL=0, TOTAL_ERR_NONFATAL=0 on 00:00.0, 01:00.0, and 01:00.1) preserved after every resume.
    • Bluetooth stayed Powered: yes, scanned cleanly (44, 50, and 93 device events), and logged 0 new hci0 errors.
    • Wi-Fi passed 10 of 10 pings (0% loss) after resumes 2 and 3. Cycle 1 timed out at the script's 30 s post-resume wait while wlan0 was reconnecting to an iPhone hotspot (no PCIe or AER errors).
  • Sustained 5 GHz Wi-Fi transfer under steady-state L1SS and Clock PM (no sysfs toggling, 5220 MHz, -59 to -62 dBm, power_save off):
    • Completed 150 MB of HTTPS downloads (three 50 MB transfers at 61.8, 180.7, and 63.8 Mbit/s, internet-bound) and 30 MiB of HTTPS uploads (three 10 MiB transfers at 19.9, 19.6, and 20.6 Mbit/s), with wlan0 interface byte deltas of 168 MB received and 38.5 MB sent.
    • Gateway pings (60 at 0.2 s) were 60 of 60 before transfers (7.0 ms average, 21.9 ms max) and 58 of 60 after transfers (3.3% loss, 7.5 ms average, 21.8 ms max).
    • All 12 link/* controls stayed 1, all 12 AER counters stayed 0, Wi-Fi rx_errors, tx_errors, rx_dropped, and tx_dropped stayed 0, and 0 new kernel messages matching brcmf|pci|aspm|aer|hci0 appeared.

Awake idle power (preliminary; clean two-boot A/B planned for the J313 DT follow-up)

In a same-boot display-off battery A/B toggling /sys/bus/pci/devices/0000:01:00.0/link/* live, clean rounds 1 to 3 measured -121, -161, and -213 mW (median -161 mW). After 7 live flips of those sysfs controls under traffic, round 4 aspm-l1-only hit brcmf_msgbuf_query_dcmd_len: Timeout on response for query command (-5) (never observed in steady state; PCIe AER remained 0), leaving the full 6-round run inconclusive. Clean two-boot steady-state DTB A/B power numbers (no live sysfs flipping) will accompany the J313 DT follow-up PR.

Live-toggle A/B details (6 rounds x 30 s, inconclusive)
  • System power across all 6 rounds (SMC total, matching battery voltage times current): 0.774 to 0.602 W (-178 mW paired median, -23.0%, all 6 rounds lower, exact paired Wilcoxon p = 0.0312). Heatpipe (SoC) power dropped from 0.460 to 0.358 W (-98 mW paired median, all 6 rounds). Wi-Fi and Bluetooth temperature dropped from 30.30 to 30.01 °C (-0.29 °C, all 6 rounds).
  • Failure breakdown during live sysfs toggling: 61 Wi-Fi counter increments (round 4 aspm-l1-only 25 TX errors and 7 TX drops, round 5 aspm-l1-only 28 TX drops, round 5 aspm-l1ss-default 1 TX drop), zero Wi-Fi traffic in rounds 5 and 6, power_save changed during round 5, both post-run pings failed with Network is unreachable, and post-run WEXT restore failed with -5. PCIe AER stayed 0 throughout.

Not tested

  • LAN iperf3 throughput (L1.2 against L1-only), Bluetooth A2DP and isochronous audio, s2idle sleep power drain, and other T8103 boards.

Assisted-by: LLM (Gemini 4 Neon, Claude Opus 5.5, GPT-6.2-sol)

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at 4845d063: not ready yet

Check Detail
CI at head ok 3 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 4845d063, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text adopt when you next edit add 'one-way' or 'two-way' in Risk (guide)

Areas: area:platform

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

Resolve the end-of-file conflict in arch/arm64/boot/dts/apple/t8122-j615.dts
so both &nvram_qspi and &port00 supports-clkreq are kept.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 24, 2026 14:04

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

Verdict: FINISH at cee358115c44
Blockers:

  1. CI at cee358115c44: dt-checks and host-tests are still in progress; wait for both to pass.
  2. §5 exact-head hardware evidence: cee358115c44 merged main with a conflict resolution in touched file arch/arm64/boot/dts/apple/t8122-j615.dts, so the e873def2 J615 row is no longer at head. Post a J615 default-path row at cee358115c44 (or a fleet candidate containing cee358115c44 unchanged) with regression checks (0 SELinux denials, 0 failed units, 0 new kernel errors) plus a second-Mac regression check for shared drivers/pci/pcie/aspm.c, and add Tested: and Risk: lines to the PR body.

Checked: §1–§4 and §6 pass across the full diff (drivers/pci/pcie/aspm.c, arch/arm64/boot/dts/apple/t8122-j615.dts), all 5 commits, and the PR text; prior review nits and the J613 scope concern from 7bc29a898525 are resolved. §5 is pending CI completion and exact-head hardware evidence at cee358115c44.

Evidence
  • Delta since 7bc29a898525:
    • e873def277a7: drivers/pci/pcie/aspm.c:951-958 now checks link->clkpm_disable in pcie_clkpm_override_default_link_state() so blacklisted pre-1.1 links are skipped, and switches the Clock PM log to pci_dbg().
    • 2384bc598077: moves &port00 { supports-clkreq; }; out of shared arch/arm64/boot/dts/apple/t8122-j613-j615.dtsi into arch/arm64/boot/dts/apple/t8122-j615.dts, leaving J613 untouched until verified on hardware.
    • cee358115c44: merges main and resolves the EOF conflict in arch/arm64/boot/dts/apple/t8122-j615.dts cleanly, preserving both &nvram_qspi { read-only; }; and &port00 { supports-clkreq; };.
  • §1–§3 PCIe ASPM L1SS & Clock PM safety:
    • drivers/pci/pcie/aspm.c:931-932: gated strictly on DT supports-clkreq (no chip/board/firmware gates, no new cmdline/module parameters). Runs after aspm_l1ss_init() (which checks both ends' PCI_L1SS_CAP_L1_PM_SS, per-substate capabilities, and child->ltr_path for ASPM L1.2) and after aspm-no-l1 / aspm-no-l1ss strip aspm_support, so DT opt-outs still win.
    • drivers/pci/pcie/aspm.c:949-959 & 1285-1286: runs after pcie_clkpm_cap_init() (which verifies PCI_EXP_LNKCAP_CLKPM across all functions on linkbus) and before pcie_set_clkpm(). pcie_config_aspm_link() and pcie_set_clkpm_nocheck() update saved PCIe/L1SS state for suspend/resume, and pcie_aspm_remove_cap() / apple_pcie_adopted_no_clkpm() / pcie_aspm=off / pcie_aspm.policy=performance retain precedence.
    • Repo-wide check of supports-clkreq confirms all non-Apple DTs (freescale/imx8*, imx9*, rockchip/rk3568/rk3588) place it on the host-controller node rather than the root-port or endpoint nodes queried by pcie_link_has_aspm_override(). On Apple Silicon, only t8122-j615.dts (and t8122-j615-25g83.dts which includes it) carries supports-clkreq on &port00 (Wi-Fi/BT); NVMe, Ethernet, and Thunderbolt ports are unaffected.
  • §4 & §6 Attribution and naming: All 5 commits (b50908437311, 7bc29a898525, e873def277a7, 2384bc598077, cee358115c44) have human author/committer (Ryan Murray <[email protected]>) and human Signed-off-by: only. Zero AI attribution in commits, PR title, or PR body. Naming clean.
  • §5 CI & hardware rows at cee358115c44: pr-readiness and pr-text passed; dt-checks and host-tests are IN_PROGRESS. J615 results at e873def2 (-232/-252 mW awake idle A/B/A/B, 10x128 MiB Wi-Fi each way, 300 s BT LE scan, 2/2 s2idle, 0 SELinux denials, 0 failed units, 0 new kernel errors) and the M1 Air J313 backport test comment are encouraging, but a fresh J615 row at cee358115c44 plus a second-Mac regression check for the shared aspm.c change are needed before approval.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict: FINISH, then merge, at cee358115c44 (no code blocker; it needs one J615 row at this head)

Blockers: none in the code

Checked: this is a re-check after the main forward merge. At head the PR diff is still exactly t8122-j615.dts +9 (&port00 { supports-clkreq; }) and drivers/pci/pcie/aspm.c +30/-2. The conflict in t8122-j615.dts was resolved by appending the block at the end of the file, and no other file is touched. The code findings of the earlier review at e873def2 still hold:

  • The L1SS default is added after aspm_l1ss_init() and after the aspm-no-l1 / aspm-no-l1ss stripping, so the opt-outs win, and only supported substates are taken.
  • L1.2 still drops when ltr_path is not set.
  • The Clock PM default sits between pcie_clkpm_cap_init() and the first pcie_set_clkpm(), and skips links with clkpm_disable.
  • pcie_link_has_aspm_override() checks only the root-port and endpoint nodes, so other in-tree supports-clkreq users (on host-controller nodes) are unchanged.
  • No chip, board or parameter gates. CI is green: dt-checks, host-tests, pr-text.

The J313 (T8103) row from @mmdisbrow above is a good second-Mac signal for the shared aspm.c. It shows ASPM: default states L1 ASPM-L1.1 ASPM-L1.2, s2idle and sustained Wi-Fi with a DT-added supports-clkreq. It ran on a 7.2.11 backport, not at this head.

Still needed before merge:

  1. A J615 default-path row at cee358115c44, or a fleet build that contains it unchanged: L1.1/L1.2 + Clock PM on the Wi-Fi link, Wi-Fi + BT traffic, s2idle, 0 AVC / 0 failed units / 0 new kernel errors. The J615 rows at e873def2 came from before the main merge.
  2. Owner of the PR text: add the Tested: / Risk: lines that pr-readiness asks for.
Evidence
  • gh pr diff 2735 at cee358115c44: 2 files, +39/-2.
  • Read drivers/pci/pcie/aspm.c at head, lines 878-958 (pcie_link_has_aspm_override(), pcie_aspm_override_default_link_state(), pcie_clkpm_override_default_link_state()), line 808 (ltr_path drops L1.2) and lines 1026-1032 (the override runs after aspm_l1ss_init()).
  • CI at head: dt-checks pass, host-tests pass, pr-text pass.

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Nov 24, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Exact-head verification row at cee358115c4446 on M3 MacBook Air 15" (J615, T8122):

  • Environment: one-shot boot (7.3.0-aurora-fleet87 Image built from exact head cee358115c4446 + modules-7.3.0-aurora-fleet87, default fleet85 kernel cmdline with no pcie_aspm knob, Stage 2 = live J615 default dd01f13c + 1-line supports-clkreq; on /soc/pcie@580000000/pci@0,0).
  • Kernel default probe (before userspace): [1.436215] pci 0000:01:00.0: ASPM: default states L1 ASPM-L1.1 ASPM-L1.2 PCI-PM-L1.1; lspci -vv: ClockPM+, L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+, T_PwrOn=6us.
  • Sysfs: both 0000:01:00.0 (Wi-Fi) and 0000:01:00.1 (BT) report clkpm=1 l1_aspm=1 l1_1_aspm=1 l1_2_aspm=1 l1_1_pcipm=1 at boot and stay 1 after traffic, BT scan, and 2/2 s2idle resumes.
  • Wi-Fi: 20/20 pings (0% loss, avg 3.105 ms); 5× 64 MiB TX 242–257 Mbit/s, RX 156–173 Mbit/s.
  • Bluetooth: Powered: yes, 60 s LE scan found 46 new devices (922 updates), 0 hci0 timeouts/errors during scan.
  • Power A/B/A (dark panel, same boot, 45 s windows after 15 s settle):
    • on1: total_med=12.731 W, soc_med=1.514 W
    • off (L1.1/L1.2/ClkPM disabled on both functions): total_med=12.892 W, soc_med=1.643 W
    • on2: total_med=12.676 W, soc_med=1.482 W
    • Delta: -188 mW total median / -145 mW SoC median (absolute total includes the attached USB4 tether charging draw).
  • s2idle: 2/2 (rc=0, suspend_stats success=2 fail=0, 15 s rtc0), 5/5 pings + BT powered + L1.1/L1.2/ClkPM 1 after each resume.
  • Health: 0 Oops/BUG/WARNING, 0 SELinux AVC denials, 0 new kernel errors (only baseline boot-time hci0: Failed to read codec capabilities (-22) and apple-dcp init prop -2).

PR body updated with Tested: and Risk: lines. Ready for final approval and merge at cee358115c4446.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 24, 2026
Resolve EOF context conflict in arch/arm64/boot/dts/apple/t8122-j615.dts
with 0882c53 (M3 ANE enablement); drivers/pci/pcie/aspm.c and
&port00 supports-clkreq diff are unchanged from cee3581.

Signed-off-by: Ryan Murray <[email protected]>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026
The forward merge left the ANE node open before the port00 override.
Close it so both J615 variants compile while retaining the ANE status
and the CLKREQ property.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

I fixed the DT build failure at 4845d063d903e171cf437e2d7a310cbb6512305e. The previous forward merge left the ANE node open before the port00 override. Restoring its closing delimiter fixes the syntax error and preserves the current ANE status.

The old head failed locally at the same line as the hosted DT job. Both the ordinary and 25G83 J615 DTBs now compile with arm64 LLVM and carry supports-clkreq on the same Wi-Fi port. Strict checkpatch is clean. The ASPM source is byte-identical to the J615-tested cee358115c44. The linked J615 power, Wi-Fi, BT and wake measurements are from that earlier checkout. The new head has compiled DTB proof and still needs current hosted checks and a default-path hardware confirmation.

https://github.com/aurora-silicon/linux/actions/runs/45453948155/job/138658220162
#2735 (comment)

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict: MERGE at 4845d063d903 once dt-checks is green (it is now: dt-checks, host-tests, readiness and pr-text all pass at this head). No code blocker remains. The hardware row is at cee35811; the reasoning for carrying it over is below.

Blockers: none at this head. At f3b76066 there was one: the forward merge appended the &port00 block inside the still-open &ane node, and dt-checks failed with t8122-j615.dts:204.1-8 syntax error, so the J615 and J615-25G83 DTBs did not build. 4845d063 restores the brace. I made the same one-line fix independently and got the same tree (git diff 4845d063 against my fix is empty).

Checked:

  • At 4845d063, the PR against main (85d0453b) is still exactly 2 files, +39/-2: t8122-j615.dts +9 and drivers/pci/pcie/aspm.c +30/-2.
  • I built apple/t8122-j615.dtb and apple/t8122-j615-25g83.dtb locally (arm64 defconfig, dtc). Both build at the fixed head. Decompiled, the fixed-head J615 DTB differs from main's by one line, supports-clkreq; on the Wi-Fi port (/soc/pcie@580000000/pci@0,0). &ane keeps status = "okay" from main.
  • aspm.c is unchanged from cee35811, the head of the exact-head J615 row (issuecomment-7139881475), and the DT delta that row used (one supports-clkreq; on the same node) is the same delta this DTB carries. My earlier code findings (review 6041820355) still hold: the opt-outs win, L1.2 drops without ltr_path, the override is limited to root-port and endpoint nodes, and there are no chip, board or parameter gates.
  • The Tested: / Risk: lines are now in the body.

For the merger: the readiness bot wants a row naming the head SHA. The kernel at 4845d063 differs from the tested cee35811 only by the main forward merge, and the J615-relevant result (ASPM/Clock PM defaults on the Wi-Fi link) depends only on aspm.c plus that DT property, both identical. Either accept the cee35811 row with this equivalence, or take a short J615 boot at 4845d063 (the ASPM: default states line plus lspci -vv ClockPM+) when a fleet cut picks it up.

Evidence

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

Verdict: MERGE at 4845d063
Blockers: none
Checked: no Apple material, no chip or board gates (selection is via the supports-clkreq DT property), no new kernel parameters, J615 hardware verification on identical aspm.c at cee35811 with 4845d063 fixing only the DTS closing brace, CI green (dt-checks, host-tests, pr-text, readiness).

EvidenceRead full diff of `drivers/pci/pcie/aspm.c` and `arch/arm64/boot/dts/apple/t8122-j615.dts`. Both `pcie_aspm_override_default_link_state()` and `pcie_clkpm_override_default_link_state()` gate only on `supports-clkreq` and existing link capabilities.

@DjDeveloperr DjDeveloperr added the hw-row-ok Maintainer checked the row is valid for this head label Nov 24, 2026
@DjDeveloperr
DjDeveloperr merged commit 6747267 into main Nov 24, 2026
5 checks passed
@RyanTheTide
RyanTheTide deleted the j615pwr2/aspm-dt-clkreq branch November 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) hw-row-ok Maintainer checked the row is valid for this head needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants