Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions device/lynx/AOC-WIFI-PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<!-- SPDX-License-Identifier: MIT -->
# Pixel 7a: AoC before WLAN power

Status (2026-11-13): **one guarded association and traffic test passed on a
local experimental kernel**. This records a reproduction of the AoC-first
lead from [issue 36](https://github.com/derekross/omarchy-mobile/issues/36#issuecomment-6819528828)
and the subsequent tests on the original lynx test phone. The kernel changes
and test overlays are not published or included here. No release package or
automatic driver startup is qualified by this result.

Recorded local build: detached kernel worktree
`~/android/mainline/wt-lynx-wifi-aoc-20261113`, with the base and local
changes described below; output `~/android/mainline/out-lynx-msi-20261113`.

## 1. Build and ordering

The successful connection ran on
`7.3.0-rc6-omamobile-lynx-msi-20261113+`, built from the published kernel
`omamobile` at `2db2bc35beecbf2deccb7f2e9bc8c3843b1edc9c` plus local
Trusty, AoC, power-sequencing, PCIe and board changes. That base commit alone
does not reproduce this build. The earlier firmware/scan build was
`7.3.0-rc6-omamobile-lynx-wifi-aoc-20261113+` on the same base with local
changes, before the MSI edge-rearm candidate.

The sequence was Trusty IPC, GSA/AoC, WLAN power, PCIe link, then ath11k.
The local changes include:

- Trusty IPC descriptors using premapped shared-memory buffer IDs;
- preserving GSA probe deferral in AoC and avoiding a second claim of the
chip-id resource already owned by exynos-chipid;
- an AoC-online dependency checked before WLAN power and PCIe bring-up;
- lynx-specific WCN6855 power sequencing and DWC iMSI-RX handling,
including restoring ELBI interrupt enables after link reset;
- in the final candidate, rearming the MSI edge after dispatch by masking
and restoring the DWC masks under the IRQ-chip lock.

AoC firmware came unchanged from the owner's factory image and reported
`14022723-polygon`, with 82 services. The Wi-Fi test used the owner's stock
firmware set: `amss20.bin`, `m3.bin`, `regdb.bin` and a `board-2.bin` packed
from the stock board files for this endpoint. Neither firmware nor board
data is redistributed. Bluetooth and the modem were not started for these
tests. No extra chip-window, PMU, SysMMU or iATU userspace register reads
were used to obtain the result.

## 2. Results, in order

1. **Firmware and scan passed.** With AoC online before WLAN power, Trusty
IPC, AoC (82 services, zero restarts), PCIe/MSI, ath11k firmware boot and
a passive scan passed. The earlier build returned 23 BSS entries on
2.4/5 GHz. This reproduces the reported ordering result as a combined
local stack; it does not isolate each change's necessity.
2. **Connection attempts stopped.** The first attempt raced NetworkManager
supplicant readiness. After correcting that readiness check, a connection
attempt stalled the ath11k WMI/TX queues and USB stopped responding. The
bounded guard expired and the phone recovered to a new boot with the
experimental drivers unloaded. The protected-partition checks and
required smoke checks passed after recovery.
3. **One MSI-candidate connection passed.** On the final release named in
section 1, fresh stages passed Trusty IPC, AoC (82 services, zero
restarts), PCIe/MSI enumeration, one firmware boot and a passive scan
with 24 BSS entries. One activation, after NetworkManager was ready,
associated with a saved profile and obtained DHCPv4. Three gateway pings
passed. HTTPS explicitly bound to Wi-Fi returned HTTP 200 and 577 bytes,
with TLS verification enabled and its source address matching the
Wi-Fi lease. Fresh SSH confirmed that USB access still worked. No new
WMI timeout, TX flush timeout, oops or panic appeared in the connection
capture.

The final read-only checks found no failed units, all six required
`phone-smoke` checks passing, the storage guard intact and all six protected
partition hashes matching the post-stock baseline. The watchdogs were
explicitly disabled after fresh healthy status; no stage guard or rollback
timer remained active. The successful connection stage did not reboot,
reload firmware or modules, mark slot B, or write a protected partition.
Optional smoke rows still reported a failed CMA reservation and no GPU
render node; this Wi-Fi result does not qualify those paths.

This is **one successful runtime test** with the MSI edge-rearm change.
It does not establish why the earlier connection stalled or demonstrate
that the MSI change fixes it. The original failure and the successful
retest both remain part of the result.

## 3. Current state and remaining gates

The experimental drivers remain blacklisted for boot. Startup is a guarded
manual lab sequence. The owner subsequently rebooted the same kernel;
home and touch were confirmed working, and Wi-Fi startup has not yet been
repeated on that boot. The connection result above belongs to the earlier
qualified boot, not the phone's present network state.

Reconnect, repeated cold-start operation, sustained traffic, suspend/resume,
Bluetooth coexistence and unattended startup remain unqualified. AoC
firmware being online does not qualify audio or sensors. Battery, charging,
camera and torch are separate work and are not advanced by this report.

Before another hardware run, prepare fresh per-boot stage markers and a
reviewed runbook with expected results, stop conditions and recovery. Keep
the existing identity checks, protected-partition baseline, storage guard,
laptop kernel-log capture, bounded hardware watchdog and network rollback.
Do not replay consumed helpers, retry firmware after a stall, unload AoC,
or repeat the prohibited register reads in [WIFI-PLAN section 6](WIFI-PLAN.md#6-stop-conditions).
On USB loss, stop sending commands and observe recovery before a fresh
identity-pinned probe. Any boot-image write or reboot needs the owner's
approval for that operation.

The next upstream code work is to separate the local kernel changes into
reviewable subsystem series, with explicit treatment of shared Trusty/AoC
paths and the Pixel 7 Pro. This documentation does not establish that those
paths are unchanged or ready to merge. Private logs, network identifiers,
partition images and calibration hashes remain off-repository.
29 changes: 29 additions & 0 deletions device/lynx/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,35 @@

Findings from real hardware, newest first. Tracking issue: #36.

## 2026-11-13: AoC-first Wi-Fi scan and one guarded traffic test

- **AoC-first ordering reproduced on this lynx.** Trusty IPC and AoC came
up before WLAN power, followed by PCIe/MSI and stock ath11k firmware.
AoC reported 82 services with zero restarts. The first firmware/scan
build was `7.3.0-rc6-omamobile-lynx-wifi-aoc-20261113+`.
- **An earlier connection failed.** A readiness-corrected attempt stalled
the WMI/TX queues and lost USB. The bounded guard recovered the phone;
the protected hashes and required smoke checks passed afterwards.
- **One connection and traffic test passed** on
`7.3.0-rc6-omamobile-lynx-msi-20261113+`: passive scan (24 BSS entries),
association, DHCPv4, three gateway pings and Wi-Fi-bound HTTPS (HTTP 200,
577 bytes, TLS verified). Fresh SSH still reached the phone over USB.
No new WMI/TX timeout, oops or panic appeared in that connection capture.
- **Qualification remains narrow.** This is one successful run with a local
MSI edge-rearm candidate, not proof of the earlier failure's cause or a
stable fix. Reconnect, endurance, suspend/resume, Bluetooth coexistence
and unattended startup were not tested. The kernel changes are not
published. Drivers remain blacklisted at boot; after the owner's later
reboot, home/touch work and Wi-Fi startup is still pending.
- **Safety checks passed:** six protected hashes matched, storage guards
held, no units failed and all six required smoke checks passed on the
qualified boot. Raw captures, calibration hashes and firmware stay
private. No phone operation was needed to prepare this documentation.

Build provenance, the chronological results and remaining gates are in
[AOC-WIFI-PLAN.md](AOC-WIFI-PLAN.md). The older ROM-stall investigation and
its stop conditions remain in [WIFI-PLAN.md](WIFI-PLAN.md).

## devinfo 3.11 read-only evidence (2026-11-06)

The Android 15 unit reports `devinfo` version 3.11. With slot B active,
Expand Down
28 changes: 22 additions & 6 deletions device/lynx/WIFI-PLAN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
<!-- SPDX-License-Identifier: MIT -->
# Pixel 7a (lynx): Wi-Fi and Bluetooth

Status (2026-11-05): **parked.** The chip enumerates and reads host memory,
Status (2026-11-13): **AoC-first firmware/scan reproduced; one guarded
association, DHCP and verified HTTPS test passed on a local experimental
kernel.** See [AOC-WIFI-PLAN.md](AOC-WIFI-PLAN.md) for the two kernel
releases, the earlier WMI/TX stall, the successful retest and their limits.
The code and overlays are not published; boot-time startup, reconnect,
sustained traffic and suspend/resume remain unqualified. The experimental
drivers stay blacklisted for boot. The owner has since rebooted; the guarded
startup has not been repeated on that boot, so this is a recorded test
result, not a claim that Wi-Fi is currently connected.

Sections 1-8 below retain the investigation through 2026-11-05. Their parked
state and next-step list describe that point in time; use the new AoC plan
for current qualification and gates. Both stop conditions in section 6
still apply. Tracking issue: #36.

Historical status (2026-11-05): **parked.** The chip enumerates and reads host memory,
but its boot ROM stops at its authentication stage on the first firmware
load, with the same unsigned image stock loads in 57 ms. Every host-side
difference two testers could act on has been tried one at a time, one
Expand All @@ -18,8 +33,9 @@ is mixed and does not establish the cause of the mainline stall. A
stock-side read of the register the ROM consults is done (section 5). The
published kernel has no PCIe node for lynx; the Wi-Fi branch stays local, and on the test phone
`pcie_gs201` and `ath11k_pci` stay blacklisted (section 8). Bluetooth, on
the same chip, scans on mainline through its own UART (linux-omarchy-mobile
#98, in review); section 5 says what its device tree changes at the bench.
the same chip, scans on mainline through its own UART
([linux-omarchy-mobile #98](https://github.com/derekross/linux-omarchy-mobile/pull/98),
merged 2026-11-03); section 5 says what its device tree changes at the bench.
Tracking issue: #36.

Two phones contributed: this one (`latentoperator`, sections 3 to 6) and
Expand All @@ -40,14 +56,14 @@ FlorencioJP pulled from theirs.

| Fact | Evidence |
| --- | --- |
| `gph2-5` enables the 0.95 V buck (stock `bt-0p95-en`), `gph2-4` is WLAN_EN; stock raises the buck, then WLAN_EN, then waits 1 ms and brings the link up. BT_EN is `gpp16-2` on PERIC1 (`0x10840000`), which our tree does not describe. `gpa6-1` is the chip's wake line to the host [V] | `S/` device tree |
| `gph2-5` enables the 0.95 V buck (stock `bt-0p95-en`), `gph2-4` is WLAN_EN; stock raises the buck, then WLAN_EN, then waits 1 ms and brings the link up. BT_EN is `gpp16-2` on PERIC0 (`0x10840000`), described by the published `gs201-pinctrl.dtsi`. `gpa6-1` is the chip's wake line to the host [V] | `S/` device tree |
| The PCIe PHY rails are S2MPG13 `LDO3S` and `LDO18S`, always-on in the stock tree [V] | `S/` device tree |
| **Stock never loads a cold chip.** `cnss2`'s probe raises the buck once (`BUCK GPIO: [0]`, `drive it HIGH`, 2.51 s), asserts WLAN_EN (2.62 s), enumerates, suspends the link (2.68 s) and de-asserts WLAN_EN (2.71 s) with no BHI. The first `Starting image download via BHI` (10.14 s) follows the second `Assert WLAN_EN` (10.07 s), with the buck still high; `init.lynx.rc` starts that calibration load by writing `fs_ready` at `vendor.all.modules.ready` (4.8 s), with no `cnss-daemon`. So every stock firmware load is one WLAN_EN cycle after a cold power-up, and every load on our kernel has been the cold one [V] | stock `dmesg` 2026-10-27, `S/init.lynx.rc`; the reading is the maintainer's (#36) |
| FlorencioJP's full-Android log has the same shape: buck once at 2.46 s, assert 2.57 s, `cannot receive L23_READY`, de-assert 2.65 s, then nothing on the chip for 7.67 s; second assert 10.32 s, first BHI 10.40 s, SBL 10.47 s, AMSS 11.17 s. Their earlier "+109 ms / +167 ms" timing was measured from the second buck line [V] | `B/` (FlorencioJP, corrected on #36) |
| **The stock kernel stalls too when the BHI follows the probe cycle by 13 ms.** Google's minimal diagnostic on the stock kernel and stock `cnss2`, factory firmware started through `powerup`: buck up 5.49 s, link, `cannot receive L23_READY` 5.69 s, probe done, `powerup` 13 ms later, BHI 5.85 s, and the same stall as mainline at 13.0 s (`BHI_EXECENV` 0, `BHI_STATUS` 0, `BHI_ERRDBG3` `0x80000`); the same with a warm chip (reboot, buck already high). So probe-enumerate-power-off followed at once by a BHI is not enough, and the 7.7 s full Android leaves between the de-assert and the second assert is the variable ~~[V]~~ **inference failed:** step 6 waited 8 s and 30 s on mainline and stalled the same way (next row) | FlorencioJP, #36 2026-10-27 |
| **Step 6 is negative.** The stock-shaped sequence on mainline, through a test harness: cold reset (buck dropped 0.5 s), buck, WLAN_EN, link, enumeration only, D3hot, PERST low, PHY and controller off, WLAN_EN low with the buck held for 8 s (and in a second run 30 s), then WLAN_EN, link, SysMMU, `ath11k`, MHI. Both runs: the same stall, `0xef0a0002`, and `WLAN_SECURE_BOOTN` `0x11111111`, `PBL_WLAN_BOOT_CFG` 0, `TLMM_PBL_BOOTSTRAP_STATUS` 0, `WLAON_MEM_SVS_CFG_REG` 0 [V] | FlorencioJP, #36 2026-10-27 18:10Z |
| **Full Android's first load goes through Google's calibration handler, which sleeps 5 s first.** `cnss_cold_boot_cal_start_hdlr()` (`cnss2/main.c:1928-1932`, `CONFIG_WCN_GOOGLE`): "workaround: If COLD_BOOT_CAL starts too early, the MHI powers on failed. delay 5000 ms". `init.lynx.rc` writes `fs_ready`; `fs_ready_store()` posts `COLD_BOOT_CAL_START` because lynx's DT has `qcom,wlan-cbc-enabled`. This phone's two stock boots: `File system is ready` 5.722 s and 4.799 s, `Wait for 5 seconds to start calibration` 10.977 s and 9.955 s, then the buck, `Assert WLAN_EN` 11.086 s and 10.068 s, BHI 11.245 s and 10.137 s; FlorencioJP's two full-Android logs show the same (`File system is ready` 4.996 s and 8.089 s, the wait line 10.209 s and 13.282 s, BHI 10.404 s and 13.448 s). The diagnostic's `dev_boot powerup` posts `CNSS_DRIVER_EVENT_POWER_UP` directly (`debug.c:218-222`) and never takes that path [V] | `S/` (`android-gs-lynx-6.1-android16-dp`, the maintainer's reading on #36), stock `dmesg` 2026-10-23 and 2026-10-27; FlorencioJP, #36 2026-10-27 22:50Z |
| **No run has had Google's host stack and full Android's wait together.** The diagnostic had the host stack and a 13 ms wait; step 6 had the wait and our host stack. If the stall needs both missing, both results fit. The diagnostic does not rule out the host side on its own [I] | the maintainer, #36 2026-10-27 21:02Z |
| **Earlier hypothesis, answered by section 7 item 1.** The diagnostic initially had Google's host stack and a 13 ms wait; step 6 had the wait and our host stack. The subsequent `fs_ready` diagnostic combined Google's host stack and full Android's wait and still stalled [V] | FlorencioJP, [#36 run 17](https://github.com/derekross/omarchy-mobile/issues/36#issuecomment-6456189000); section 7, item 1 |
| **Bluetooth is not required.** FlorencioJP's full-Android reference 2 passed its first BHI at 13.45 s with Bluetooth first powered at 50.96 s (BT_EN low, the UART untouched); reference 1 and both of this phone's stock boots had BT up before the first BHI (here `BT-ON asserting BT_EN without WLAN` at 9.840 s and 7.989 s), and every diagnostic boot, which stalled, had it off [V] | FlorencioJP, #36 2026-10-27 19:54Z; stock `dmesg` here |
| `TCSR_PBL_LOGGING` reads `0xef150600` before the first BHI on a chip that has never passed under Linux (three reads on 2026-10-25, one after a stalled diagnostic boot on 2026-10-26), so it is not a "good run finished" marker (section 5) [V] | FlorencioJP, #36 2026-10-27 19:54Z |
| Stock runs with the HSI2 SysMMU translating (image buffers in `wifi_region`), a 36-bit DMA mask, PCIe I/A on, L1.2 on and three MSI vectors for MHI. The BHI load takes 57 ms [V] | `B/` |
Expand Down Expand Up @@ -327,7 +343,7 @@ below.
Bluetooth and their background scanning were off. After stock
`dev_boot shutdown` completed and `off`, WLAN_EN and PERST read low,
but the buck pin still read high. GPIO sysfs is disabled on this stock
kernel, so a reviewed GPIO character-device v1 helper requested only
kernel, so a GPIO character-device v1 helper requested only
`gph2` line 5 (`gpiochip18` on this kernel; global GPIO 103, with the
range and DT mapping verified). It set physical low, read 0 at both
ends of a 5.000384158 s monotonic hold, released its request, and
Expand Down
Loading