Skip to content

PCI: dwc: gs201: Add guarded lynx combined MSI support - #254

Draft
latentoperator wants to merge 6 commits into
derekross:omamobilefrom
latentoperator:omamobile-lynx-pcie-20261114
Draft

latentoperator wants to merge 6 commits into
derekross:omamobilefrom
latentoperator:omamobile-lynx-pcie-20261114

Conversation

@latentoperator

@latentoperator latentoperator commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Three topic commits, binding then driver then the separately reviewable MSI
edge-rearm candidate, stacked on the three AoC prerequisite commits. Merge AoC
first and rebase to leave just these three commits before merge.

The new lynx compatible selects DWC combined MSI and requires AoC online before
WLAN PCIe startup. Re-arm the wrapper's ELBI enable after link reset, publish the
initialized domain before dispatch, and synchronize teardown. Reject runtime
MSI disablement and late training outside the fully initialized success path.
Existing compatibles keep INTx host operations. The final commit pulses DWC
masks under its IRQ-chip lock and restores Linux's masks; it is a candidate
supported by one successful run, not a proven fix for the earlier stall.

Evidence and limits

The source was split from the local experimental stack that passed one guarded
Pixel 7a connection on November 13, documented in
mobile #751.
That test used 7.3.0-rc6-omamobile-lynx-msi-20261113+ on published base
2db2bc35b plus local changes. It does not qualify these revised commits.
An earlier readiness-corrected connection stalled WMI/TX and lost USB; the
bounded guard recovered the phone. One later pass does not establish the
failure's cause or a stable fix.

Combined offline preparation on published omamobile base
82f31d3a7a3511f9c5a6d1e7c855358762ed3f58: six touched C objects and ten DTBs
build with W=1 and no new diagnostics; nine non-lynx DTBs including cheetah are
byte-identical. Both changed bindings pass documentation validation; full
schema checks add no diagnostics over base, including the lab overlays.
AoC absent/module/built-in consumer reachability checks pass. Strict checkpatch
has no errors, only the new-header MAINTAINERS warning. Independent source
review caught and rechecked late-link MSI readiness, runtime MSI disablement,
and the binding's required AoC dependency.

This is combined source/build evidence, not a standalone build or runtime
qualification of every topic/intermediate commit. No complete new kernel/module
link or fresh phone-smoke report is claimed. The full historical smoke table is
in #751; all six required checks passed on that earlier boot. Optional CMA/GPU
failures remain recorded there. No device operation was performed to prepare
these commits. Firmware and private captures are not included.

Before merge

Keep this draft while reference-device and revised-source qualification remain
open. Shared Trusty/AoC behavior must run on the Pixel 7 Pro before merge;
unchanged DTBs do not establish unchanged shared C behavior. A complete matched
kernel/module/image set and a new reviewed, identity-pinned watchdog/recovery
runbook are required before an attended lynx trial. Automatic firmware-ready
reprobe and lifetime handling, sustained traffic, reconnect, suspend/resume and
Bluetooth coexistence remain unqualified. The new board path stays disabled.

Human DCO certification was completed on November 14 and independently verified
against the frozen review inputs: 25 commit objects across the five topic and
integration refs, representing ten logical patches. The signed source trees,
per-commit diffs, author identities and author dates are unchanged.

Published topic head: c38b41b8fd7f96674394a7aca38e2f77be7a8845 (6 commits including any prerequisites).
The exact signed head passes local tools/kernel-pr-check --merge against
82f31d3a7: clean merge, author sign-offs, prefixes, checkpatch and privacy/blob
policy. Hosted exact-head CI now passes sign-offs, checkpatch, W=1 and device-tree checks. No merge or release enablement is
requested.

Related work

GSA may defer until its Trusty IPC channel is available. Preserve that
error from find_gsa_device() so the driver core can retry AoC instead of
turning a supplier dependency into a permanent invalid-argument failure.

The combined lynx test stack reached 82 services on November 13. The
error propagation also changes shared AoC probe behavior; reference-phone
startup must be requalified before merge.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
The exynos-chipid driver already owns the read-only chip-ID resource.
AoC needs a mapping of the same range, so keep resource lookup and error
handling but do not reserve the range a second time.

The combined lynx test stack reached AoC online with this mapping. This
is shared code and still requires Pixel 7 Pro startup validation; the
rebased preparation has not run on either phone.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
WLAN power on lynx must wait for the specified AoC firmware to be online,
not just for the platform device to exist. Export a read-only state query
and an optional phandle check which fails closed for an invalid or offline
supplier. Boards without the dependency keep their existing consumer path.

This is a point-in-time readiness check, not a lifetime guarantee across
AoC crashes or removal. It supports the attended manual lab sequence;
automatic startup, retry notification and restart handling need review.
The combined local stack passed once; this rebase is not runtime-tested.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
Describe the lynx controller variant and its AoC firmware supplier. The
variant uses the wrapper's combined DWC MSI interrupt; the existing gs201
compatible retains its INTx implementation. Hardware remains disabled in
the board preparation.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
Select the DWC MSI host setup for the lynx compatible and dispatch it
from the shared ELBI handler. Publish the initialized domain before IRQ
enablement, restore the MSI rising-edge enable after link reset, and
synchronize MSI teardown before destroying its domain. Export the DWC
handler for a modular gs201 host.

Check the optional AoC supplier before probe and host initialization.
The existing compatible retains its INTx host operations; the optional
supplier is absent on reference boards. Shared functions and the Kconfig
relationship still need reference-device review.

Firmware and scan passed in the local lynx stack. That earlier stack
later stalled during connection, so this commit is not a qualified
connection fix. No rebased candidate has booted.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
A vector arriving behind the DWC dispatch snapshot can leave the MSI
output asserted after the wrapper has consumed its rising edge. Pulse
the DWC masks under its IRQ-chip lock, preserving Linux's current masks,
so pending status can assert a new edge. This follows the mask-pulse
mechanism in Google's GPL combined-MSI handler.

One guarded connection and verified HTTPS request passed on lynx with
this candidate on November 13. An earlier WMI/TX stall remains unexplained;
the result does not establish that this change fixes it. Keep this
candidate separate for review, stress testing and possible rejection.
It is selected only by the new lynx compatible.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, Chris. This one conflicts with today's omamobile: your own gs101 match-data commit has merged since, so gs201_pcie_soc_data and the match table have moved, and wcn_msi and the lynx entry need rebuilding on top. CI won't run again until then.

I read the three PCIe commits with the Pixel 7 Pro in mind, since this is the controller behind its Wi-Fi. The MSI path itself sits behind the new compatible, which is how I'd want it. What reaches the 7 Pro as written:

  1. The dependency on the AoC core. gs201_aoc_require_online() is called for every board, and with both drivers built as modules pcie-gs201.ko would depend on aoc_core.ko, so loading the PCIe controller loads the AoC core first on every Tensor phone. It's the same point as on power: sequencing: qcom-wcn: Wait for optional AoC readiness #253: please keep the "AoC first" order in the attended start, where it already is, or express it through something the controller already waits for.
  2. msi_ready is read in the interrupt handler on every Wi-Fi interrupt. It's false there and nothing follows, but the handler's code changes, so after the rebase please add a per-function comparison of pcie-gs201.o (base against head) to the PR, naming what changes and why it's neutral for the plain google,gs201-pcie data. If the handler changes on that path, I'll run it on my phone before it merges.

And a source, please, for the mask pulse: the function in Google's pcie-exynos-rc.c it follows, with the branch and lines, in the commit message.

I haven't built this or checked the MSI logic against Google's handler yet; the rebase comes first.

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