Repository navigation
Conversation
Turn on CMU_G3D and the Mali-G715 for the Pixel 9a, with its core clock on ACPM's paired "gpu" clock (index 17), which sets the shader (G3D) and L2 (G3DL2) domains together, and coregroup and stacks on CMU_G3D's gates. The operating points are the shader rates of the 9a's GPU DVFS table up to 649 MHz. The levels above it, to 940 MHz, wait for a GPU thermal zone, since nothing throttles the GPU yet. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Give the three CPU clusters their ACPM DVFS clocks (cpucl0-2, by the zumapro ACPM clock ids) and operating points for cpufreq-dt, with capacities and power coefficients for the energy model from Google's zumapro-cpu.dtsi, and add the ACPM TMU sensor and the big, mid, little and GPU thermal zones. The CPU levels are the APM firmware's own (its DVFS table, read on the Pixel 9a), up to the 9a's thermal headroom: 1950 MHz little (Google's max-freq for that cluster), 2367 MHz mid and 2687 MHz big. The little cluster's 324 and 610 MHz lie below stock's 820 MHz floor. Each CPU zone throttles its cluster from 80 C, forces the cluster's lowest levels from 95 C and shuts down at 105 C, all below stock's 112 C (CPU) and 115 C (GPU) hot trips. gpu-thermal throttles panthor's devfreq from 85 C. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
… MHz With gpu-thermal throttling the GPU, add the 9a's GPU levels above 649 MHz: 723, 807, 850 and 890 MHz. The table's top, 940 MHz, stays out until it has run on the 9a. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Tensor G4 (zumapro) display pipeline has the gs201 DSIM, at the same register layout and with the same three register windows. Add google,zumapro-dsim with google,gs201-dsim as its fallback. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add DSIM0, the DSI master between DECON0 and the panel: its link and D-PHY register windows and its interrupt (GIC SPI 252), as in Google's GPL zumapro device tree, disabled until a board names its panel. Link: https://android.googlesource.com/kernel/devices/google/zumapro/+/8831630eee2ad095b85ed452944e6353940966a5/dts/zumapro.dtsi Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Turn on the Pixel 9a's display pipeline: DECON0 with a 64 MiB reusable scanout pool below 4 GiB and the bootloader's splash as its boot framebuffer, scanning out to DSIM0, and the TG4C panel on DSIM0's virtual channel 0. With DECON's output on DSIM0, gs-decon switches the link and the panel between 60 and 120 Hz. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add the Pixel 9a's haptics, a Cirrus Logic CS40L26 on USI9's I2C bus (0x43, interrupt on gpa6-3, reset on gph2-3), with Google's limits for its LRA (2.5 A boost peak, 10 V boost, 162 Hz, ReDC 14.1 ohm) and VP brownout prevention at 3.008 V, and its torch, a TI LM3644 on USI4's I2C bus (0x63, enable on gpp24-1) driving one white LED from both outputs, limited to 75 mA. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…C port controller The Pixel 9a's MAX77779 sits on hsi2c6 (USI6, pins gpp12-0/1, 950 kHz as stock): its fuel gauge at 0x36 with the board's 2 mOhm shunt, and its USB-C port controller at 0x25, interrupting on gpa8-3 (active low, as stock's max77759tcpc@25). The port is described as a sink with a dual data role and is not linked to the USB controller's role switch yet: the USB controller stays a peripheral, as today. gpa8 becomes an interrupt controller with its four EINT SPIs (44-47). Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The MAX77779's charger answers at 0x69 on the same bus as its fuel gauge and USB-C port controller. Describe it, and name it as the fuel gauge's power supply, so the max77779-charger driver binds from the device tree and the battery reports charging through it. The binding (maxim,max77779-charger) takes no interrupt or supplies; the chip charges on its own and the driver reports its state and offers charge inhibit. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The PHY of zumapro's PCIe channel 1 (the Pixel 9a's Wi-Fi link) is isolated by PMU 0x3ec8 until its controller driver sets bit 0, and the controller driver sets bit 10 once the PHY is configured, as Google's root-complex driver does through its private PMU write. zuma's regmap refuses every offset outside its access table, so add the register. Tested on the Pixel 9a with a bring-up module doing the same two updates through the PMU regmap: the link trained to L0 and the BCM4383 behind it enumerated. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Channel 1 of zumapro's PCIe (Tensor G4, the Pixel 9a's Wi-Fi link) is a DesignWare core in a Samsung wrapper. Besides the DBI and configuration space the wrapper has its ELBI, a sub-system control block, the PHY's UDBG, PMA and PCS blocks and an I/A sequencer, eight register regions in all, and fourteen gate clocks in CMU_HSI2. That is more than snps,dw-pcie-common.yaml allows, so the binding builds on pci-host-bridge.yaml alone. The PHY sits behind an isolation switch in the PMU, given by samsung,pmu-syscon as in other Exynos PHY bindings. MSIs reach the DesignWare core's MSI controller and are signalled on msi0 to msi4. The endpoint's power enable belongs to the root port, as a vpcie3v3 supply. Register regions, interrupts and clocks follow stock's pcie@13120000 and Google's GPL zumapro clock driver. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
PCIe channel 1 of zumapro (Tensor G4) carries the Pixel 9a's Wi-Fi chip. It is a DesignWare core in a Samsung wrapper, with its PHY behind an isolation switch in the PMU. Add a host driver for it. The sequence follows Google's GPL root-complex driver for zumapro (pcie-exynos-rc.c and the zuma CAL, version 0.2) for channel 1 with a Broadcom Wi-Fi endpoint, minus what the DesignWare core does itself: open the PHY isolation, enable the fourteen CMU_HSI2 gates, power the endpoint through pwrctrl, run the CAL's power-down-clear and PHY configuration tables, mark the PHY configured in the PMU, turn Gen3 equalisation off, release PERST#, and set the wrapper's L1 exit, Q-channel and pending-transfer controls. After training, the wrapper's interrupt status is acknowledged and XFER_PENDING dropped: left raised, configuration accesses work but every memory read of the endpoint returns all ones. Power-down follows Google's exynos_pcie_rc_poweroff(): PERST#, the link clock back to the oscillator, LTSSM off, a soft power reset, the CAL's power-down table, the clocks, the endpoint's power, and the PHY isolation last. The PHY isolation is opened before any wrapper, PHY or DBI access and closed only after the last one, on every error path and on removal: an access with the PHY isolated hangs the SoC. A PHY lock that does not come within 10 ms fails the probe and powers everything down again. The link counts as up from Recovery.RcvrLock to L1.Idle, as in Google's driver. An endpoint in D3hot parks the link in L1, and an L0-only check made the DesignWare core refuse the configuration write that brings it back to D0. ASPM L1 exit needs the I/A sequencer, which is not programmed yet, so ASPM is cleared from the root port's link capabilities: with ASPM on, the link entered L1 and configuration reads returned all ones. L1 substates, INTx and suspend with the link down are left for later. Tested on the Pixel 9a with an out-of-tree module running the same power-up sequence on 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty: in 33 of 33 bring-ups the PHY locked and the link came up at Gen2 x1, and brcmfmac then brought up the BCM4383, which associated and stayed up across s2idle. That module raised the endpoint's power enable from a GPIO of its own and kept ASPM off with pcie_aspm.policy=performance; this driver uses pwrctrl and the link capabilities instead. Its power-down path never ran on the phone. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/ Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Describe zumapro's PCIe channel 1 and its root port, disabled: the registers and interrupts of stock's pcie@13120000, the fourteen CMU_HSI2 gates and the PMU's PHY control at 0x3ec8. The link is one lane at Gen2, as stock and Google's CAL run it. Boards add PERST# and the endpoint, with its power under the root port. 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>
… pool On the Pixel 7 Pro and the Pixel 9a no IOMMU can confine the Wi-Fi chip's PCIe DMA: the HSI2 System MMU and S2MPU see PCIe and UFS on one VID. Their device trees give the chip a restricted-dma-pool through memory-region instead, which of_dma_configure() picks up for the PCI device, so every DMA buffer bounces through that region. Document the property. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's BCM4383 sits behind PCIe channel 1. Enable the channel with PERST# on gph3-0, 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. 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 a runtime overlay to 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty (there WL_REG_ON was a GPIO of the controller node): the link came up at Gen2 x1, brcmfmac assigned the pool to the chip and brought up wlan0. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.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. |
|
I compared the two on the split question. The short version: zumapro doesn't need its own host or PHY driver.
So I'd make zumapro a fallback compatible on both drivers ( Two stock steps that #168 does and #156 doesn't. They apply to both SoCs:
The rest are policy choices the two SoCs share, not zumapro data:
The one ordering difference I'd test first: on zuma, #156 resets the controller before the external PLL starts, which isn't stock's order. That's fine on husky but untested on tegu. Two of #168's commits duplicate others: the PMU allowlist commit (ca9d9c8) is the same change as #156's b439e2b, and the restricted DMA pool binding repeats #143's. Proposed order: one zuma-family PCIe PR on #143, carrying @greenbrettmichael's five zuma commits plus the zumapro compatibles in both bindings and the two stock steps above. Then a tegu Wi-Fi PR on top of that and #56, with the BCM4383 ID and the tegu DT. Brett, if you'd rather carry the shared part in #156, I'll send you the zumapro compatibles and the two stock steps as commits on your branch. Before I claim zumapro in the shared driver, I'll boot the palmtop on the gs201 path: the reset order, INTx instead of MSI, and the link speed the BCM4383 trains to. |
|
@W4HO-ham thanks for the comparison, that's a lot of careful table-diffing. Yes, let's do it your way: one zuma-family PCIe PR on #143, carrying my five zuma commits, plus your zumapro fallback compatibles in both bindings and the two stock steps:
If you open it, I'll review it and test it on husky. My branch is rebased onto today's Before the host changes, I measured husky on today's kernel (tag
I haven't joined a 5 GHz network yet, so these are 2.4 GHz numbers only. |
|
Thank you both, @W4HO-ham and @greenbrettmichael. Comparing the tables entry by entry and naming the one CAL branch that separates zuma from zumapro (a debug dump) is the evidence I hoped for. And Brett's husky baseline before any host change gives the new PR something to measure against. The plan you agreed matches what I asked for:
That retires A few things to carry over:
Thanks for sorting this out between you. It's a much better result than two drivers. |
|
The palmtop's Wi-Fi now runs on the shared drivers. This is the follow-up to my comparison above. Setup:
There were no UFS errors after any step, and no all-ones config reads. The first try, this morning with an older brcmfmac and a 30 s connect timeout, linked and scanned but hadn't finished connecting. This run used the palmtop's own build and allowed 90 s. #156's reset order (the controller before the external PLL) works on tegu as it does on husky. So zumapro needs no host or PHY driver of its own, and I'll retire #168's @greenbrettmichael, when you're back: shall I send the two zumapro compatibles and the two stock steps as commits on top of #156, or would you rather carry them? The stock steps changed nothing visible here, but they're what Google's driver does on both SoCs. |
|
@derekross, Brett is away this week, so a question for you instead. I have the palmtop's side ready as seven commits on top of #156's head:
They add no W=1 warnings in the two drivers and no new dtbs warnings, and dt_binding_check and dtbs_check pass for zumapro-tegu. Shall I send these as my own PR stacked on #156, which replaces this one, so it can land after Brett's? Or would you rather wait for Brett to fold them into #156? Either way, before it's out of draft I'll boot it on the palmtop as a full kernel build. The bindings cap the controller at 7 clocks, so this node lists 7 where #168 listed 14. Two of the commits touch zuma's paths too, and those aren't tested on a Pixel 8 Pro. |
|
Thank you, @W4HO-ham, for running the palmtop on #156's drivers today. Gen2 x1 on the first try, INTx, and a connection with and without the stock steps is exactly the evidence that lets |
This makes the 9a's Wi-Fi come up from a published kernel. It adds a driver for zumapro's PCIe channel-1 controller and the Wi-Fi node, replacing the bring-up's out-of-tree
tegu-pcie1.koand its runtime overlay. It sits on #161 (on #119, on #96). Seven commits:pci-host-bridge.yamlalone, because the controller has 8 register regions and 14 clocks, more than the DesignWare common schema allows.pcie-zumapro.c, withCONFIG_PCIE_ZUMAPROand modulepcie_zumapro.pci14e4,4449.From
tegu-pcie1.kounchanged (33 of 33 bring-ups):Changed from it:
Tested on the palmtop today. The test branch was this head plus brcmfmac as at #56's head (#56 is on
omamobile-int, so its tree went in as one test-only commit). The kernel was defconfig + omarchy-mobile's fragment with omarchy-mobile#227 andCONFIG_PCIE_ZUMAPRO=m,uname -r7.3.0-rc6-omamobile-push1-g07bdf006cdc2.modprobe pcie_zumaproreturned 0, the controller bound tozumapro-pcie, andlspcishowed the root port144d:a5a5and the BCM438314e4:4449.modprobe brcmfmacreturned 0, andwlan0came up, connected through NetworkManager, with 8 networks in the scan.pcie_zumaproand thenbrcmfmacas hang-safe steps): "up: …, Wi-Fi (wlan0)",wlan0connected, and a ping over Wi-Fi at 18 ms.The only brcmfmac error was "add iface p2p-dev-wlan0 type 10 failed: err=-5", the P2P device, which the firmware refuses.
Why draft: the Wi-Fi itself needs #56. The commits need the owner's sign-off. And reviewers will likely ask for the PHY as its own driver. WIFI-PLAN planned exactly that, as a variant of the 7 Pro's gs201 PCIe and PHY drivers, and I'm happy to split it that way.
The driver and the PMU file build with W=1, arm64 and LLVM=1 with no warnings.
checkpatch --strictshows only the missing sign-offs.dt_binding_checkpasses for both bindings, anddtbs_checkadds no warnings to the tegu DTB.