Skip to content

clk, arm64: dts: zuma: HSI0 USI3 clocks and a disabled spi21 (the 8 Pro's GNSS bus) - #210

Merged
derekross merged 3 commits into
derekross:omamobilefrom
Somnius:omamobile-zuma-hsi0-usi3
Nov 9, 2026
Merged

derekross merged 3 commits into
derekross:omamobilefrom
Somnius:omamobile-zuma-hsi0-usi3

Conversation

@Somnius

@Somnius Somnius commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

This adds the clocks and the SPI controller for CMU_HSI0 USI3, which is the bus of the Pixel 8 Pro's GNSS receiver (a BCM4775x, Google's spi_21). It's the first step for GNSS on the 8 Pro: @derekross's bcm4775x driver and binding and @W4HO-ham's S2MPG15 regulators are already here, and what's missing is this bus, the PMIC node for the GNSS rails and the gnss node.

Three commits: the clock IDs in the binding header, the clocks in clk-zuma.c, and usi3_hsi0 with spi21 in zuma.dtsi. All of it copies the USI2 pattern (spi20), with the registers from Google's tables: mux 0x1020, divider 0x1820, gates 0x2124, 0x2104 and 0x2108. The nodes are disabled, so zuma-husky and zuma-akita should be unchanged, and I checked in both decompiled dtbs that usi3_hsi0 and spi21 are disabled. The gates are CLK_IGNORE_UNUSED like USI2's.

I numbered the new IDs 11 to 15 on top of upstream, since nothing here uses USI1. My own USI1 clocks (the amps' spi19) aren't upstream, so whichever lands second takes the next free IDs.

Tested: it builds with W=1 (clk-zuma.o and the husky and akita dtbs) and checkpatch is clean. I haven't booted this branch. An older local version of the same clocks (with different IDs, on my older tree) has been in kernels I booted on my 8 Pro, and clk_summary listed all five USI3 clocks (the mux, the source gate, the divider, the IP gate and the PCLK gate) with nothing enabled, and dmesg has no warning or error mentioning hsi0 or usi3, but that's not this exact code. Nothing talks to the GNSS chip yet.

@derekross, two things I'd like your view on: are IDs 11 to 15 fine for USI3, and do you want this as one PR like this or as separate clock and dts PRs? Same as USI2, the divider isn't in the suspend list and the RSTNSYNC gate isn't described, I left that alone.

@Somnius

Somnius commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@derekross I booted the USI3 bus on my 8 Pro to see that the clocks and the spi21 node from this PR actually come up on real hardware. Short version: they do, and nothing broke. Longer version below so it's clear what this does and doesn't show.

What I booted: an older test kernel of mine (7.3-rc6), not built from this branch. It carries an older version of the same clocks and spi21 node as #210 (my older clock IDs, not this exact code), and I used an overlay to switch spi21 on, since in the PR it's disabled. So this is evidence that the approach works, not a test of these exact commits. I haven't booted the branch itself.

What I saw:

  • It booted and stayed up past 190 s with no oops, BUG or SError.
  • A new SPI controller appeared for 111e0000.spi (spi21), so the clocks are enough for the controller to probe.
  • clk_summary lists the USI3 clocks with an enable count of 0 after probe. That kernel runs with clk_ignore_unused on the command line, so this count doesn't tell anything about the CLK_IGNORE_UNUSED flag on the gates, I'm only reporting that nothing was holding them on.
  • No child device is on the bus yet, so nothing is talking to the GNSS chip.

One side effect to know about: bus numbers shift when spi21 probes. It came up as spi1 and the amps' bus moved from spi1 to spi2. Nothing broke that I saw, but if some code or config names an SPI bus by number, that's where it would show up.

Why I'm doing this: spi21 is the bus of the 8 Pro's GNSS chip (a BCM4775x), and your bcm4775x driver and binding are already here. This PR is the first of three small steps (the bus, the PMIC rails in #211, then the gnss node itself). The GNSS chip stayed powered off the whole time, so all this shows is the bus and its clocks.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @Somnius. I checked everything against Google's tables. The mux at 0x1020, the divider at 0x1820 (four bits), and the gates at 0x2124, 0x2104 and 0x2108 match cmucal-sfr.c. The parents match cmucal-node.c (USI3's mux has the same two parents as USI2's, and the PCLK gate hangs off the NOC mux). Interrupt 409 and the 0x1020 sysreg offset match zuma-usi.dtsi. Our gate and CI pass, and the DTB validates with spi21 switched on.

Your questions: IDs 11 to 15 are fine, nothing else open adds HSI0 IDs. And one PR for the clocks and the node is fine too, like #199 and #200.

Two optional nits: the files' history uses dt-bindings: clock: google,zuma-clock: for the header and clk: samsung: clk-zuma: for the driver, while this PR has google,zuma: and zuma:. And this PR and #200 touch neighbouring lines of google,zuma.h, so whichever lands second needs a small rebase that keeps both (there are no shared IDs).

On the bus numbers: nothing in our trees names an SPI bus by number, so it's fine. If the audio package ever needs a stable name, aliases in the board file would pin them.

Thanks, a tidy first step for GNSS.

The Pixel 8 Pro's GNSS receiver sits on HSI0 USI3 (Google's spi_21). Add
the IDs for its mux, divider and the three gates, in the same shape as
USI2's, after USI2's IDs. Only the header; the clock driver follows.

Signed-off-by: Lef <me@lefteros.com>
Add the USI3 mux, divider and gates next to USI2's, with the same
shape, parents and flags, so a spi21 node can take its clocks. The
registers are Google's, from the zuma CMU_HSI0 tables: the mux
CLK_CON_MUX_MUX_CLK_HSI0_USI3 at 0x1020, the divider
CLK_CON_DIV_DIV_CLK_HSI0_USI3 at 0x1820, the source gate
CLK_CON_GAT_GATE_CLK_HSI0_USI3 at 0x2124, the IP clock gate at 0x2104
and the PCLK gate at 0x2108, bit 21 as for USI2.

CLK_IGNORE_UNUSED keeps the gates as the bootloader left them until a
spi21 node is enabled; nothing consumes them in the default device
tree. The three gate registers join hsi0_regs, as USI2's did. As for
USI2, the divider is not in that list and the RSTNSYNC gate is not
described.

Built, not booted.

Signed-off-by: Lef <me@lefteros.com>
A USI wrapper and the SPI controller under it for HSI0 USI3 (Google's
spi_21, the Pixel 8 Pro's GNSS receiver bus), laid out like USI2 and its
spi20. Both are status = "disabled", so nothing changes for any board
that includes zuma.dtsi until one enables them.

Values are from Google's zuma USI tables and the stock device tree (one
node at 0x111e0000, split here at 0xc0 like spi20): USI registers
0x111e00c0 and SPI registers 0x111e0000, interrupt GIC SPI 409, USI sysreg
offset 0x1020. No DMA, no power domain and no pin group, as for
spi20: stock's spi_21 has no pin group either.

Built, not booted.

Signed-off-by: Lef <me@lefteros.com>
@Somnius
Somnius force-pushed the omamobile-zuma-hsi0-usi3 branch from 89bf3bc to dd79ff0 Compare November 7, 2026 17:59
@Somnius

Somnius commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@derekross thanks for checking all the numbers against Google's tables.

I took both nits. The header commit is now dt-bindings: clock: google,zuma-clock: and the driver one is clk: samsung: clk-zuma:. The header commit differs from before only by that reword and the context from #200 (below), the driver commit only by the reword, and the dts commit is identical.

#200 landed and touched the lines next to mine in google,zuma.h, so I rebased onto the current omamobile and kept both sides: the PERIC0 IDs from #200 (22 to 27, in the CMU_TOP list) and my HSI0 IDs 11 to 15 (CMU_HSI0 list). No overlap, so no ID changed. That was the only conflict. Because it is a rebase I force-pushed the branch (with a lease).

Checkpatch --strict is clean on all three commits and the husky and akita DTBs and clk-zuma.o build with W=1 and no warnings. In the decompiled DTBs usi3_hsi0 and spi21 are there and disabled on both boards. Mux, divider and gate offsets are the same as before. I haven't booted this rebased branch, only built it.

@derekross

Copy link
Copy Markdown
Owner

@Somnius thank you, both prefixes are fixed, and the rebase over #200 keeps both header blocks exactly as they should be: PERIC0's 22 to 27 in the CMU_TOP list and your HSI0 11 to 15, with no shared numbers. The range-diff shows nothing else changed. Our gate passes on today's omamobile and CI's dtbs_check is clean. The 8 Pro's and 8a's device trees also validate with usi3_hsi0 and spi21 switched on.

On "built, not booted": I looked at the test tree you booted on 11-07 (e98a7a38a3ef, on your public branch). Its USI3 mux, divider and three gates match this head in names, parents, registers, bits and flags, and so does the spi21 node. Only the ID numbers differ, and they never reach the hardware. So I'm comfortable treating that boot as evidence for this branch. If you'd like the DT commit to say so in a sentence, that would be nice, but it's optional.

It's still a draft. When you mark it ready (or tell me it's ready as it is), I'll merge it. It doesn't depend on #209 either way.

@Somnius
Somnius marked this pull request as ready for review November 9, 2026 10:21
@Somnius

Somnius commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@derekross thanks for going through the e98a7 tree against this head. It's ready as it is, so please merge it when you can. I'm leaving out the extra sentence in the DT commit, to avoid another force-push for an optional nit. The "built, not booted" part stays as I wrote it: the boot evidence is from the e98a7 kernel that you compared. Next for GNSS I'll base the node on #187's branch once the rebase is in, as agreed on #156.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @Somnius. That's fine about the sentence: the evidence is here in the thread, and
I compared that tree with this head myself. I re-ran our gate on today's omamobile (it has
moved by 27 commits since, none of them in zuma), and it still merges cleanly, builds at W=1
with no new warnings, and the 8 Pro's and 8a's device trees validate with spi21 switched
on. Merging now, as three commits. Thanks for a tidy first step towards GNSS on the 8 Pro.

@derekross
derekross merged commit f6886df into derekross:omamobile Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants