Repository navigation
clk: samsung: acpm: Add Tensor G4 (zumapro) with a paired GPU clock - #84
Conversation
|
Thanks for this. It's a clean fit for the gs201 driver: data and an id-table entry only, and the paired-clock logic is reused as it is. I checked the parts that matter:
The gate and CI pass on today's base. One change before I merge. gs101 and gs201 each have a header for these ids ( Two smaller things while you're there:
On order: this one doesn't depend on the clock stack and can land before or after it, but it has to land before #85 and #87, since their GPU and CPU frequency nodes need this provider. |
… ids The Tensor G4 (zumapro) ACPM firmware has 17 DVFS domains, numbered as Google's enum acpm_dvfs_id: MIF, INT, CPUCL0-2, DSU, BCI, G3D, G3DL2, TPU, INTCAM, TNR, CAM, MFC, DISP, AOC and BW. Add their clock ids, and the paired GPU clock after them (17), as gs201's header does, so device trees can name them. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/acpm_dvfs_zuma.h Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The ACPM protocol driver already creates a "zumapro-acpm-clk" child for the Tensor G4, but clk-acpm had no match for it. The G4 firmware has 17 DVFS domains, with DSU, BCI, AOC and BW among them, so the indices differ from gs101's: G3D is 7 and G3DL2 is 8. Add the zumapro variant: the 17 domains as clocks, and a paired "gpu" clock (index 17) that moves G3D and G3DL2 together through the Pixel 9a's GPU DVFS table, the same way the gs201 "gpu" clock does. Its rate is capped by zumapro_gpu_max_khz, read-only by default, as gs201's is. Tested on the Pixel 9a: clk-acpm binds zumapro-acpm-clk in place of the out-of-tree driver it replaces, cpufreq-dt runs the three CPU clusters on cpucl0-2, and with zumapro_gpu_max_khz=890000 panthor's devfreq moves the GPU between 150 and 890 MHz under load. The tested clk-acpm.c is this one (blob 82dae93). The 940 MHz point was not sent: the cap stayed at 890 MHz. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/acpm_dvfs_zuma.h Link: https://android.googlesource.com/kernel/devices/google/zuma/+/42395e8adcb880aa336f0da6bb2a19ed53929c40/dts/zuma-gpu.dtsi Link: https://android.googlesource.com/kernel/devices/google/zumapro/+/8831630eee2ad095b85ed452944e6353940966a5/dts/zumapro-gpu.dtsi Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
e2927ef to
e90c23e
Compare
|
Thanks for tracing the sources. Pushed, rebased onto today's
|
|
Thanks, that's everything. The header's ids follow Google's enum, with the GPU at 17 as the driver registers it, and the three |
The ACPM protocol driver already creates
zumapro-acpm-clkfor the Tensor G4 (#24), butclk-acpmhad no match for it. This adds the zumapro variant, built the way your gs201 one is:gpuclock (index 17) that moves G3D and G3DL2 together through the Pixel 9a's GPU DVFS table: its stockgpu_dvfs_table_v2, from our capture of the 9a's own device tree. The top level, 940 MHz, matchesgpu_dvfs_max_freqin Google'szumapro-gpu.dtsi.zumapro_gpu_max_khz, read-only by default, the same asgs201_gpu_max_khz.Tested on the Pixel 9a (
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, with this file asclk-acpm.ko):zumapro-acpm-clkin place of our out-of-tree tegu-acpm-clk, which it replaces;zumapro_gpu_max_khz=890000, panthor's devfreq moves the GPU between 150 and 890 MHz under load (trans_stat), andclk_summaryreads g3d and g3dl2 back from the firmware.The DT side, the GPU OPP table and the CPU OPPs, comes in its own board change. checkpatch --strict is clean, and
clk-acpm.obuilds with W=1.