mbox series

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

Message ID 20210408114223.8471-1-pali@kernel.org
Headers show
Series Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz | expand

Message

Pali Rohár April 8, 2021, 11:42 a.m. UTC
From: Pali Rohár <pali.rohar@gmail.com>

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(-)

Comments

Viresh Kumar April 9, 2021, 7:49 a.m. UTC | #1
On Thu, 8 Apr 2021 at 17:12, Pali Rohár <pali@kernel.org> wrote:

You haven't sent patch 1/10 or something went wrong somewhere.
Please send it in reply to the cover letter, so everything appears connected.
Pali Rohár April 9, 2021, 8:29 a.m. UTC | #2
On Friday 09 April 2021 13:19:11 Viresh Kumar wrote:
> On Thu, 8 Apr 2021 at 17:12, Pali Rohár <pali@kernel.org> wrote:

> 

> You haven't sent patch 1/10 or something went wrong somewhere.

> Please send it in reply to the cover letter, so everything appears connected.


Hello Viresh! I have written in cover letter that I have not resent
patch 01/10 because it is DTS patch and was already applied into Gregory
mvebu/dt64 tree.
Viresh Kumar April 9, 2021, 8:31 a.m. UTC | #3
On 09-04-21, 10:29, Pali Rohár wrote:
> On Friday 09 April 2021 13:19:11 Viresh Kumar wrote:

> > On Thu, 8 Apr 2021 at 17:12, Pali Rohár <pali@kernel.org> wrote:

> > 

> > You haven't sent patch 1/10 or something went wrong somewhere.

> > Please send it in reply to the cover letter, so everything appears connected.

> 

> Hello Viresh! I have written in cover letter that I have not resent

> patch 01/10 because it is DTS patch and was already applied into Gregory

> mvebu/dt64 tree.


Ahh, I am sorry about missing that. You should have created patches starting
from patch 2/10 in that case, so it would have been 00-09/09.

-- 
viresh
Viresh Kumar April 9, 2021, 9:49 a.m. UTC | #4
On 08-04-21, 13:42, Pali Rohár wrote:
> From: Pali Rohár <pali.rohar@gmail.com>

> 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.


Applied. Thanks.

-- 
viresh