linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CPU clock frequency issues with T124/Jetson TK1 at boot time
@ 2016-08-24 12:16 Josef
       [not found] ` <2041954940.418947.1472040961045.JavaMail.open-xchange-IsKSIZZT16tJ47kCBHk0XPazQN66w0Jx@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Josef @ 2016-08-24 12:16 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi,

the CPU clock setup for the T124 on the Jetson K1 board seems to have some
problems while booting:

The clock-frequency parameter in the default device-tree config is missing:
[ 0.080472] /cpus/cpu@0 missing clock-frequency property
[ 0.085605] /cpus/cpu@1 missing clock-frequency property
[ 0.090963] /cpus/cpu@2 missing clock-frequency property
[ 0.096350] /cpus/cpu@3 missing clock-frequency property

But when you add it, the warning disappears, but the clock still seems not to be
set up correctly:

  cpus {
   cpu@0 {
    clock-frequency = <1938000000>;
   };
   cpu@1 {
    clock-frequency = <1938000000>;
   }
  ...

[ 7.035525] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 696000 KHz
[ 7.042895] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed
to: 714000 KHz

For me this looks like it is using the frequency set up by the u-boot boot
loader. This might also explain why the kernel currently needs about 8 seconds
to boot which seems to be way too much for a Cortex-A15 device.

https://storage.kernelci.org/lsk/lsk-v3.18-16.07-133-ge8aab86f8308/arm-tegra_defconfig/lab-baylibre-seattle/boot-tegra124-jetson-tk1.html

Thanks,
Josef

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CPU clock frequency issues with T124/Jetson TK1 at boot time
       [not found] ` <2041954940.418947.1472040961045.JavaMail.open-xchange-IsKSIZZT16tJ47kCBHk0XPazQN66w0Jx@public.gmane.org>
@ 2016-08-24 12:47   ` Mikko Perttunen
       [not found]     ` <e524de76-c894-2167-9fe7-216c46b8f761-/1wQRMveznE@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Mikko Perttunen @ 2016-08-24 12:47 UTC (permalink / raw)
  To: Josef, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 24.08.2016 15:16, Josef wrote:
> Hi,

Hi!

Your log indicates you're running on kernel v3.18. Cpufreq for Tegra124 
is only implemented starting from v4.3, so you'd need to upgrade.

>
> the CPU clock setup for the T124 on the Jetson K1 board seems to have some
> problems while booting:
>
> The clock-frequency parameter in the default device-tree config is missing:
> [ 0.080472] /cpus/cpu@0 missing clock-frequency property
> [ 0.085605] /cpus/cpu@1 missing clock-frequency property
> [ 0.090963] /cpus/cpu@2 missing clock-frequency property
> [ 0.096350] /cpus/cpu@3 missing clock-frequency property
>
> But when you add it, the warning disappears, but the clock still seems not to be
> set up correctly:
>
>   cpus {
>    cpu@0 {
>     clock-frequency = <1938000000>;
>    };
>    cpu@1 {
>     clock-frequency = <1938000000>;
>    }
>   ...
>
> [ 7.035525] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 696000 KHz
> [ 7.042895] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed
> to: 714000 KHz
>
> For me this looks like it is using the frequency set up by the u-boot boot
> loader. This might also explain why the kernel currently needs about 8 seconds
> to boot which seems to be way too much for a Cortex-A15 device.

Yes, this is normal. The device boots up with the CPUs on the PLLX clock 
that runs at 696MHz. Later the cpufreq driver will switch to another 
clock (which, btw, does not have 696 MHz as an operating point so you 
will continue to see this message even on newer kernels.)

>
> https://storage.kernelci.org/lsk/lsk-v3.18-16.07-133-ge8aab86f8308/arm-tegra_defconfig/lab-baylibre-seattle/boot-tegra124-jetson-tk1.html
>
> Thanks,
> Josef

Cheers,
Mikko.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CPU clock frequency issues with T124/Jetson TK1 at boot time
       [not found]     ` <e524de76-c894-2167-9fe7-216c46b8f761-/1wQRMveznE@public.gmane.org>
@ 2016-08-24 19:10       ` Josef Raschen
  2016-08-24 19:35         ` Lucas Stach
  0 siblings, 1 reply; 4+ messages in thread
From: Josef Raschen @ 2016-08-24 19:10 UTC (permalink / raw)
  To: Mikko Perttunen; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Mittwoch, 24. August 2016 15:47:38 CEST Mikko Perttunen wrote:
> Your log indicates you're running on kernel v3.18. Cpufreq for Tegra124
> is only implemented starting from v4.3, so you'd need to upgrade.

The log I pointed to was not mine and it was the wrong one, sorry. I am 
actually working with mainline 4.7. 

Here is a more recent one from kernelci.org showing the same behavior:

https://storage.kernelci.org/next/next-20160822/arm-tegra_defconfig/lab-baylibre-seattle/boot-tegra124-jetson-tk1.html

The 12 seconds they need to boot to user space are caused by the NFS rootfs. I 
am booting from eMMC and need about 8 seconds. From the hardware specification 
I would expect this to be less than 2 seconds. 

> > [ 7.035525] cpufreq: cpufreq_online: CPU0: Running at unlisted freq:
> > 696000 KHz [ 7.042895] cpufreq: cpufreq_online: CPU0: Unlisted initial
> > frequency changed to: 714000 KHz
> > 
> > For me this looks like it is using the frequency set up by the u-boot boot
> > loader. This might also explain why the kernel currently needs about 8
> > seconds to boot which seems to be way too much for a Cortex-A15 device.
> 
> Yes, this is normal. The device boots up with the CPUs on the PLLX clock
> that runs at 696MHz. Later the cpufreq driver will switch to another
> clock (which, btw, does not have 696 MHz as an operating point so you
> will continue to see this message even on newer kernels.)

Ok, so the code that sets the clock frequency according to the device tree 
seems to be missing. To reduce the boot time of the T124, the easiest solution 
might be to set the clock frequency to maximum in the boot loader and then set 
up cpufreq to use the 'performance' governor?

Thanks,
Josef

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CPU clock frequency issues with T124/Jetson TK1 at boot time
  2016-08-24 19:10       ` Josef Raschen
@ 2016-08-24 19:35         ` Lucas Stach
  0 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2016-08-24 19:35 UTC (permalink / raw)
  To: Josef Raschen, Mikko Perttunen; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

Am Mittwoch, den 24.08.2016, 21:10 +0200 schrieb Josef Raschen:
> On Mittwoch, 24. August 2016 15:47:38 CEST Mikko Perttunen wrote:
> > 
> > Your log indicates you're running on kernel v3.18. Cpufreq for
> > Tegra124
> > is only implemented starting from v4.3, so you'd need to upgrade.
> The log I pointed to was not mine and it was the wrong one, sorry. I
> am 
> actually working with mainline 4.7. 
> 
> Here is a more recent one from kernelci.org showing the same
> behavior:
> 
> https://storage.kernelci.org/next/next-20160822/arm-tegra_defconfig/l
> ab-baylibre-seattle/boot-tegra124-jetson-tk1.html
> 
> The 12 seconds they need to boot to user space are caused by the NFS
> rootfs. I 
> am booting from eMMC and need about 8 seconds. From the hardware
> specification 
> I would expect this to be less than 2 seconds. 
> 
> > 
> > > 
> > > [ 7.035525] cpufreq: cpufreq_online: CPU0: Running at unlisted
> > > freq:
> > > 696000 KHz [ 7.042895] cpufreq: cpufreq_online: CPU0: Unlisted
> > > initial
> > > frequency changed to: 714000 KHz
> > > 
> > > For me this looks like it is using the frequency set up by the u-
> > > boot boot
> > > loader. This might also explain why the kernel currently needs
> > > about 8
> > > seconds to boot which seems to be way too much for a Cortex-A15
> > > device.
> > Yes, this is normal. The device boots up with the CPUs on the PLLX
> > clock
> > that runs at 696MHz. Later the cpufreq driver will switch to
> > another
> > clock (which, btw, does not have 696 MHz as an operating point so
> > you
> > will continue to see this message even on newer kernels.)
> Ok, so the code that sets the clock frequency according to the device
> tree 
> seems to be missing. To reduce the boot time of the T124, the easiest
> solution 
> might be to set the clock frequency to maximum in the boot loader and
> then set 
> up cpufreq to use the 'performance' governor?
> 
The bootloader is using 696MHz, as this is the only safe frequency for
all different versions of the Tegra124. If you want to run it at a
higher frequency, the bootloader would need to know a lot more about
the actual SKU it is running on. Probably not going to happen.

Also you might want to make sure that the long boot times aren't caused
by other things than low CPU clock speed. Especially using a serial
console, printing out all the boot messages may be where you are
loosing a lot more time.

Regards,
Lucas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-24 19:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 12:16 CPU clock frequency issues with T124/Jetson TK1 at boot time Josef
     [not found] ` <2041954940.418947.1472040961045.JavaMail.open-xchange-IsKSIZZT16tJ47kCBHk0XPazQN66w0Jx@public.gmane.org>
2016-08-24 12:47   ` Mikko Perttunen
     [not found]     ` <e524de76-c894-2167-9fe7-216c46b8f761-/1wQRMveznE@public.gmane.org>
2016-08-24 19:10       ` Josef Raschen
2016-08-24 19:35         ` Lucas Stach

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