linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Florian Boor <florian.boor@kernelconcepts.de>
Cc: linux-omap@vger.kernel.org
Subject: Re: OMAP4460 cpufreq crashes
Date: Fri, 7 May 2021 08:47:05 +0300	[thread overview]
Message-ID: <YJTUWaPWSmvwaZMb@atomide.com> (raw)
In-Reply-To: <38229f0a-85e8-680f-f561-5fc59ac84c6b@kernelconcepts.de>

Hi,

* Florian Boor <florian.boor@kernelconcepts.de> [210506 16:11]:
> Hi all,
> 
> I recently spent some time with an OMAP4460 based Variscite VAR-STK-OM44 and
> latest Linux releases and latest linux-omap Git. The evaluation kit runs pretty
> well unless I try to enable cpufeq. This causes a crash with quite random
> backtraces right on boot within a few seconds after entering userspace.
> 
> It turned out that this happens when the board switches to 920MHz. Commenting
> out this operating point in the devicetree fixes this issue... but limits
> performance quite a lot.

Hmm OK, sounds like the voltages might be wrong.

I don't have one of these boards, but would be glad to add one to my rack
though if it can boot with NFSroot. If somebody happens to have a spare
evaluation kit around in the corner to send me, please let me know :)

> I did some research and I'd say its related to problems with voltage regulation.
> I can watch the scaling driver changing the clock but for some reason the
> voltage does not seem to get adjusted.
> Might this behaviour be related to the OMAP infrastructure changes?
> 
> There are some messages at boot which might be related:
> 
> twl: not initialized
> [    2.148742] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs
> max 1316660
> [    2.156799] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs
> max 1316660
> ...

I'm seeing these too on duovero 4430, not sure how long that these have been
happening but probably several years. We should just fix these and all the other
annoying errors that show up with dmesg -l err,warn.

The experimental patch below makes the warnings go away, but I'm not sure if
it's the right fix. Maybe give it a try and see if at least the warnings go away?

> There is a little patch around that changes the initialisation order which makes
> this messages go away but does not fix the odd behaviour. So maybe this is just
> a cosmetic issue and the actual problem is somewhere else.

Sorry I recall some discussion on the twl init problems, but don't remember the
details. Do you have some link for the patch and discussion?

Regards,

Tony

8< ------------------------
diff --git a/arch/arm/mach-omap2/vc44xx_data.c b/arch/arm/mach-omap2/vc44xx_data.c
--- a/arch/arm/mach-omap2/vc44xx_data.c
+++ b/arch/arm/mach-omap2/vc44xx_data.c
@@ -88,8 +88,8 @@ struct omap_vc_channel omap4_vc_core = {
 /*
  * Voltage levels for different operating modes: on, sleep, retention and off
  */
-#define OMAP4_ON_VOLTAGE_UV			1375000
-#define OMAP4_ONLP_VOLTAGE_UV			1375000
+#define OMAP4_ON_VOLTAGE_UV			1316660
+#define OMAP4_ONLP_VOLTAGE_UV			1316660
 #define OMAP4_RET_VOLTAGE_UV			837500
 #define OMAP4_OFF_VOLTAGE_UV			0
 
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -99,7 +99,7 @@ struct voltagedomain {
 #define OMAP3630_VP2_VLIMITTO_VDDMAX	1200000
 
 #define OMAP4_VP_MPU_VLIMITTO_VDDMIN	830000
-#define OMAP4_VP_MPU_VLIMITTO_VDDMAX	1410000
+#define OMAP4_VP_MPU_VLIMITTO_VDDMAX	1316660
 #define OMAP4_VP_IVA_VLIMITTO_VDDMIN	830000
 #define OMAP4_VP_IVA_VLIMITTO_VDDMAX	1260000
 #define OMAP4_VP_CORE_VLIMITTO_VDDMIN	830000
-- 
2.31.1

  reply	other threads:[~2021-05-07  5:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 15:35 OMAP4460 cpufreq crashes Florian Boor
2021-05-07  5:47 ` Tony Lindgren [this message]
2021-05-10 11:13   ` Florian Boor
2021-06-04 13:31     ` Florian Boor
2021-06-05  5:11       ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJTUWaPWSmvwaZMb@atomide.com \
    --to=tony@atomide.com \
    --cc=florian.boor@kernelconcepts.de \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).