Repository navigation
Conversation
61a9ad5 to
c4300b3
Compare
|
The camera clocks match the CAL, all eight parents of each mux included, and the writable-in- |
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>
CMU_PERIC1 clocks the PERIC1 GPIO bank and USI9, the I2C bus of the Pixel 9a's NFC controller and haptics driver. Describe it in the common Tensor G4 clock binding with its three inputs: the oscillator and CMU_TOP's PERIC1 NoC and IP clocks. Add CMU_TOP's two PERIC1 branches at the end of the TOP block and the 8 CMU_PERIC1 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_PERIC1 on the common exynos_arm64_register_cmu() path with its bus input, and CMU_TOP's PERIC1 NoC and IP branches. Firmware sets the block up: the NoC and USI9 user muxes and the USI9 divider are read-only, and the GPIO, sysreg and USI9 gates are read-only gates. USI9 is the I2C bus of the Pixel 9a's NFC controller and haptics driver. 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>
CMU_APM clocks the always-on GPIO banks, the APM mailbox and its internal memory. Describe it in the common Tensor G4 clock binding with the oscillator as its only input, as on gs101 and gs201, and add its 20 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_APM, which clocks the always-on GPIO banks, the APM mailbox and its internal memory, on the common exynos_arm64_register_cmu() path. Firmware sets it up and keeps it on: the FUNC and FUNCSRC muxes and the NoC and USI1 UART dividers are read-only, and its gates are read-only gates. Its sources are the oscillator, from the DT, and the always-on ALV PLL's four dividers, as fixed rates like gs101's. The CAL gives nominal figures for the zuma family (787 MHz for the ALV PLL, 400, 200, 100 and 50 MHz for its dividers, against a 26 MHz oscillator); the ALV PLL runs at 32 times the real 24.576 MHz oscillator, 786.432 MHz, so the dividers are given as exact fractions of that. The external pad input is not described, as on gs101. 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>
CMU_PERIC0 also clocks USI2 to USI6: on the Pixel 9a the I2C buses of the three cameras, the camera power chips and torch, and the battery fuel gauge and charger. Their source is CMU_TOP's PERIC0 IP clock: describe it as an optional third PERIC0 input, so existing device trees with two stay valid, and add CMU_TOP's PERIC0 IP branch at the end of the TOP block and the 26 new PERIC0 identifiers after the existing two. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-node.c The PERIC0 ids run USI2 to USI6, then the sysreg gate. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Describe USI2 to USI6 in CMU_PERIC0, the Pixel 9a's I2C buses for the three cameras, the camera power chips and torch, and the battery fuel gauge and charger, and CMU_TOP's PERIC0 IP branch that feeds them. Firmware sets them up: the USI user muxes and dividers are read-only, and each USI's IPCLK, PCLK and RSTNSYNC gates and the PERIC0 sysreg gate are read-only gates. The GPIO gate stays as it was. 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>
CMU_TOP also makes the four camera sensor master clocks (CIS_CLK0 to CIS_CLK3) and the camera front end's NoC clock. Add each one's mux, gate and divider at the end of the TOP block, leaving the existing identifiers 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>
Add CMU_TOP's four camera sensor master clocks (CIS_CLK0 to CIS_CLK3) and the camera front end's NoC clock. The sensor clocks belong to the kernel, as on gs101 and gs201: their muxes, gates and dividers are writable and in top_regs, so they run in manual mode and the sensor drivers turn them on and set their rate. The front end's NoC clock sits on the INT rail: its mux stays read-only and its gate is a read-only gate, but its divider is writable and in top_regs. The bootloader leaves it at SHARED3/6 (111 MHz), and the main camera's three-trio C-PHY link overruns that, so the CSIS driver raises it to 332 MHz while a link streams. Every offset, width and parent list was checked against zuma's cmucal-sfr.c and cmucal-node.c, including all eight parents of each mux. 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>
c4300b3 to
503a4fa
Compare
|
Landed through #79, which carried this commit with the rest of the stack. Thanks! |
Stacked on #77 (PERIC0 USIs), #76, #75, #74 and #73. Rebased onto
omamobileafter #40's merge. Only the last two commits are new:dt-bindings: clock: google,zumapro: Add the camera clocksandclk: samsung: zumapro: Add the camera clocks.This adds CMU_TOP's camera clocks, ids 52-66:
top_regs, so they run in manual mode, and the sensor drivers turn them on and set the rate.top_regs: the bootloader leaves it at SHARED3/6 (111 MHz), which the main camera's three-trio C-PHY link overruns, so the CSIS driver raises it to 332 MHz while a link streams.I checked every offset, width and parent list against zuma's CAL (
cmucal-sfr.c,cmucal-node.c), including all eight parents of each mux.Boot: the palmtop's integration kernel runs these clocks in this form. CIS_CLK0, 1 and 3 run at 24.576 MHz, used by the ultrawide, front and main sensors.
dout_ispfe_nocgoes from 110.6 to 331.8 MHz while the main camera streams. All three cameras stream through libcamera. Back-to-back captures that switch between cameras sometimes give an empty run with CSIS link errors. The previous kernel, without this series, does the same in the same loop, so that's a separate CSIS/PHY issue.checkpatch --strict is clean on both commits,
clk-zumapro.obuilds with W=1, anddt_binding_checkpasses for the binding.