Skip to content

clk: samsung: zumapro: Add CMU_HSI1 - #74

Closed
W4HO-ham wants to merge 4 commits into
derekross:omamobilefrom
W4HO-ham:tegu-hsi1-clocks
Closed

W4HO-ham wants to merge 4 commits into
derekross:omamobilefrom
W4HO-ham:tegu-hsi1-clocks

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #73 (G3D). Rebased onto omamobile after #40's merge. Only the last two commits are new: dt-bindings: clock: google,zumapro: Add CMU_HSI1 and clk: samsung: zumapro: Add CMU_HSI1. I'll rebase as the others go in.

CMU_HSI1 clocks the HSI1 GPIO bank, which carries the modem's control lines and the haptics reset. It's built the same way as #40 and #73:

  • Common path: exynos_arm64_register_cmu() with the bus input, and no PMU check. Firmware keeps the domain on, and Linux has no power-domain driver that could turn it off.
  • Read-only state: the NoC and ALT user muxes, the local NoC mux and the ALT divider are read-only, and the ALT, GPIO and CMU gates are read-only gates.
  • Only the GPIO path: the PCIe channel 0 clocks aren't described.
  • ALT input: the gate's parent is the board's 400 MHz hsi1-alt fixed clock, found by name like HSI0's inputs.
  • CMU_TOP's HSI1 branch: a mux, a read-only gate and a divider, ids 40-42.
  • Binding: google,zumapro-cmu-hsi1 with oscclk, bus and alt. power-domains is now optional on HSI0 and HSI1 and refused on the rest, through one not: enum rule instead of HSI0's else.

I checked every offset, width and parent list against zuma's CAL, the same commit as #40. That includes I_CLK_HSI1_ALT as a 400 MHz fixed rate behind GATE_CLK_HSI1_ALT and the 4-bit DIV_CLK_HSI1_ALT.

Boot: our integration kernel used to register HSI1 through a private probe with PMU checks. For this PR I replaced that with exactly this commit's tables on the common path and booted the palmtop. HSI1's clocks registered, zumapro_gout_gpio_hsi1 reads 400 MHz with 12040000.pinctrl as its consumer, and the HSI1 pin controller bound. Haptics, which resets through that bank, came up.

checkpatch --strict is clean on both commits, clk-zumapro.o builds with W=1, and dt_binding_check passes for the binding.

@derekross

Copy link
Copy Markdown
Owner

HSI1 checks out against the CAL (the TOP branch at 0x10a4/0x20cc/0x189c, the user muxes, the local NoC mux, the ALT divider from its gate from the 400 MHz input, the GPIO and CMU gates), and the not: enum rule for power-domains is neater than the else. Nothing to change here. It lands after #73's fix (see my comment there); when you re-push the stack, a uname -r and the clk-zumapro.c blob id for the boot you describe would complete the message.

CMU_G3D clocks the Tensor G4's Mali GPU: two PLLs (the stacks' and the
L2's), user muxes for CMU_TOP's G3D NoC, global and switch clocks, and
the GPU's core, coregroup and stacks clocks. Describe it in the common
Tensor G4 clock binding with its four inputs, and add CMU_TOP's three
G3D branches (mux, gate and divider each) and the SHARED0 and SHARED1
halves and thirds those branches select at the end of the TOP block
and the 19 CMU_G3D identifiers in a new block, leaving the existing ones
unchanged.

Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-node.c
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Register CMU_G3D, the Mali GPU's clock unit, on the common
exynos_arm64_register_cmu() path with its bus input, and CMU_TOP's three
G3D branches it takes its inputs from. Firmware sets G3D up and keeps
its domain on: the two PLLs (PLL0822x, no rate table), the muxes and the
dividers are read-only, and the GPU's core, coregroup and stacks gates
and the CMU's own gate are read-only gates, as are CMU_TOP's three G3D
gates. The STACKS and L2_GLB dividers have no ratio field in the CAL
(only busy and auto-gating bits), so they are 1:1 factors. The GPU's
rate changes go through the ACPM firmware, not this CMU.

Every offset, width and parent list was checked against zuma's cmucal-
sfr.c and cmucal-node.c. On the Pixel 9a the integration kernel
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, whose clk-
zumapro.c (blob ae4948e0dd60) has these G3D and CMU_TOP G3D tables,
registers the 30 G3D clocks and runs Panthor on the core, coregroup and
stacks gates (fout_g3d at 149.9 MHz, gout_g3d_core at 159.7 MHz).

CMU_TOP's G3D GLB and SWITCH muxes also select SHARED0 and SHARED1
divided by 2 and 3, which the driver didn't register, so a mux left
on one of them would be an orphan reading 0 Hz. Add the four fixed
factors (the CAL's PLL_SHARED0_D2 and _D3, PLL_SHARED1_D2 and _D3).
On the Pixel 9a the bootloader leaves the GLB mux on SHARED0_D2:
mout/gout_g3d_glb read 1065.984 MHz and dout_g3d_glb 532.992 MHz;
NOCD and SWITCH are on SHARED2 (798.72 MHz), dout_g3d_nocd 133.12
and dout_g3d_switch 266.24 MHz.

Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-sfr.c
Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-node.c
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
CMU_HSI1 clocks the HSI1 block's GPIO bank (the modem's control lines,
the haptics reset). Describe it in the common Tensor G4 clock binding
with its three inputs: the oscillator, CMU_TOP's HSI1 NoC clock and the
board's 400 MHz ALT fixed clock. Allow a power domain for it as for
HSI0, which firmware keeps on today. Add CMU_TOP's HSI1 branch at the
end of the TOP block and the 7 CMU_HSI1 identifiers in a new block,
leaving the existing ones unchanged.

Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-node.c
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Register CMU_HSI1 on the common exynos_arm64_register_cmu() path with
its bus input, and CMU_TOP's HSI1 NoC branch. Firmware keeps the domain
powered and owns its setup: the NoC and ALT user muxes, the local NoC mux
and the ALT divider are read-only, and the ALT, GPIO and CMU gates are
read-only gates. Only the GPIO bank's clock path is described; the PCIe
channel 0 clocks are not. The ALT gate's parent is the board's 400 MHz
hsi1-alt fixed clock, found by name as HSI0's ALT and TCXO inputs are.

Every offset, width and parent list was checked against zuma's
cmucal-sfr.c and cmucal-node.c.

Booted on the Pixel 9a:
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, whose
clk-zumapro.c (blob c1db3a4a7736) carries these clocks under that
tree's own clock ids.

Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-sfr.c
Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-node.c
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@derekross

Copy link
Copy Markdown
Owner

Landed through #79, which carried this commit with the rest of the stack. Thanks!

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