Skip to content

Add notifier for PLL0 clock and set it 1.5GHz on the JH7110 SoC

Xingyu Wu linux-clk lkml 3 versions – Applied

Status from this message: Applied to riscv-soc-fixes, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest2 patches 7 repliesApplied
  2. v52 patches 13 repliesSuperseded
  3. v42 patches 4 repliesSuperseded

Changes in v7 from the cover letter

- Used the patch 1 from v5 and added the reviewed tag.
- Modified the patch 2 from v5 to fit the new jh7110-common.dtsi.

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/2clk: starfive: jh7110-sys: Add notifier for PLL0 clockdrivers/clk/starfive/clk-starfive-jh7110-sys.c drivers/clk/starfive/clk-starfive-jh71x0.h+32 -15 replies
2/2riscv: dts: starfive: jh7110-common: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHzarch/riscv/boot/dts/starfive/jh7110-common.dtsi+6 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchEmil Renner BerthingHal FengMichael Jeanson
1/2R-b R-b T-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/2] Add notifier for PLL0 clock and set it 1.5GHz on the JH7110 SoC

This patch is to add the notifier for PLL0 clock and set the PLL0 rate to 1.5GHz to fix the lower rate of CPUfreq on the JH7110 SoC.

The first patch is to add the notifier for PLL0 clock. Setting the PLL0 rate need the son clock (cpu_root) to switch its parent clock to OSC clock and switch it back after setting PLL0 rate. It need to use the cpu_root clock from SYSCRG and register the notifier in the SYSCRG driver.

The second patch is to set cpu_core rate to 500MHz and PLL0 rate to 1.5GHz to fix the problem about the lower rate of CPUfreq on the visionfive board. The cpu_core clock rate is set to 500MHz first to ensure that the cpu frequency will not suddenly become high and the cpu voltage is not enough to cause a crash when the PLL0 is set to 1.5GHz. The cpu voltage and frequency are then adjusted together by CPUfreq.

According to some tests, U-Boot can also run 1.5G so that the DTS from kernel can be used on the U-Boot and could not cause any problems. So the way of patch v5 works.

Changes since v6:
- Used the patch 1 from v5 and added the reviewed tag.
- Modified the patch 2 from v5 to fit the new jh7110-common.dtsi.

v6: https://lore.kernel.org/all/[email protected]/

Changes since v5:
- Set the rate to 1.5G in the driver instead of DTS.

v5: https://lore.kernel.org/all/[email protected]/

Changes since v4:
- Fixed the wrong words.
- Added the Fixes tag in first patch.

v4: https://lore.kernel.org/all/[email protected]/

Changes since v3:
- Added the notifier for PLL0 clock.
- Set cpu_core rate in DTS

v3: https://lore.kernel.org/all/[email protected]/

Changes since v2:
- Made the steps into the process into the process of setting PLL0 rate

v2: https://lore.kernel.org/all/[email protected]/

Changes since v1:
- Added the fixes tag in the commit.

v1: https://lore.kernel.org/all/[email protected]/

Xingyu Wu (2):
clk: starfive: jh7110-sys: Add notifier for PLL0 clock
riscv: dts: starfive: jh7110-common: Fix lower rate of CPUfreq by
setting PLL0 rate to 1.5GHz

 .../boot/dts/starfive/jh7110-common.dtsi      |  6 ++++
 .../clk/starfive/clk-starfive-jh7110-sys.c    | 31 ++++++++++++++++++-
 drivers/clk/starfive/clk-starfive-jh71x0.h    |  2 ++
 3 files changed, 38 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1