All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Joachim Eastwood <manabian@gmail.com>,
	Paul Walmsley <paul@pwsan.com>, Kevin Hilman <khilman@linaro.org>,
	Tero Kristo <t-kristo@ti.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 06/11] ARM: OMAP2+: Fix voltage scaling init for device tree
Date: Mon, 19 May 2014 13:32:46 -0500	[thread overview]
Message-ID: <CAGo_u6oGHFAFimYSc8Utgbp=oCahXzO0ZoYjhFgOkT3YkppS6A@mail.gmail.com> (raw)
In-Reply-To: <20140519180104.GL4849@atomide.com>

On Mon, May 19, 2014 at 1:01 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Joachim Eastwood <manabian@gmail.com> [140519 10:51]:
>> Hi Tony,
>>
>> If found this patch in your omap-for-v3.16/pm-signed tag and tested it
>> on top of Linus master + omap 3.16 dt + Tomi fbdev omap. I assumed
>> it's going upstream for 3.16(?).
>
> Yes.
>
>> First of all; is this safe on OMAP4460?
>> As far as I understand voltage scaling on 4460 has never been
>> mainline, but this code enables voltage scaling for all omap4 parts.
>> More below.
>
> Sounds like something's not right then. This should just restore
> the earlier code path we had for legacy booting for omap4.
>
>> On 11 April 2014 01:47, Tony Lindgren <tony@atomide.com> wrote:
>> > We are currently disabling the init of voltage scaling
>> > for device tree. With the voltage scaling problems fixed
>> > for omap3 in general, there's no need to disable the voltage
>> > scaling init for device tree based booting.
>> >
>> > Cc: Kevin Hilman <khilman@linaro.org>
>> > Cc: Nishanth Menon <nm@ti.com>
>> > Cc: Paul Walmsley <paul@pwsan.com>
>> > Cc: Tero Kristo <t-kristo@ti.com>
>> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>> > ---
>> >  arch/arm/mach-omap2/pm.c | 28 ++++++++++++----------------
>> >  1 file changed, 12 insertions(+), 16 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>> > index e1b4141..ccefd11 100644
>> > --- a/arch/arm/mach-omap2/pm.c
>> > +++ b/arch/arm/mach-omap2/pm.c
>> > @@ -287,25 +287,21 @@ omap_postcore_initcall(omap2_common_pm_init);
>> >
>> >  int __init omap2_common_pm_late_init(void)
>> >  {
>> > -       /*
>> > -        * In the case of DT, the PMIC and SR initialization will be done using
>> > -        * a completely different mechanism.
>> > -        * Disable this part if a DT blob is available.
>> > -        */
>> > -       if (!of_have_populated_dt()) {
>> > -
>> > -               /* Init the voltage layer */
>> > -               omap_pmic_late_init();
>> > -               omap_voltage_late_init();
>> > +       if (of_have_populated_dt()) {
>> > +               omap3_twl_init();
>> > +               omap4_twl_init();
>> > +       }
>> >
>> > -               /* Initialize the voltages */
>> > -               omap3_init_voltages();
>> > -               omap4_init_voltages();
>> > +       /* Init the voltage layer */
>> > +       omap_pmic_late_init();
>> > +       omap_voltage_late_init();
>> >
>> > -               /* Smartreflex device init */
>> > -               omap_devinit_smartreflex();
>> > +       /* Initialize the voltages */
>> > +       omap3_init_voltages();
>> > +       omap4_init_voltages();
>> >
>> > -       }
>> > +       /* Smartreflex device init */
>> > +       omap_devinit_smartreflex();
>> >
>> >         /* cpufreq dummy device instantiation */
>> >         omap_init_cpufreq();
>> > --
>>
>> In omap4_twl_init() we have:
>> if (!cpu_is_omap44xx())
>>     return -ENODEV;
>>
>> voltdm = voltdm_lookup("mpu");
>> omap_voltage_register_pmic(voltdm, &omap4_mpu_pmic);
>>
>> voltdm = voltdm_lookup("iva");
>> omap_voltage_register_pmic(voltdm, &omap4_iva_pmic);
>>
>> voltdm = voltdm_lookup("core");
>> omap_voltage_register_pmic(voltdm, &omap4_core_pmic);
>>
>> As far as I understand the setup above is only valid for 4430 and not
>> 4460 since it is hook up to the twl in diffent way. External switcher
>> (TPS62361) for mpu rail and the other rails are used differently.
>
> Hmm interesting, I think we had this enabled with legacy booting?
>
>> I also get the following messages on boot now:
>> [ 2.458740] twl: not initialized
>> [ 2.462127] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.470581] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.479003] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.487457] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.495880] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.504302] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.512725] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1410000 Vs max 1316660
>> [ 2.521179] omap2_set_init_voltage: unable to find boot up OPP for vdd_mpu
>> [ 2.528411] omap2_set_init_voltage: unable to set vdd_mpu
>> [ 2.534088] omap2_set_init_voltage: unable to find boot up OPP for vdd_core
>> [ 2.541412] omap2_set_init_voltage: unable to set vdd_core
>> [ 2.547210] omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
>> [ 2.554443] omap2_set_init_voltage: unable to set vdd_iva
>>
>> It doesn't seem too happy on my 4460.
>
> Indeed, we need to fix it. Nishant, any comments on how we should
> deal with this one?



we can add TPS data here for 4460 mpu (panda-ES) if that is
interesting to us - given that the common voltage domain/VC/VP stuff
so far has gone in no positive direction in our discussions last year.

Regards,
Nishanth Menon

WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/11] ARM: OMAP2+: Fix voltage scaling init for device tree
Date: Mon, 19 May 2014 13:32:46 -0500	[thread overview]
Message-ID: <CAGo_u6oGHFAFimYSc8Utgbp=oCahXzO0ZoYjhFgOkT3YkppS6A@mail.gmail.com> (raw)
In-Reply-To: <20140519180104.GL4849@atomide.com>

On Mon, May 19, 2014 at 1:01 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Joachim Eastwood <manabian@gmail.com> [140519 10:51]:
>> Hi Tony,
>>
>> If found this patch in your omap-for-v3.16/pm-signed tag and tested it
>> on top of Linus master + omap 3.16 dt + Tomi fbdev omap. I assumed
>> it's going upstream for 3.16(?).
>
> Yes.
>
>> First of all; is this safe on OMAP4460?
>> As far as I understand voltage scaling on 4460 has never been
>> mainline, but this code enables voltage scaling for all omap4 parts.
>> More below.
>
> Sounds like something's not right then. This should just restore
> the earlier code path we had for legacy booting for omap4.
>
>> On 11 April 2014 01:47, Tony Lindgren <tony@atomide.com> wrote:
>> > We are currently disabling the init of voltage scaling
>> > for device tree. With the voltage scaling problems fixed
>> > for omap3 in general, there's no need to disable the voltage
>> > scaling init for device tree based booting.
>> >
>> > Cc: Kevin Hilman <khilman@linaro.org>
>> > Cc: Nishanth Menon <nm@ti.com>
>> > Cc: Paul Walmsley <paul@pwsan.com>
>> > Cc: Tero Kristo <t-kristo@ti.com>
>> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>> > ---
>> >  arch/arm/mach-omap2/pm.c | 28 ++++++++++++----------------
>> >  1 file changed, 12 insertions(+), 16 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>> > index e1b4141..ccefd11 100644
>> > --- a/arch/arm/mach-omap2/pm.c
>> > +++ b/arch/arm/mach-omap2/pm.c
>> > @@ -287,25 +287,21 @@ omap_postcore_initcall(omap2_common_pm_init);
>> >
>> >  int __init omap2_common_pm_late_init(void)
>> >  {
>> > -       /*
>> > -        * In the case of DT, the PMIC and SR initialization will be done using
>> > -        * a completely different mechanism.
>> > -        * Disable this part if a DT blob is available.
>> > -        */
>> > -       if (!of_have_populated_dt()) {
>> > -
>> > -               /* Init the voltage layer */
>> > -               omap_pmic_late_init();
>> > -               omap_voltage_late_init();
>> > +       if (of_have_populated_dt()) {
>> > +               omap3_twl_init();
>> > +               omap4_twl_init();
>> > +       }
>> >
>> > -               /* Initialize the voltages */
>> > -               omap3_init_voltages();
>> > -               omap4_init_voltages();
>> > +       /* Init the voltage layer */
>> > +       omap_pmic_late_init();
>> > +       omap_voltage_late_init();
>> >
>> > -               /* Smartreflex device init */
>> > -               omap_devinit_smartreflex();
>> > +       /* Initialize the voltages */
>> > +       omap3_init_voltages();
>> > +       omap4_init_voltages();
>> >
>> > -       }
>> > +       /* Smartreflex device init */
>> > +       omap_devinit_smartreflex();
>> >
>> >         /* cpufreq dummy device instantiation */
>> >         omap_init_cpufreq();
>> > --
>>
>> In omap4_twl_init() we have:
>> if (!cpu_is_omap44xx())
>>     return -ENODEV;
>>
>> voltdm = voltdm_lookup("mpu");
>> omap_voltage_register_pmic(voltdm, &omap4_mpu_pmic);
>>
>> voltdm = voltdm_lookup("iva");
>> omap_voltage_register_pmic(voltdm, &omap4_iva_pmic);
>>
>> voltdm = voltdm_lookup("core");
>> omap_voltage_register_pmic(voltdm, &omap4_core_pmic);
>>
>> As far as I understand the setup above is only valid for 4430 and not
>> 4460 since it is hook up to the twl in diffent way. External switcher
>> (TPS62361) for mpu rail and the other rails are used differently.
>
> Hmm interesting, I think we had this enabled with legacy booting?
>
>> I also get the following messages on boot now:
>> [ 2.458740] twl: not initialized
>> [ 2.462127] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.470581] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.479003] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.487457] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.495880] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.504302] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1375000 Vs max 1316660
>> [ 2.512725] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for
>> 1410000 Vs max 1316660
>> [ 2.521179] omap2_set_init_voltage: unable to find boot up OPP for vdd_mpu
>> [ 2.528411] omap2_set_init_voltage: unable to set vdd_mpu
>> [ 2.534088] omap2_set_init_voltage: unable to find boot up OPP for vdd_core
>> [ 2.541412] omap2_set_init_voltage: unable to set vdd_core
>> [ 2.547210] omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
>> [ 2.554443] omap2_set_init_voltage: unable to set vdd_iva
>>
>> It doesn't seem too happy on my 4460.
>
> Indeed, we need to fix it. Nishant, any comments on how we should
> deal with this one?



we can add TPS data here for 4460 mpu (panda-ES) if that is
interesting to us - given that the common voltage domain/VC/VP stuff
so far has gone in no positive direction in our discussions last year.

Regards,
Nishanth Menon

  reply	other threads:[~2014-05-19 18:32 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 23:47 [PATCH 00/11] Fixes for omap PM for making omap3 DT only Tony Lindgren
2014-04-10 23:47 ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 01/11] ARM: OMAP3: PM: remove access to PRM_VOLTCTRL register Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 02/11] ARM: OMAP3: Fix idle mode signaling for sys_clkreq and sys_off_mode Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-12  8:57   ` Tero Kristo
2014-04-12  8:57     ` Tero Kristo
2014-04-12 15:02     ` Tony Lindgren
2014-04-12 15:02       ` Tony Lindgren
2014-04-23  7:51       ` Tero Kristo
2014-04-23  7:51         ` Tero Kristo
2014-04-23 20:49         ` Tony Lindgren
2014-04-23 20:49           ` Tony Lindgren
2014-05-07 16:34           ` Tony Lindgren
2014-05-07 16:34             ` Tony Lindgren
2014-04-14 22:51   ` Grazvydas Ignotas
2014-04-14 22:51     ` Grazvydas Ignotas
2014-04-15 22:56     ` Tony Lindgren
2014-04-15 22:56       ` Tony Lindgren
2014-04-16 13:58       ` Grazvydas Ignotas
2014-04-16 13:58         ` Grazvydas Ignotas
2014-04-18 17:48         ` Tony Lindgren
2014-04-18 17:48           ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 03/11] ARM: OMAP3: Disable broken omap3_set_off_timings function Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 04/11] ARM: OMAP3: Fix voltage control for deeper idle states Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-11 15:14   ` Tony Lindgren
2014-04-11 15:14     ` Tony Lindgren
2014-05-07 16:38     ` Tony Lindgren
2014-05-07 16:38       ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 05/11] ARM: dts: Configure omap3 twl4030 I2C4 pins by default Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 06/11] ARM: OMAP2+: Fix voltage scaling init for device tree Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-05-19 17:50   ` Joachim Eastwood
2014-05-19 17:50     ` Joachim Eastwood
2014-05-19 18:01     ` Tony Lindgren
2014-05-19 18:01       ` Tony Lindgren
2014-05-19 18:32       ` Nishanth Menon [this message]
2014-05-19 18:32         ` Nishanth Menon
2014-05-19 18:48         ` Joachim Eastwood
2014-05-19 18:48           ` Joachim Eastwood
2014-05-19 18:52           ` Nishanth Menon
2014-05-19 18:52             ` Nishanth Menon
2014-05-19 20:23         ` Tony Lindgren
2014-05-19 20:23           ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 07/11] ARM: dts: Enable N900 keybaord sleep leds by default Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-11  0:23   ` Tony Lindgren
2014-04-11  0:23     ` Tony Lindgren
2014-04-11 23:31   ` Aaro Koskinen
2014-04-11 23:31     ` Aaro Koskinen
2014-04-23 21:07     ` Tony Lindgren
2014-04-23 21:07       ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 08/11] ARM: dts: Fix omap serial wake-up when booted with device tree Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 09/11] ARM: OMAP2+: Enable CPUidle in omap2plus_defconfig Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 10/11] mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-17  8:00   ` Lee Jones
2014-04-17  8:00     ` Lee Jones
2014-04-17 15:37     ` Tony Lindgren
2014-04-17 15:37       ` Tony Lindgren
2014-04-23 14:46       ` [GIT PULL] arm: omap: Immutable branch between MFD and ARM OMAP due for the v3.16 merge-window Lee Jones
2014-04-23 14:46         ` Lee Jones
2014-04-23 20:41         ` Tony Lindgren
2014-04-23 20:41           ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 11/11] pinctrl: single: Clear pin interrupts enabled by bootloader Tony Lindgren
2014-04-10 23:47   ` Tony Lindgren
2014-04-22 11:54   ` Linus Walleij
2014-04-22 11:54     ` Linus Walleij
2014-04-22 16:10     ` Tony Lindgren
2014-04-22 16:10       ` Tony Lindgren
2014-04-23 13:57       ` Linus Walleij
2014-04-23 13:57         ` Linus Walleij
2014-04-11 20:47 ` [PATCH 00/11] Fixes for omap PM for making omap3 DT only Sebastian Reichel
2014-04-11 20:47   ` Sebastian Reichel
2014-04-11 21:04   ` Tony Lindgren
2014-04-11 21:04     ` 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='CAGo_u6oGHFAFimYSc8Utgbp=oCahXzO0ZoYjhFgOkT3YkppS6A@mail.gmail.com' \
    --to=nm@ti.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=paul@pwsan.com \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.