Repository navigation
Pixel 8 Pro Wi-Fi: zuma's PCIe and the BCM4398 (stacked on #153, #143, #56) - #156
greenbrettmichael wants to merge 75 commits into
Conversation
The channel loop skips a channel that gets no mailbox, so that one bad
channel doesn't fail the rest. -EPROBE_DEFER isn't such a channel: it
only means the mailbox driver hasn't probed yet. When ACPM probes
first, every channel is skipped, the probe succeeds with "16 channels,
0 usable" and never retries, and everything behind ACPM fails for the
whole boot. On the Pixel 8 Pro the touchscreen then can't enable its
supply ("error -ENODEV: enabling vdd").
This happens when a module load or `udevadm trigger` binds ACPM ahead
of the mailbox, or with fw_devlink=permissive, which drops the
supplier ordering.
Return -EPROBE_DEFER from the probe instead, so it runs again once the
mailbox is there. Keep skipping the channels for any other error, and
the ones whose queues are outside the SRAM. The channels already
requested are freed by the devm action, and the per-channel buffers
are devm allocations.
Fixes: c8e4c99 ("firmware: samsung: acpm: skip channels the AP cannot use")
Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Document zuma's (Tensor G3) CMU_TOP and CMU_HSI0 as far as the touchscreen's SPI needs them: CMU_TOP's HSI0 NoC and peripheral clocks, and CMU_HSI0's USI2 clocks with the NoC path its bus clock comes from. HSI0 takes the board-level ALT clock as an input. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma has no clock driver, and the bootloader leaves HSI0's USI2, the touchscreen's SPI, at 399.36 MHz (PLL_SHARED2 / 2). The SPI controller takes its rate from the CMU, so the bus would run at a quarter of that, far above the 10 MHz stock gives the touch controller. Describe the path from CMU_TOP's shared PLLs to USI2, with registers and parents from Google's GPL CMUCAL tables for zuma. Only USI2's divider and its three gates are written; the PLLs, muxes and the other dividers and gates are read-only and keep their firmware settings. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Add the 24.576 MHz oscillator, HSI0's ALT input at the CAL's nominal 213 MHz, and the TOP and HSI0 clock controllers. Nothing consumes them yet; the touchscreen's SPI will. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) AP-to-APM mailbox is gs101's, as on gs201 and Tensor G4: same registers, one interrupt and one bus clock. Document it with gs101's compatible as the fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) ACPM firmware speaks the same protocol, from the same shared memory layout, as Tensor G4's, and its main PMIC is the same S2MPG14. Document its compatible, with the S2MPG14 as its main PMIC. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Pixel 8 Pro's (Tensor G3) main PMIC is the S2MPG14, at the same ACPM channel and with the same touchscreen rails on LDO4M and LDO25M. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's ACPM firmware keeps its channel table at 0xa000 in the APM SRAM, as stock's device tree gives it (initdata-base). Add zuma's match data. No driver binds its clocks device yet. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Add CMU_APM, the AP-to-APM mailbox (SPI 80), the APM SRAM and the ACPM firmware node, at the addresses stock's acpm_ipc node gives them. CMU_APM is read-only: it only names the mailbox's and the SRAM's clocks, which the always-on domain keeps running. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Describe the S2MPG14 behind ACPM. No regulators yet: each will come with its consumer, starting with the touchscreen's. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) USI blocks are Exynos850-style, like Tensor G4's: the mode lives in a system register, and the block's own control sits at offset 0xc0. Document zuma's compatible with the Exynos850 fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
HSI0's system registers hold the USI mode of the touchscreen's USI2. Like zuma's UFS sysreg, it takes no clock: HSI0 is firmware-owned. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) SPI controllers are gs101-style, as on Tensor G4. Document zuma's compatible with gs101's as the fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) SPI controllers match Tensor G4's: rate from the CMU, 64-byte FIFOs, 32-bit access. Stock drives the Pixel 8 Pro's touchscreen with manual chip select (samsung,spi-chip-select-mode = <0>), as the Pixel 9a's, so use Tensor G4's port configuration, which holds native chip select for a whole message. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
… controllers Add the CUSTOM_ALIVE controller at 0x15060000 (gpn0-gpn9, one wake-up interrupt each, SPI 0 to 9) and PERIC1 at 0x10c40000 (gpp19-gpp24, SPI 649), with the banks and interrupts of stock's live device tree, as controllers 1 and 12 of the driver's zuma data. CUSTOM_ALIVE's bus clock comes from CMU_APM; PERIC1 takes the bus-clock stand-in, as PERIC0 does. The touchscreen's attention line is on gpn0 and its reset on gpp21. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Add HSI0's system registers and USI2 at 0x111d00c0 with its SPI controller (SPI 408), clocked from CMU_HSI0, as stock's spi@111D0000 (usi-offset 0x101c). This is the touchscreen's bus. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Pixel 8 Pro's FTM5 firmware first reports a forced calibration (status 43 05 01) after the scan command, then echoes the command about 60 ms after it was sent, past the 50 ms window. Probe then failed with "turning sensing on". Wait up to 2.5 s, as stock's checkEcho does (TIEMOUT_ECHO), and stop polling once the echo arrives, so the longer window costs nothing when the firmware answers promptly. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Pixel 8 Pro's touchscreen is an ST FTM5 (SALIXP, chip id 36 40) on USI2's SPI, as in stock's fts node: 10 MHz, attention on gpn0-0, reset on gpp21-2, 1344 x 2992. Its rails are the main PMIC's LDO25M (1.8 V digital) and LDO4M (3.3 V analog), which the firmware leaves off and at those voltages. Pin them there, as stock does. Stock's node inverts both axes, but salixp already reports in the panel's orientation: with stock's inversion, a tap at the top-left came in at the bottom-right. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The gs201 (Tensor G2) PCIe Gen4 PHY is a two-lane Samsung PHY with PMA and PCS register blocks, a debug block that selects its reference clock, and three reset lines inside the sub-control space of the controller it serves. Its isolation is a PMU register, so the PMU phandle carries the offset of this instance's PHY_CTRL_PCIE_GEN4_x register. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
The gs201 (Tensor G2) PCIe controllers are DesignWare cores in a Samsung wrapper: an ELBI sub-control block for link training and interrupt status, and an I/A sequencer that re-locks the PHY clock-data recovery when the link leaves L1.2. INTx is demultiplexed from the controller interrupt, so the node has a legacy-interrupt-controller child. The I/A region is not one of the generic DesignWare register names, so the binding refers to snps,dw-pcie-common.yaml rather than snps,dw-pcie.yaml and lists its own reg-names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
… pool A PCIe Wi-Fi chip runs firmware that parses untrusted frames. Platforms that confine the chip's DMA to one region (with an IOMMU-less firewall such as the Google gs201 S2MPU) describe that region as a restricted-dma-pool and point the device node at it, as is already done for other PCIe Wi-Fi bindings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
The System MMU in front of the gs201 PCIe GEN4A_1 controller (the Pixel 7 Wi-Fi link), described for use as a DMA window: a 1:1 mapping of one reserved memory region, with the VID the controller's traffic uses. The window is a plain phandle property, google,dma-window: memory-region on this node would attach a restricted-dma-pool to the SysMMU device itself, which would then bounce its page table into the window. google,vid is the default VID to translate, which still has to be confirmed by a negative test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
Add a driver for the PCIe Gen4 PHY of the Google gs201 (Tensor G2) SoC, which connects the Wi-Fi chip on Pixel 7 phones. The bootloader leaves the PHY isolated in the PMU and does not train the link, so the whole Samsung init sequence is needed. phy_init() is Google's probe-time step: release the PMU isolation (a secure register, written through the PMU regmap's SMC path) and power the PHY down. phy_power_on() clears the power-down and runs "CAL ver 210802": PHY resets, the common PMA block for a 100 MHz LCPLL with a 38.4 MHz input clock, the per-lane tables, PCS settings for root complex mode, the external XO selection and an AFC calibration restart, then polls the PLL, CDR and offset calibration status. phy_calibrate() reports the offset calibration after the controller's soft power reset. The sequence follows the driver Google builds for gs201 (google-modules/soc/gs/drivers/pci/controller/dwc-whi: pcie-exynos-gs201-rc-cal.c and pcie-exynos-rc.c, Copyright Samsung Electronics). Most PMA registers have no public names, so the tables keep the raw offsets. As on stock, the PHY is not isolated again after init: controller register accesses hang the SoC while it is isolated. For bring-up, trace=1 logs every hardware step before it happens (with a short sleep so a remote log reader receives the line before a possible bus hang), and check_tcxo=1 reads and fixes the PMU TCXO buffer bits that Google's driver checks. The controller sets the lane count with phy_set_bus_width(); the default is one lane, as on Pixel 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
Add a host driver for the PCIe controllers of the Google gs201 (Tensor G2) SoC. Pixel 7 phones connect their BCM4389 Wi-Fi to the HSI2 controller (GEN4A_1), one lane at Gen2. The sequence follows the driver Google builds for gs201 (google-modules/soc/gs/drivers/pci/controller/dwc-whi/pcie-exynos-rc.c: resumed_phydown(), poweron() and establish_link()). Order matters: the bootloader leaves the PHY isolated, and any access to the controller's ELBI registers hangs the SoC until the PHY driver has released it. So: PHY init (isolation off, power-down) before the first ELBI access, then endpoint power through the pwrctrl core (WL_REG_ON, 200 ms), the PHY configuration and the I/A sequencer, the soft power and non-sticky resets with the device type set to root complex, PERST# release and 20 ms, the wrapper setup (exit-L1 request, manual link-down reset, no Q-channel clock gating, NAK on pending AXI), Gen3 equalization off, DMA cache coherency through the HSI2 sysreg, and finally the LTSSM, polled for L0 in the ELBI. As on stock, a failed attempt redoes the PHY and controller sequence; the last failure prints the LTSSM history buffer. Only INTx is supported, which is what the stock Wi-Fi driver uses: the ELBI interrupt status is demultiplexed into a four-line INTx domain, and link-down and completion-timeout events are logged. The chained handler is installed only once ELBI is reachable. A no-op msi_init keeps the DesignWare core from claiming the shared interrupt for its iMSI-RX, so devices fall back to INTx. Bring-up aids: the sequence runs in numbered stages and stop_after=N ends probe after stage N without binding (0 resources, 1 clocks, 2 PHY isolation off and first register access, 3 PHY configuration, 4 controller setup, 5 link); trace=1 logs every hardware step before it happens; use_ia=0 skips the I/A sequencer; cmu_acg_off=1 clears the CMU_HSI2 global automatic clock gating, as Google's driver does, through the optional samsung,cmu phandle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
Google's driver programs the I/O coherency (AxCACHE in DBI 0x8e8 and the HSI2 shareability in SYSREG_HSI2 0x730) after the root port setup in exynos_pcie_rc_establish_link(), and once more at the end of exynos_pcie_rc_probe(), after the endpoint is enumerated. We did it once, before the link came up. The Wi-Fi chip is dma-coherent through this bridge. If the coherency were not in effect, the chip would read stale ring memory and the host would not see what the chip writes, which is how the first BCM4389 runs fail. Program it again after link up and after enumeration, and print the two registers, so the log shows what is in effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
The Wi-Fi chip on the gs201 PCIe GEN4A_1 controller can DMA anywhere in RAM: there is no IOMMU in use and the HSI2 S2MPU is left open (CTRL0 = 0). Stock Android puts the controller's traffic through the HSI2 PCIe System MMU (0x145c0000, version 8.1, VID 1). Use that System MMU as a firewall rather than a translator: one first-level table (36-bit IOVA, 1 MiB sections, 256 KiB aligned) that maps a single reserved region 1:1, so the device driver keeps using physical addresses and nothing outside the region is reachable. The register map, table format and enable sequence follow Google's exynos-pcie-iommu-whi driver; faults are reported from the System MMU interrupt with the address and direction. A mode parameter stages the bring-up: 0 only logs the registers (default), 1 enforces, 2 enforces with an empty table as a negative test. The window comes from "google,dma-window", not "memory-region": for a restricted-dma-pool, memory-region would also make the pool the SysMMU node's own swiotlb, so mapping the first-level table for the walker would bounce it into the very window the PCIe device may write, and the device could rewrite its own page table. A table that was bounced or overlaps the window is refused. An enforced empty table did not stop the Wi-Fi chip's DMA on VID 1. No kernel code assigns the controller's VID (stock 1:1 maps every buffer, so it never notices a bypass either), so the driver also: - has "vids", a bitmask of VIDs to translate (default: google,vid); - has mode 3, a 1:1 map of everything except the window, which only blocks DMA into the window and is therefore safe on every VID; - reads the fault address and info from the faulting VID's registers (0x1000 + 0x10 * vid with VM support), not always VID 1's; - restores each VID's CTRL on remove rather than writing 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
Negative tests on cheetah showed that the PCIe controller's DMA (AxID 0x0) and the UFS host controller's (AxID 0x2) both arrive on VID 0. An empty or window-only table on VID 0 blocked the UFS transfer request list, storage stalled and the phone wedged. Refuse any mode that would translate VID 0 unless the debug parameter allow_vid0 is set, and document the measurement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
brcmfmac decodes the SYSMEM core's coreinfo register with the SOCRAM layout (bank count in bits 7:4) and sizes banks from index 0. On the BCM4389 the SYSMEM coreinfo holds the RAM bank count in bits 4:0 and the ROM bank count in bits 9:5 (bits 23:16 and 31:24 from core revision 12), and the ROM banks come first in the bank index space. That is how Broadcom's own driver sizes it (bcmdhd siutils.c si_sysmem_size(), sbsysmem.h), and what Google's Pixel 7 Pro logs at boot: si_sysmem_size: coreinfo:0x115 num_rom_banks:8 num_ram_baks:21 sysmem_banksize: bankidx:8 bankinfo:0xf00060f banksize:131072(0x20000) ... DHD: dongle ram size is set to 2752512(orig 2752512) at 0x200000 With the SOCRAM decoding, coreinfo 0x115 reads as one bank, and bank 0 is a ROM bank. The register dump of the failed load has the NVRAM length token (0xe8b4174b, the same as stock's) and 0x23a2d0, which is 0x240000 minus the 23856-byte NVRAM: brcmfmac sized the RAM at 256 KiB instead of 2688 KiB, and wrote the NVRAM and the random seed into the 1.7 MB firmware image it had just downloaded to 0x200000. The firmware crashed on start, and the shared RAM address read back as 0xffffffff: brcmf_pcie_download_fw_nvram: Invalid shared RAM address 0xffffffff Decode the BCM4389 the way Broadcom's driver does: count only the RAM banks and skip the ROM banks in front of them. Other SYSMEM chips (BCM4365/4366 family) keep the current decoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
brcmfmac reaches the chip's RAM through PCI BAR 2 (Broadcom's "BAR1") and assumes it maps the backplane from address 0. The BCM4389 has 2688 KiB of RAM at 0x200000, up to 0x49ffff, behind a 4 MiB BAR. The top of RAM, where the NVRAM, the random seed and the shared-area handshake word go, is beyond the BAR, and brcmfmac's accesses there land past the end of its ioremap(). The BAR maps the 4 MiB-aligned block of backplane space named by the BAR1 window register (PCI config 0x84). Broadcom's own driver moves it for every TCM access when RAM does not fit (bcmdhd dhd_pcie.c dhdpcie_bar1_window_switch_enab(), dhdpcie_bus_chkandshift_bpoffset(), pcicfg.h PCI_BAR1_WIN), and points it back at 0 before the download (dhdpcie_bus_download_state()). On the Pixel 7 Pro it logs the random seed TLV at 0x49a248. Do the same: when RAM ends beyond the BAR, route every TCM access through one helper that moves the window under a spinlock, split block copies at window edges (and into 4 KiB pieces, so the 1.7 MB firmware download does not hold the lock throughout), and reset the window before the download and after a chip reset. Chips whose RAM fits the BAR take the same path with the window left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
The BCM4389 splits its backplane into save/restore power domains: PCIe, ARM/backplane, MAC aux and MAC main. Unless the host requests them, the chip's PMU may keep the ARM/backplane and MAC domains off, and a chip reset drops the host's requests. Backplane accesses to a domain that is off fault and read back as 0xffffffff, which also hides behind a warm chip that some earlier driver had left powered. Google's driver (bcmdhd) treats the 4378/4387/4389 family as multi- backplane chips (siutils.h MULTIBP_CAP()). It requests all four domains through the powerctl register (bits 11:8, status in 19:16) of the PCIe core, at BAR0 + 0x2000 + 0x1e8, before it resets the chip (dhd_pcie.c dhd_bus_pcie_pwr_req_reload_war(), siutils.c si_srpwr_request() and si_srpwr_domain_all_mask()), and on PCIe core revision 68 and later also asserts the ARM/backplane domain in the DAR copy of the register, because "ARM fails to boot" from cold without it (dhd_pcie.c dhd_bus_pcie_pwr_req_wl_domain(), pcie_core.h DAR_PCIE_PWR_CTRL()). The Pixel 7 Pro's BCM4389 has PCIe core revision 72. For the ARM CA7 it also sets the BAR coherent-access bits in PCI config 0x88 (dhd_pcie.c "CA7 requires coherent bits on", pcicfg.h PCIE_BARCOHERENTACCEN_MASK). For the BCM4389, request all four domains (and the DAR one) once the BARs are mapped, before brcmfmac first touches a core, and again before and after the watchdog reset; and set the coherent-access bits. The requests stay on while the driver is bound, which costs idle power but keeps every backplane access safe; releasing them once the firmware runs is left for later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
|
Answering the split question here and on the sibling PR together, since #156 (husky, zuma) and #168 (tegu, zumapro) both bring up a Tensor PCIe host: yes, please split the PCIe part into its own PR first, and the PHY into its own driver commit, as upstream expects. For the host itself I'd like one approach for the zuma family rather than two: reuse the gs201 host driver with per-SoC match data wherever the controller's registers are the same, and add a separate driver only for what really differs, with the reason in the commit message. Brett and W4HO, could you compare notes on where zuma and zumapro actually differ, and agree which PR carries the shared part? Both still wait on the BCM4389 series (#143, mine), which I'm fixing now. |
|
Following #168: W4HO and I agreed to put the zuma-family PCIe host and PHY in one PR on #143, with zumapro as a fallback compatible. This PR's Wi-Fi parts will rebase onto that one. My Wi-Fi baseline before the host changes, from tag |
|
Thanks Brett, and thanks to W4HO for the table comparison on #168. One zuma-family PCIe PR on top of #143, with zumapro as a fallback compatible and the two stock steps (the PMU "PHY configured" bit with the clock back to the oscillator, and the soft power reset), is the shape I hoped for. The Gen3 x1 baseline from e1 will make the before/after easy to read. I also checked this PR's copy of the BCM4389 series against #143's new head (45bb8e1). All 33 shared commits are patch-for-patch identical, including the versioned join parameters with the flexible |
|
@greenbrettmichael for when you're back, a 5 GHz data point for the before/after on this PR (@derekross fyi). On One thing to look at: on that first boot the journal had about 192,000 lines of Also for the record: the display start has to run before sddm. I once ran it inside a live session and Hyprland kept the dead simpledrm handle until I restarted sddm. The packaged unit ordering from #228 does it right, verified on the next boot. |
|
Thanks Lef, the 5 GHz numbers are a useful baseline for the PCIe work: 221-502 On the Thanks for the sddm note too. Brett, nothing more is needed here while you're |
|
@derekross @greenbrettmichael thanks for the lead, and I need to correct something I wrote earlier. I said the second boot logged only 3
So it happens on every boot, only the amount differs. Same kernel image on all five, but the last three boots also had my Type-C and USB-role device tree overlays (nothing Wi-Fi related). All five have zero The first two boots start the same way. The lines around the start of the first one (not every line, MACs removed): The second boot has the same three steps a few seconds in (p2p timeout 18:30:03, failed join 18:30:06.277, first |
|
Thanks Lef, the whole-boot counts are exactly what was missing, and they make If you'd like to test it without a reboot, note the Wi-Fi interface's The "unexpected monitor pkt" lines don't leak IDs: that path releases the ID Brett, for when you're back: the fix I'd suggest is one ID of slack in the data |
|
@greenbrettmichael, for when you're back (and @derekross, in case it helps before then): I needed this rebased for linux-omarchy-mobile#178, so I've pushed the result as a branch you can take as is or compare against: Two conflicts, both resolved by keeping both sides:
Every other commit applied unchanged, authorship and sign-offs as they were. I haven't booted husky with it; the 9a ran this base with #178 on top today (Gen2 x1, Wi-Fi, details there). |
|
@derekross I ran the no-reboot check you described, over Wi-Fi, with the download coming from the desktop. Before: It's one run on one boot. I haven't read the driver code myself, so this fits your reading but doesn't prove the cause. I haven't tried the one-ID-of-slack change either, that's for @greenbrettmichael when he's back, as you said. If it helps I can build the 8 Pro with that change and repeat the same measurement before and after. |
|
Thanks Lef, that's a clean measurement: 208,529 packets for 13,250 new lines is one line per 15.7 packets, and no "Missed … kernel messages" means the count is the real one. The refill reading predicts two lines for every 31 received buffers, one per 15.5, so the rate matches the mechanism and not only the fact that there is a flood. I'd now call this the cause rather than a lead. Throughput not suffering fits as well, since each short refill leaves at most one buffer unposted. If you'd like to try the fix on your 8 Pro, yes please. Put it on a branch on your fork so the result points at a commit, and give the brcmfmac W4HO, thank you for the rebase. I've checked
Brett, nothing is needed from you while you're away. When you're back, the quickest path is to take W4HO's branch as this PR's head, so CI can run here, and add the packet-ID slack as a commit on top. I'll coordinate with W4HO on how #178 lands in the meantime. |
|
One more thing for @greenbrettmichael for when you're back, and for @W4HO-ham, since #178 carries the same commits. I went through which of the stack's brcmfmac commits also run on the Pixel 7 Pro's BCM4389. Most are gated on the BCM4398 or on what the firmware reports, but two aren't clearly:
The event_msgs_ext fallback only acts when Our contributing guide asks that shared drivers leave the 7 Pro unchanged unless there's a reason that holds on the 7 Pro, and then I run it on my phone before merging. With the 7 Pro's first release being prepared, I'd prefer to leave it unchanged here: gate the packet-ID split on the chips that need it, the BCM4398 and, if W4HO's 9a needs it, the BCM4383. For the D2H sync, a line in the commit saying whether the BCM4389's firmware asks for it would settle it. If you'd rather keep the split for every chip, that's fine too, but then it's a 7 Pro change, and I'll run the stack on my 7 Pro before it lands. Nothing is needed until you're back. |
|
@derekross I tried it on the 8 Pro: branch The same kind of measurement as on the stock module, over Wi-Fi, 300 MB pushed from the desktop through ssh (
The stock figures are from my earlier run, not repeated with this exact script, so the time is only roughly comparable: about 4 s then, 3.6 to 5.7 s now. Before any download, this boot had 0 So the lines are gone, as you predicted; the packet counts are the same, the time is in the same range. It's four runs on one boot, on one phone; I only changed that one line and haven't tested anything beyond this download. If @greenbrettmichael or @W4HO-ham want to try it on their phones, it's the one-line change on that branch: my |
|
Thank you, @Somnius, that's a clean result: four runs with no The commit on For the Pixel 7 Pro it changes nothing: its firmware asks for 1535 rx buffers, and the cap only moves from 2015 to |
|
@greenbrettmichael, I'm working on GNSS for the 8 Pro (a BCM4775x on spi21, with the clocks and the PMIC node as #210 and #211) and its pins are on the HSI2 and FAR_ALIVE pin controllers that your first commit here adds: host-req is gpa5-3 and nstandby and mcu-resp are gph3-3 and gph3-2. I wrote the same two controllers and the gpa5 and gph3 banks myself before I saw yours, and I'm not going to post that, because the labels would collide. Would you be OK with that one commit becoming a small PR of its own, so GNSS and Wi-Fi can both sit on it? If you'd rather keep it here, I'll stack my node on #156 and wait. I only need the controllers and the banks, my part would be four pin groups and a disabled gnss@0. |
|
@greenbrettmichael, an update for when you're back, since this PR's work is On my 11-02 request to gate the packet-ID split to the chips that need it: @Somnius, on your question about the HSI2 and FAR_ALIVE pin controllers: no |
|
@derekross understood, thank you. I'll base the GNSS node on #187's branch once @W4HO-ham's rebase is in (or on |
|
Thanks Derek, and thank you @W4HO-ham for carrying these through #187 with the authorship and sign-offs intact. Closing this one with a link there is exactly right; nothing more from me here. @Somnius, thank you for measuring the packet-ID shortfall and testing the one-line slack: four clean runs against 13,250 lines is a clear result, and it's good that it lands as your own PR. And yes, base your GNSS node on the pin controllers as they are in Agreed that the open gaps (P2P and crash recovery) move to the 8 Pro's notes; Bluetooth is covered now by Somnius's #199. |
|
Thanks, Brett. #187 is in, and I checked again: 71 of this branch's commits are on |
The Pixel 8 Pro's Wi-Fi works on this branch. The BCM4398 on zuma's pcie_1 comes up at boot and joins with NetworkManager, and the driver can be unloaded and reloaded without a reboot.
Stacking: this is a draft because it sits on three open PRs. Only the last 21 commits are new here (from
arm64: dts: exynos: google: zuma: add the HSI2 and FAR_ALIVE pin controllerson). Below them:use the versioned join parameters on the BCM4389,brcmf_assoc_params_v1_le.chanspec_listis now a flexible array ([], for checkpatch's FLEXIBLE_ARRAY error), andbrcmf_join_v1()allocates room for its one chanspec. The join length was already computed withoffsetof, so the bytes sent don't change (78, as before, tested on husky). This branch reuses the gs201 host driver, its BCM4389 brcmfmac work and the restricted DMA pool binding;pcie.c, and their lines are unchanged.The stack rebases away as those land. If you'd rather have the zuma PCIe part (7 commits) as its own PR first, I can split it.
zuma's PCIe (7 commits)
phy-zuma-pcie.cprograms it from stock's tables (exynos_pcie_rc_phy_all_pwrdn*andpcie_phy_configfor channel 1). It takes the PHY's isolation (PMU 0x3ec8) through the PMU, which is why gs101-pmu's zuma table gains that register.ctrl_reset_before_phy).The link trains at Gen3 x1 (8 GT/s) on the first try.
brcmfmac for the BCM4398 (14 commits)
chip.clearns to walk its EROM (EROM2 from chipcommon, EROM1 and OOBR derived from it), find the cores and their wrappers, and halt and release the ARM through the DMP control register.event_msgs_ext;bandlist;0xdead0002when the firmware advertises it, the same as bcmdhd'sDHD_DONGLE_TRAP_IN_DETACH. The chip's always-on domain keeps the firmware's state across WL_REG_ON, FLR and a PMU watchdog. Without the trap, a second load got no boot interrupt until the phone rebooted.Firmware: none of it is in linux-firmware. The driver asks for
brcmfmac4398d0-pcie.google,zuma-husky.{bin,txt,clm_blob,txcap_blob}. On my phone these are stock'sfw_bcmdhd.bin_4398_d0,bcmdhd.cal_MMW,bcmdhd_clm.blob_4398_d0andbcmdhd_txcap.blob_4398_d0from the OTA's vendor image (24.100.671.86.2). They're installed under/usr/lib/firmware/updates/brcm. derekross/omarchy-mobile#214 stages them from the owner's image (tools/extract-vendor-firmware -d husky -s SKU, with the NVRAM picked by SKU as stock does) and addsCONFIG_PHY_ZUMA_PCIE=mto husky's config. derekross/omarchy-mobile#216 has the notes.Tested on husky (tag
husky-test-20261031-w11; the head since differs only by the join fix above, tested by loading its brcmfmac):brcmfmacreloads and onepcie_gs201+brcmfmacreload each reconnect in 17–18 s, with no traps orTimeout on response.sense echo yes) and ACPM (16 of 16 channels) are unchanged.tools/kernel-pr-check --buildon the 21 commits:udelay(10)in brcmfmac's core-reset idiom;Known gaps:
brcmf_p2p_create_p2pdev: timeout occurredat load. The firmware never confirms the P2P device interface. Station mode doesn't need it.🤖 Generated with Claude Code