Skip to content

clk: renesas: r8a779[56]: Add Z and Z2 clock support

Simon Horman linux-arm-kernel linux-renesas-soc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest0 of 6 patches 0 repliesNew

Patches in v2 No applies recorded yet

None of the 6 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support
Quoted 40 lines · Geert Uytterhoeven

Hi Simon,

Quoted 5 lines · Simon Horman

this patch-set adds Z and Z2 clock support.

These are dependencies for supporting CPUFreq. The remainder of that work is being posted separately and can be found at:

Quoted 8 lines

https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/rcar-gen3-cpufreq

A description of steps taken to lightly exercise the same feature for the r88a7795 the above can be found at the link below. The results are the same for the r8a7796 with the exception that it has two active CPU cores rather than four.

http://elinux.org/Tests:R-CAR-GEN3-CPUFreq

Thanks for your patches, and the wiki page!

I gave it a try on R-Car H3 (ES1.0 and ES2.0) and M3-W (ES1.0), and the off-by-two factor of the Z clock frequency is gone.
I couldn't test on R-Car H3 ES1.1. Probably it's OK, too (ES1.1 fixed the missing PLL0/2/4 post-divider in ES1.0).

1. After boot-up, the CPU clock frequency is 1.5 GHz, and /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq and /sys/kernel/debug/clk/z/clk_rate agree. Good.

2. After switching to the conservative governor, scaling_cur_freq reports either a 500 MHz or 1 GHz clock rate.
But /sys/kernel/debug/clk/z/clk_rate disagrees: it reports either a 200 or 700 MHz clock rate.

   Ah, there's also cpuinfo_cur_freq. That value matches the Z clock.
   Interestingly, cpuinfo_cur_freq is lower than cpuinfo_min_freq?
   /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:200000
   /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq:1500000
   /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq:500000
Quoted 5 lines

3. After switching back to the performance governor, scaling_cur_freq reports 1.5 GHz again.
But cpuinfo_cur_freq is still only 700 MHz, just like z/clk_rate.

Do you know what's wrong?

Unfortunately not. I will look into this.