Repository navigation
Pixel 9a (zumapro): the modem link on the shared gs201-cp host and zuma PHY, with CPIF (stacked on #186) - #187
Conversation
|
A SIM session on this series too (2026-11-03, |
|
Calls too now, on in-tree drivers end to end (2026-11-03, |
b01665f to
bbeb22f
Compare
|
Thank you, @W4HO-ham. Getting the 9a's modem to ONLINE, with GNSS, data, texts and calls, all on in-tree drivers, is a big step, and thank you for keeping Brett's authorship and sign-offs (19 of his 21 commits are identical patches to #156's head; the other two differ only in context). On Before this lands:
On merging: I'll rebase-merge this one and close #178 and #186 with a link here. Brett's commits landing through this PR is my call, and I'll check with him on #156 first, including the packet-ID slack for the 8 Pro. #162 can go either side of this one. Your questions: (1) the order matches what #178 already does and what ran 1343 cycles, so it's fine; (2) keep |
|
Pushed
Also the |
bbeb22f to
a3e96fa
Compare
|
Thank you, @W4HO-ham, for working through all of it. I checked your stock references. Google's bcm4389 dhd picks the XORCSUM sync whenever the firmware sets 0x40000 without SEQNUM, and my 7 Pro's Keeping the msgbuf pair for every chip is fine with me, so I'll run the stack on my 7 Pro before merging: Wi-Fi join, scan and s2idle, and the modem with the doorbell pair. Putting the scan fix in #191 is fine too; it doesn't conflict with this in either order. And thank you for holding the palmtop push until the owner can reach the buttons. The smoke report from this head is the last thing I need from you. On merging: I'll rebase-merge this one and close #178, #186 and #56 with links here. #162 merges cleanly with this one without its card commit. With the card, |
|
Item 5, the smoke report from this head. The kernel is this branch merged onto today's Same boot, after the smoke run:
The three |
|
Thank you, @W4HO-ham, for the smoke report, and for waiting until the owner That's everything I need from you. What's left is on my side: the 7 Pro runs One question for the record, not blocking: what does the test-only SPI poll When this lands, omarchy-mobile #274 ( |
|
Yes. The 300-second GNSS run used the test-only SPI poll commit The reported GNSS numbers therefore include the test-only change. I did not run an otherwise identical A/B session without it, so the exact effect on that 300-second result is not measured. The commit also affects other gs101-compatible ports and is not proposed for merge as-is; the production GNSS path still needs a suitably scoped solution. |
|
Thank you, @W4HO-ham, that's a clear answer. Good to know the GNSS numbers depend on the SPI poll change, and that you're not proposing it as it stands. When the scoped fix comes, please keep it to the 9a's own match data: I re-ran the checks on today's |
|
@W4HO-ham, thanks for #187, I'm using it as the base for the 8 Pro. Two things. Its DT has the s5300-modem node but no samsung,exynos-cp / cp-shmem node, so I guess the 9a's cpif nodes are in an overlay. Is that overlay in a branch, and could you share the dmesg of its first cpif bind? No identifiers needed. For comparison, I copied these from the 8 Pro's stock DT: link_attrs 0x37c8, mif_off_during_volte 1, and 17 iodevs (gnss_boot and gnss_dump included). Second, on the 9a (zumapro), can the AP touch the CP reserved memory with no S2MPU window set up? I'm on zuma and don't know if that holds there. |
|
Base: @greenbrettmichael's e1 stack, @W4HO-ham's #187 modem stack, and the husky DT nodes (modem, I did one flash per stage (the S5 runs were on two boots of the S4 set) and read the slot-B retry count before and after. What I saw:
So I can't say the load is the modem (it could be a power stage with nothing behind it), and I don't know which rail it is. Stock's Two questions I asked earlier are still open: derekross/omarchy-mobile#472 (comment) and #187 (comment). One more: on the 9a, or in a stock log, does |
|
Thank you, @W4HO-ham. Since my comment this morning the base has taken the I built the 8 Pro, 8a and 9a device trees from that resolution at W=1 with no @Somnius, thank you for writing this up so carefully: one flash per stage, the
Your ATU question: in this pull request's driver, the secure-ATU SMC is only The rest is for @W4HO-ham: the 9a's CPIF overlay and its first bind, the |
|
You're right, and I'm sorry: I ran the first PHY and controller access and the power-line steps before you had answered on #472, when I'd said I'd wait. I've stopped, and I won't run any more modem steps on the 8 Pro, and especially not the power lines, until you've answered there. Why I ran them at all: my unit has Kioxia UFS and I wanted to see whether the modem side differs from the 9a and other devices before @greenbrettmichael is back, and to find what might help us decide how to go on. What came out of it, for comparison: PMU I'll do your three things next, without touching the modem: run |
|
Here are the three things from my last comment, none of them touched the modem.
The plan with S1 to S5e, the steps, stop conditions, dated results and The debugfs hook is on a public branch, so the code that ran is visible: https://github.com/Somnius/linux-omarchy-mobile/tree/husky-modem-cpif-test-hook (commit 058a439, test only, not for merge). |
|
@W4HO-ham, a short status, since the branch hasn't moved since 11-03. The base The 7 Pro runs happen today, on the kernel I built from this head: Wi-Fi join, One thing for after this lands: Somnius's one-line packet-ID slack The scoped SPI fix for the 9a's GNSS is separate from this PR, so nothing @Somnius, thank you for doing all three so quickly: the NV check (all match, |
|
@W4HO-ham the 7 Pro run is done, and it's clean. The kernel was
Not covered here: suspend with the modem up isn't qualified on this phone yet (the modem's sleep block stays on), so the suspend part waits for M6. The one thing left is the rebase: it still conflicts with |
The Pixel 9a's BCM4383 firmware (20.123.13) speaks shared-memory
("PCIe IPC") version 9. Accept it next to version 7, keyed on the version
the firmware reports rather than on a chip, and do what Broadcom's
driver does for it:
- read the EWP info block the shared area points to (offset 128) and
refuse to go on unless the firmware says its initialisation ended,
so a stalled firmware fails cleanly instead of leaving rings pointing
nowhere;
- bound every ring-info read and the fallback TCM index arrays to the
chip's RAM before trusting them;
- ring host-ready right after the common rings are set up, before any
buffer is posted (the 4389 path, now keyed on the version too), and
leave the aggregation host capability byte (offset 133) at zero;
- the no-DAR doorbells by the same test.
Version 8 stays refused: its layout is not known here. For the BCM4389
nothing changes: brcmf_pcie_early_hostready() is true for it by device
id as before, and the version 9 checks do not run on its version 7
firmware.
Tested on the Pixel 9a (BCM4383, API9): the firmware comes up, scans,
joins a WPA2 network and passes traffic. Not yet booted on the Pixel 7
Pro.
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The BCM4383 (PCI 14e4:4449, chip id 0x4383, rev 2) is the Wi-Fi chip in
the Pixel 9a. Add its ids, its SYSMEM base (0x6e0000, from the firmware's
load address) and the firmware name "brcmfmac4383-pcie" with the CLM
blob, and two firmware-keyed quirks for its 20.123.13 firmware:
- it takes only the versioned "join" parameters: the unversioned iovar
and SET_SSID both fail with -52, so enable BRCMF_FEAT_JOIN_V1 by the
same WLC version test as for the BCM4389;
- it advertises the supplicant offload but refuses the key
("failed to change PSK in firmware"), so leave FWSUP, SAE and FWAUTH
off and let the host do the handshakes.
Tested on the Pixel 9a with the owner's firmware set: wlan0 comes up,
scans, joins a WPA2 network through iwd and passes traffic, with no
module parameters.
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 8 Pro's BCM4398 sits on pcie_1. As stock's wlan node gives them: WL_REG_ON on gph3-4 (as the root port's supply, so the PCI pwrctrl core switches it around link training, with bcmdhd's 200 ms), device wake on gph3-5 and host wake on gpa5-1. Its DMA buffers come from a restricted pool below 4 GiB, as on the Pixel 7 Pro. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Wi-Fi PCIe controller of zumapro (Tensor G4, Pixel 9a) is the one zuma has: the same DesignWare core and Samsung wrapper, at the same addresses (ELBI 0x13120000, DBI 0x13400000, config 0x60ffe000), with the same controller interrupt (SPI 439), and Google's pcie-exynos-rc.c drives both SoCs with the same code. The only place it tells them apart (IP version 0x986500 against 0x987500) is a register dump. Describe zumapro as "google,zumapro-pcie", "google,zuma-pcie", and make zuma's three-region constraint match on the fallback, so it covers zumapro too. Tested on a Pixel 9a with this pair of compatibles on PCIe channel 1, driven by pcie-gs201 with zuma's match data: the link trained at Gen2 x1 on the first try and the BCM4383 behind it came up in brcmfmac. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…zuma zumapro (Tensor G4, Pixel 9a) has zuma's one-lane Gen3 PHY on its Wi-Fi PCIe controller, at the same addresses (PMA 0x13160000, PCS 0x13140000, UDBG 0x13150000, SOC 0x13130000) and with the PMU's PHY control at the same offset (0x3ec8). Google builds one CAL file, pcie-exynos-zuma-rc-cal.c, for both SoCs, and its channel 1 sequence is the one this binding's driver programs, register for register. Describe zumapro as "google,zumapro-pcie-phy", "google,zuma-pcie-phy". Tested on a Pixel 9a with this pair of compatibles: phy-zuma-pcie reported the external PLL, PLL and CDR locked and offset calibration done, and the link trained at Gen2 x1. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add the PCI ID of the BCM4383, the Wi-Fi chip of Google's Pixel 9a. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
… off Google's root-complex driver for the zuma family (pcie-exynos-rc.c, built with pcie-exynos-zuma-rc-cal.c for zuma and zumapro) does two things around the channel 1 PHY that this driver did not: - exynos_pcie_rc_establish_link() sets bit 10 of the PMU's PHY control register once the PHY has been configured, through its private PMU write, before it releases PERST#; - exynos_pcie_rc_poweroff() clears bits 1:0 of SOC 0x4000 before the PHY power-down, which switches the PHY's input clock back to the oscillator. Do the same on zumapro: set bit 10 at the end of power_on, after the UDBG 0xc800 write, and fail power_on if the PMU refuses it; return the input clock to the oscillator at the start of power_off. power_on already writes SOC 0x4000 first, so a power_off/power_on cycle (the host's training retry) selects the PHY clock again. Keep both to zumapro's own match entry, ahead of the zuma fallback its nodes carry. Google does them on zuma too, but they have only run on a zumapro board, so zuma's path stays as it was until a zuma board has run them. Nothing clears bit 10 again. Google never clears it in pcie-exynos-rc.c either: it is set by a read-modify-write and left set, and the isolation writes go through the PHY control mask, whose definition is not in the GPL sources, so that it leaves bit 10 alone is inferred, not read. Tested on a Pixel 9a (zumapro), PCIe channel 1, with pcie-gs201 as host: the link trained at Gen2 x1 on the first try and the BCM4383 joined a network with no ping loss. An unbind and rebind of the controller ran the oscillator step and the power-down; the PHY control read 0x4c1 before power_on set bit 10 again, and the rebind trained Gen2 x1 on the first try with it already set. That boot had both steps on zuma's match data; this version moves them to zumapro's entry, which the same node selects first. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…s down Google's exynos_pcie_rc_poweroff() for the zuma family (pcie-exynos-rc.c in the zuma and zumapro sources) turns the LTSSM off and pulses the controller's soft power reset (ELBI 0x3a4 bit 1 low for 20 us) while the PHY still runs, and only then powers the PHY down. This driver went straight to the PHY power-down. Do the same before the PHY power-down in the bring-down path, which runs at deinit and when host_init fails after the PHY came up. Keep it to a match entry of zumapro's own, ahead of the zuma fallback its node carries: Google does the same on zuma, but it has only run on a zumapro board, so zuma's path stays as it was until a zuma board has run it. The gs201 sequence follows Google's gs201 driver (dwc-whi), whose power-off I have not checked, and the gs201 power-down works as it is. Tested on a Pixel 9a (zumapro), with the pulse on zuma's match data, which the same node selected then: the link trained at Gen2 x1 and the BCM4383 joined a network with no ping loss. An unbind of the controller logged "LTSSM off, soft power reset pulse" before the PHY power-down, the rebind trained Gen2 x1 on the first try, the BCM4383 reconnected, and UFS logged no errors. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add zumapro's second PCIe controller (stock's pcie_1, ch-num 1, the Wi-Fi chip's link) and its Gen3 PHY, disabled. Both are zuma's: the same registers as stock's pcie@13120000 and zuma's nodes, the controller interrupt on SPI 439 with legacy INTx demultiplexed from it, PERST# on gph3-0 and CLKREQ# on gph3-1 with stock's pin settings, and the PHY's isolation at PMU offset 0x3ec8. So both nodes carry zuma's compatible as a fallback, and the gs201 host and zuma PHY drivers run them on zuma's data. As on stock and on zuma, the controller runs without the I/A and is not cache coherent. Unlike zuma, zumapro has a CMU_HSI2 driver, so the controller lists the PCIe1 gates it uses, up to the seven the DesignWare binding allows: its APB, DBI, slave and master clocks, and the PHY's UDBG, PAL and reference clocks. The PHY bridge and test APB, I/A, SSMT, System MMU and PMMU gates stay out; all of these gates are CLK_IGNORE_UNUSED, and stock lists no PCIe clocks at all (pcie-clk-num 0). Tested on a Pixel 9a with the same description applied as an overlay (that overlay listed all fourteen PCIe1 gates): the link trained at Gen2 x1, the limit of the BCM4383 behind it. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's BCM4383 sits behind PCIe channel 1. Enable the channel and its PHY, give the root port WL_REG_ON (gph3-4) as a fixed regulator with the 150 ms the bring-up waited before configuring the PHY, and describe the chip with its board type, so brcmfmac picks the board's firmware files. The link runs at Gen2, the chip's own limit (its LnkCap reads 5 GT/s). ASPM L0s and L1 stay off on the root port: nothing re-locks the PHY's clock and data recovery after L1 on this path (no I/A sequencer), and with ASPM on, the link entered L1 and the chip's config space read as all ones. All of the chip's DMA goes through a 16 MiB restricted DMA pool below 4 GiB, as on the Pixel 7 Pro: the HSI2 System MMU and S2MPU see PCIe and UFS on the same VID, so they cannot confine the chip, and the pool at least keeps driver bugs away from the rest of RAM. Tested on the Pixel 9a with the same description applied as an overlay to 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, with pcie-gs201 and phy-zuma-pcie as modules: the link trained at Gen2 x1 on the first try, the chip used legacy INTx, brcmfmac assigned the pool to it and brought up wlan0, and wlan0 joined a network with no ping loss. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The BCM4383 (Pixel 9a) shares its chip with Bluetooth. With Bluetooth up, so with BT_REG_ON high, an unbind and rebind of the PCIe host (which drops and raises WL_REG_ON) left brcmfmac unable to start the chip again: it recognised the chip and downloaded the firmware, then failed with "FW failed to initialize". With hci_uart unloaded first, the same rebind brought wlan0 back. Broadcom's driver never resets this chip with the chipcommon watchdog. bcmdhd sets cc_wd_reset false, so dhdpcie_dongle_reset() resets the WLAN function with an FLR (dhd_bus_perform_flr()), with no check on Bluetooth: "For buscorerev = 66 and after, F0 FLR should be done independent from F1. So don't need BT quiesce" (dhd_pcie.c, google-modules/wlan/bcm4383). The chip advertises FLReset+. Reset it with the FLR the BCM4389 already uses, falling back to the watchdog if the FLR is refused or doesn't complete. Tested on a Pixel 9a (7.3.0-rc6-omamobile-push1-gd60d217db5c6): three unbinds and rebinds of the PCIe host with Bluetooth powered each brought wlan0 back, the link at Gen2 x1 every time, with hci0 still powered afterwards. Without this commit the same test failed twice out of two with "FW failed to initialize". Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…egister zuma's PCIe PHY for its first controller (the S5300 modem's) is isolated through PMU offset 0x3ec4, as stock's pcie@12100000 gives it (pmu-offset). Its PHY driver releases the isolation and sets bit 10 once the PHY is configured, so add the register to zuma's PMU regmap, next to the Wi-Fi PHY's 0x3ec8. On the Pixel 9a, the modem link's bring-up driver read the register as 0xc0 at boot, 0x1 out of isolation and 0x401 after configuration, and the link came up at Gen1 x1. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's first PCIe controller (HSI1 GEN3A_0, the modem's link on the Pixel 9a) has a two-lane Gen3 PHY. It has the same five register blocks as the one-lane Wi-Fi PHY, and a PMU isolation register of its own (0x3ec4), but Google's zuma CAL runs a different sequence for it: its own external PLL controls and lock bit in UDBG, a PLL and bias control in the PCS, two lanes of PMA registers and a different power-down. So it can't share the one-lane compatible or use it as a fallback. Add google,zumapro-pcie-gen3x2-phy, with an example at stock's addresses. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's first PCIe controller connects the Pixel 9a's modem through a two-lane Gen3 PHY. Add it to this driver as google,zumapro-pcie-gen3x2-phy, with the sequences from the channel 0 (else) branches of Google's zuma CAL (pcie-exynos-zuma-rc-cal.c) and the host's channel 0 steps around them in pcie-exynos-rc.c: - init: the PMU isolation off, then exynos_pcie_rc_phy_all_pwrdn(): PCS 0x150 PLL off with bias on, both lanes' power-downs, the PLL lock signal forced off, PLL and bias off, and the external PLL turned off only once the PMA PLL has disengaged, as the CAL does; - power_on: SOC 0x4000, exynos_pcie_rc_phy_all_pwrdn_clear(), then exynos_pcie_rc_pcie_phy_config() with the external PLL started and polled through UDBG 0xc710/0xc704, both lanes' PMA tables and the generic PCS timers, then exynos_pcie_rc_establish_link()'s PMU bit 10, UDBG 0xc800 bits 6:5 cleared and the input clock gated; - calibrate: PCS 0x150 PLL and bias on, which Google writes once the link is up, so the host calls it after training; - power_off: the power-down above. The CAL adds i * 0x1000 to its PMA base for lane i and never takes it back, so with two lanes its lock checks and its last input clock write land 0x1000 higher. That is what stock runs, and what brought the link up here, so it is kept and commented. As for the one-lane PHY, the CAL's controller writes (ELBI 0x80, the soft power reset, 0x3d8 and 0x1078) stay with the host, which does them before phy_power_on() on zuma. The one-lane PHY's zumapro power_off returns the input clock to the oscillator, as Google's exynos_pcie_rc_poweroff() does for both channels, and so does the two-lane PHY's: power_on selects the PHY's clock in SOC 0x4000 and the power-down stops the external PLL, so without the park the host's next ELBI writes, which come before phy_power_on(), would run on a stopped clock. On a Pixel 9a a bench without it hung the SoC at the second power-on's first ELBI write. The phy_ops move into the match data. The one-lane PHY's sequence is split into helpers both PHYs share and its Broadcom lane writes into a table of their own; a userspace harness that records every register access of init, power_on and power_off gives the same sequence before and after for both of its match entries. On a Pixel 9a this channel 0 sequence, run from tables by the modem link's bring-up driver with the ELBI writes in the CAL's order, brought the link up to the modem's ROM at Gen1 x1 and to its boot loader at Gen3 x2, with no lock check missed, and has run thousands of link power cycles with the modem online. This driver's version ran on a bench with the modem off (a test consumer doing the host's ELBI steps, then phy_init and power_on, calibrate and power_off): five cycles over two boots, the external PLL, PMA PLL and CDR locked and offset calibration done on every one, and the Pixel 9a's Wi-Fi on the one-lane PHY trained at Gen2 x1 and came back after three rebinds. It hasn't trained a link to the modem yet: that needs the host driver to take it. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a (zumapro, Tensor G4) connects the same Samsung S5300 modem through HSI1 GEN3A_0, a two-lane Gen3 DesignWare root complex. It has no I/A sequencer and no secure monitor translation: the host programs the outbound iATU itself. Its two-lane PHY has a driver of its own (google,zumapro-pcie-gen3x2-phy), so the controller keeps phys as on gs201 and describes no PHY registers. Add the compatible with three register windows, and make the shareability register optional for it: the link has run without I/O coherency so far, and stock's SYSREG_HSI1 hasn't been accessed from Linux yet. On zumapro the PHY stays out of isolation once released, as stock leaves it, so say so in the PMU property. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's S5300 modem hangs off zumapro's HSI1 GEN3A_0, the zuma family's root complex, with the two-lane PHY that phy-zuma-pcie drives as google,zumapro-pcie-gen3x2-phy. Add it as a second compatible of this driver, selected through of_device_id data, with the PHY taken through the generic PHY API as on gs201. What stays in the host, from Google's GPL zuma driver (pcie-exynos-rc.c): - RC mode, the soft power reset pulse and the slave NAK are written before phy_power_on(). zuma's CAL writes them inside its PHY configuration, which the PHY driver leaves to the host; pcie-gs201.c does the same on zuma's Wi-Fi link. ELBI is clocked then because the PHY's power_off returns its input clock (SOC 0x4000) to the oscillator, as Google's poweroff does. - APP_XFER_PENDING is raised from training to the end of link_up, and around each read of the endpoint's configuration space, as exynos_pcie_rc_rd_other_conf() does. - Two lanes are set in the port logic, and phy_calibrate() holds the PHY's PLL and bias on once the link has trained. - The PHY leaves isolation at the first link_up and stays out, as stock's zumapro node has no use-phy-isol-en: link_down runs the controller's power-down steps and phy_power_off(), nothing else. - There is no secure-ATU SMC: the host writes the unrolled outbound iATU, config space to bus 1 and the first 2 MiB of the memory window. - I/O coherency only when samsung,sysreg is given. The new fields go at the end of struct gs201_pcie_cp, and gs201's steps are unchanged; the exported calls are the same, so cpif drives either link. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's first PCIe controller (stock's pcie_0, HSI1 GEN3A_0) connects the modem on the Pixel 9a: the zuma family's root complex with two Gen3 lanes and its two-lane PHY. Describe both, disabled, with stock's CLKREQ# and PERST# pin states, from Google's GPL zumapro-pcie.dtsi, zumapro-pinctrl.dtsi and zumapro-board-pcie-cp-s5300.dtsi: the registers, the controller and MSI interrupts (SPI 414, 416-420), the memory window the host maps to PCI 0x14e00000, and the PMU's PHY control word 0x3ec4. Stock's node names no clocks, and none are given. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's Samsung S5300 modem sits on PCIe channel 0. Enable the controller and its two-lane PHY, give the controller the modem's MSI page, and describe the modem in its child node as the Pixel 7 does: the eleven control lines from stock's cpif node (Google's GPL zumapro-board-cp-s5300-sit.dtsi and the 9a's board overlay, raw levels as Google's CPIF drives them) and the three shared regions of stock's cp_shmem node, which are already reserved. The bootloader leaves FAR_ALIVE's GPA5 pulled down, and with that the modem's PS_HOLD, wake and PHONE_ACTIVE lines stayed low while the modem was powered (bring-up, 2026-10-27). With PS_HOLD and PHONE_ACTIVE floating, as stock leaves them, and the wake line pulled up, wake and PHONE_ACTIVE rose within half a second of power-on, so set those pulls on the pin controller. Binding the link driver touches no hardware: the controller, the PHY and the lines are reached only once it is loaded with allow_hw=1, or when the modem driver asks for the link. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The modem driver writes the doorbell into the modem's BAR window and reads it back, retrying every millisecond for up to 100 ms while the read returns all ones. It checks the link first, but the modem can ask for the link to go down between the check and the access, and the retry loop spans that window. Once the PHY is powered down (and on gs201 isolated), an access to the window can hang the SoC. Add gs201_pcie_cp_doorbell(): the write and the read-back under cfg_lock, the lock cp_link_down() takes to clear cfg_ep_ok before it touches PERST#, the PHY or the isolation, refused once the endpoint is unreachable. The access itself is the modem driver's, unchanged, as stock does it on both SoCs. This changes the Pixel 7 Pro too: every doorbell there now goes through cfg_lock and is held back while the endpoint is unreachable. That is right on gs201 as well, where a read of the modem's window with the link powered down hung the SoC (watchdog reset, nothing in pstore). Stock serializes the doorbell against a link power-off one level up: Google's cpif rings it under mc->pcie_tx_lock in pcie_send_ap2cp_irq() (link_device.c), and s5100_poweroff_pcie() (modem_ctrl_s5100.c) takes that lock to wait out a doorbell in flight before it powers the link off. Here the link-down the CP asks for runs in the controller driver, so the lock is the controller's. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Ring the modem's doorbell through gs201_pcie_cp_doorbell(), so that a link power-off the modem asked for can't come between the link check and the access to the modem's BAR window. When the link went down meanwhile, keep the doorbell for the next link up, as pcie_send_ap2cp_irq() does when the link is already down. This changes the Pixel 7 Pro too, for the reason above: an access to the modem's window with the link powered down hangs gs201 as well. Stock serializes the doorbell against a link power-off with mc->pcie_tx_lock, taken in pcie_send_ap2cp_irq() (link_device.c) and, to wait out a doorbell in flight, in s5100_poweroff_pcie() (modem_ctrl_s5100.c); the link-down the CP asks for runs in the controller driver here, so the controller's lock covers it. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
… error create_link_device() adds and enables the NAPI context on its dummy netdev right after allocating it, but its error path only calls free_netdev(). free_netdev() deletes the still enabled NAPI context and trips the "Make sure NAPI is disabled" warning in __netif_napi_del_locked(): WARNING: net/core/dev.c:7794 at __netif_napi_del_locked+0xb0/0x100 free_netdev+0xdc/0x208 create_link_device+0x86c/0x984 [cpif] cpif_probe+0x26c/0x79c [cpif] Seen on the Pixel 9a when pktproc_create() refused the device tree. The NAPI context is added whenever the dummy netdev exists, so disable it there before freeing the netdev. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The packet processor refused any device tree whose pktproc_dl_use_hw_iocc differed from CONFIG_LINK_DEVICE_PCIE_IOCC, and that option is always on. zumapro's modem link turns IO coherency on only when the device tree gives it samsung,sysreg, which the Pixel 9a's doesn't yet, so its cpif node says use_hw_iocc 0 with every region uncached, as the 9a's bring-up stack runs it (CP ONLINE and thousands of link cycles, with cpif built without LINK_DEVICE_PCIE_IOCC). The in-tree cpif refused that node: cpif: pktproc_get_info: iocc:0 max_packet_size:1584 baaw:0 cpif: pktproc_get_info: PCIe IOCC config and dt are inconsistent What the option decides is whether the software cache maintenance for a cached downlink buffer region is built. A link without IO coherency needs it only when that region is cached, so refuse just that case, and keep refusing use_hw_iocc 1 without the option. The uplink has no such maintenance in either build, so refuse its cached regions without IO coherency whatever the option, not only when it is off. gs201's device tree (use_hw_iocc 1, regions cached) passes as before. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
a3e96fa to
83c80f8
Compare
|
Rebased onto |
|
Thank you, @W4HO-ham. I checked the rebase: 42 of the 43 commits are unchanged, and the one that moved, "zuma: add the HSI2 and FAR_ALIVE pin controllers", differs only by the I'll rebase-merge it now, and then close #186, #178 and #56 with a link here, since their commits land through this one. omarchy-mobile #274 (the PHY in the shared config) comes right after. #193 will need its small One thing still open from my 11-08 comment, for omarchy-mobile and not for this PR: tegu's MODEM-PLAN names |

The Pixel 9a's modem link on the shared drivers: the gs201-cp host learns zumapro's channel 0 and takes its two-lane PHY from #186 through the generic PHY API, with the device tree for both, and CPIF (on
omamobilesince kernel-2026.11.01) boots the S5300 on it. This replaces #173's tables-in-the-host approach, as asked on #168 and #173.It can merge on its own. The branch is today's
omamobile(4cf2c8b) plus the whole PCIe stack rebased onto it (#56's three commits, Brett's #156 with its twenty-one less 45175ee, whichomamobilealready carries as 1cc97e9, #178's nine and #186's three, every commit with its author and sign-off), then the eight below; GitHub shows it mergeable. Merging this one lands #56, #156, #178 and #186 as they are on this branch, in that order; or merge those first and this rebases onto them. Your call. All eight new commits are signed off. The eight on top:dt-bindings: PCI: google,gs201-pcie-cp: add the zumapro modem link: the compatible with three windows (elbi, dbi, config);physrequired for both SoCs,samsung,sysregrequired on gs201 only.PCI: dwc: gs201-cp: add the zumapro (Pixel 9a) modem link: SoC data throughof_device_id.data, new fields at the end of the struct. Per try: ELBI RC mode, the soft power reset and slave NAK beforephy_power_on()(as Pixel 9a (zumapro): Wi-Fi PCIe on the shared gs201 host and zuma PHY drivers, stacked on #156 #178 does for channel 1, and safe because Pixel 9a (zumapro): the modem's PCIe PHY (channel 0) in the shared zuma PHY driver, stacked on #178 #186's power-off parks the controller's clock), EQ off, PERST# release, APP_XFER_PENDING raised for training and around each endpoint config read, two lanes, the LTSSM, thenphy_calibrate(). The host writes the outbound iATU itself (zumapro has no secure-ATU call); IOCC only whensamsung,sysregis present.arm64: dts: exynos: google: zumapro: Add PCIe channel 0 and its PHY(disabled).arm64: dts: exynos: google: zumapro-tegu: Add the modem link(the modem's eleven lines and three regions, the GPA5 pulls).PCI: dwc: gs201-cp: add a doorbell access under the link lockand 6.soc: google: cpif: s51xx: ring the doorbell under the link driver's lock, as stock does, with the read-back stock keeps.soc: google: cpif: disable the link NAPI before freeing its netdev on error: a failed probe freed the netdev with its NAPI still enabled and tripped the WARNING in__netif_napi_del_locked().soc: google: cpif: pktproc: allow an uncached link without IO coherency: pktproc refused any DT whosepktproc_*_use_hw_ioccdidn't equalCONFIG_LINK_DEVICE_PCIE_IOCC, which isdef_bool y, so a link run uncached without IOCC (the 9a's, with every region uncached, as its working bring-up runs) couldn't probe. Downlink now refuses onlyuse_hw_ioccset without the option, or a cached region without IOCC; uplink refuses a cached region without IOCC either way. Cheetah's DT (IOCC on, regions cached) passes as before.Tested on the palmtop (2026-11-02), full kernels from this branch:
7.3.0-rc6-omamobile-push1-g1b270b5cc447, commits 1-6): CP on (cp2ap-wakeup and phone-active up within 2 s), then three cycles of link up / iATU / endpoint ID / link down: "link up: Gen1 x1 (target Gen1), try 1", endpoint 144d:a5a5, all four PHY locks every time; CP off; no UFS or I/O error lines.7.3.0-rc6-omamobile-push1-gbaf1b52d1de5, all eight plus soc: google: gnssif_spi: the Pixel 9a's GNSS link (Kepler over SPI) #185 and one test-only SPI commit): CPIF and this host booted the CP to ONLINE, then gnssd and a 10-minute Location session: 549 GGA sentences, 543 fixed, first fix 58 s after the client connected, 4-19 satellites (median 12), HDOP median 0.8, six constellations in view; CHPP: no bad checksums, two ACK timeouts and one reset-ack early on, no permanent failure; 1343 link power cycles (the PHY power-off parks the clock each time), the request interrupt 16560 times; the same boot from start to end, no oops or WARN, no UFS or I/O error lines.Not done here: IOCC (
sysreg_hsi1isn't described, and the 9a runs uncached), call audio, and the modem's suspend paths (unqualified on the 9a).Checks: W=1 of every touched object at each commit, no warnings;
make dtbsW=1 anddtbs_checkon zumapro-tegu, nothing new;dt_binding_checkon the touched binding; checkpatch--strictclean and one CHECK on the cpif doorbell commit (an extern ins51xx_pcie.h, matching that file).Questions:
phy_power_on()) fine for the whole zuma family?samsung,pmu-sysconstay required on a controller that only reads it?samsung,sysregoptional on zumapro until a read-only check of SYSREG_HSI1?Also run since (2026-11-03): a SIM session on this series (registration, mobile data over
rmnet0, a text), and, with #162's AoC commits on top, outgoing and incoming phone calls with speakerphone audio both ways (comments below).