Skip to content

Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz

Pali Rohár linux-pm 3 versions – Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/29 of 10 patches 4 repliesApplied
  2. v3 posting 1/210 patches 12 repliesSuperseded
  3. v210 patches 8 repliesSuperseded

9 of 10 patches are in this archive. The cover letter announces 10.

Patches in v3 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
2/10cpufreq: armada-37xx: Fix setting TBG parent for load levelsdrivers/cpufreq/armada-37xx-cpufreq.c+23 -120 replies
3/10clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clockdrivers/clk/mvebu/armada-37xx-periph.c+0 -280 replies
4/10cpufreq: armada-37xx: Fix the AVS value for load L1drivers/cpufreq/armada-37xx-cpufreq.c+37 -00 replies
5/10clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHzdrivers/clk/mvebu/armada-37xx-periph.c+7 -50 replies
6/10clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0drivers/clk/mvebu/armada-37xx-periph.c+39 -60 replies
7/10cpufreq: armada-37xx: Fix driver cleanup when registration faileddrivers/cpufreq/armada-37xx-cpufreq.c+1 -10 replies
8/10cpufreq: armada-37xx: Fix determining base CPU frequencydrivers/cpufreq/armada-37xx-cpufreq.c+1 -10 replies
9/10cpufreq: armada-37xx: Remove cur_frequency variabledrivers/cpufreq/armada-37xx-cpufreq.c+1 -90 replies
10/10cpufreq: armada-37xx: Fix module unloadingdrivers/cpufreq/armada-37xx-cpufreq.c+25 -00 replies

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchGregory CLEMENTPali RohárTomasz Maciej NowakAnders Trier OlesenPhilip SoaresStephen Boyd
2/10A-b T-b T-b T-b T-b
3/10A-b T-b T-b T-b T-b A-b
4/10A-b T-b T-b T-b
5/10A-b T-b T-b T-b A-b
6/10A-b T-b T-b T-b A-b
7/10A-b T-b T-b T-b
8/10A-b T-b T-b T-b
9/10A-b T-b T-b T-b
10/10T-b T-b T-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 6 reviewers.

Read the v3 thread

Cover letter [RESEND PATCH mvebu v3 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz

From: Pali Rohár <[email protected]>

Hello!

The armada-37xx-cpufreq driver changes base CPU speed from 1000 MHz to 800 MHz on EspressoBIN and Turris MOX. The commit message in patch 2/10 explains why and how can this be discovered.

That patch 2/10 led us to discover another bug, in the SOC itself, that causes the CPU to behave weirdly when frequency changes to 1 GHz. A similar erratum is documented by Marvell but only for systems where base frequency is 1.2 GHz.

We've discovered that to make cpufreq scaling stable on Armada 3720 systems with base frequency 1 GHz, we also have to set voltage levels for L0 and L1 loads to at least 1108 mV. We were led to this by patch we found in Marvell kernel fork. Fix is in the patch 4/10.

https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/dc33b62c90696afb6adc7dbcc4ebbd48bedec269

During fixing this voltage issue for 1 GHz we discovered another bug in armada-37xx-cpufreq driver that causes CPU instability. Erratum for VDD stabilization was improperly implemented, details are in patch 6/10.

We have tested this patch series on Espressobin v5 and Turris MOX boards. If you have other Armada 3720 boards (Espressobin v5/v7, uDPU, Devel Board, ...) then it will be nice to do an additional tests and check if instability issues are finally fixed.

There is a discussion on armbian forum that Espressobin v7 is unstable when running at 1 GHz and in this thread was also mentioned above voltage patch from Marvell kernel fork:

https://forum.armbian.com/topic/10429-how-to-make-espressobin-v7-stable/

The only change in this third version is modified patch 04/10 with fixes for 1.2 GHz variant of Espressobin. Minimal CPU voltage in L1 load for 1.2 GHz variant was increased to 1.155V.

Patch 01/10 was already applied by Gregory into his DT tree, so it is not RESEND to linux-pm.

Marek & Pali

Marek Behún (3):
arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node
cpufreq: armada-37xx: Fix setting TBG parent for load levels
clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM
clock

Pali Rohár (7):
cpufreq: armada-37xx: Fix the AVS value for load L1
clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to
1 GHz
clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1
to L0
cpufreq: armada-37xx: Fix driver cleanup when registration failed
cpufreq: armada-37xx: Fix determining base CPU frequency
cpufreq: armada-37xx: Remove cur_frequency variable
cpufreq: armada-37xx: Fix module unloading

 arch/arm64/boot/dts/marvell/armada-37xx.dtsi |   3 +-
 drivers/clk/mvebu/armada-37xx-periph.c       |  83 +++++++-------
 drivers/cpufreq/armada-37xx-cpufreq.c        | 111 +++++++++++++++----
 3 files changed, 135 insertions(+), 62 deletions(-)
Signature · 1 line
2.20.1