DFS, CPU idle on LS1021a-twr

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DFS, CPU idle on LS1021a-twr

2,145 Views
dwokke
Contributor II

Dear all,

I have been busy trying to make DFS possible using the QorIQ-SDK-V1.8.

Goal is to save as much power as possible when running idle using the LS1021a-TWR development kit.

I made a minimal build (fsl-image-minimal). I updated the U-boot ( U-Boot 2015.01+ls1+g6ba8eed (Sep 07 2015 - 14:03:16)) and RCW and started linux using the ramdisk deployment.

This al worked. Setting the CPU cores to USERSPACE made it possible to set frequencies to 250, 500 or 1000MHz.

The problem is that I don't see any change in power consumption when changing the frequency.

Is there anybody in the community that has tried this and succeeded?

Any help is greatly appreciated.

Best regards,

Dennis

Labels (1)
0 Kudos
11 Replies

1,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dennis Wokke,

Due to hardware limitation DFS is not supported on LS1021ATWR CPU Rev 1.0 board.

DFS(Dynamic Frequency Scaling) is supported on LS1021ATWR CPU Rev 2.0 target board.

For LS1021A Rev 2.0 target, you need to download and install "Linux SDK for LS1021A v0.4" from QorIQ LS1021A Dual-Core Processor with LCD Co|Freescale.

SDK 1.8 is only used for CPU Rev 1.0 target.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,634 Views
dwokke
Contributor II

HI Yiping,

Thanks for your response, make it all clear.

How can I find out which board I have? I cannot find any reference on Rev 1.0 or Rev 2.0 on my LS1021ATWR board.

Best regards,

Dennis

0 Kudos

1,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dennis,

You could find CPU version information from u-boot log, please refer to the following for CPU Rev 2.0.

U-Boot 2015.01-02313-g4549266-dirty (Jul 01 2015 - 15:08:06)

CPU:  Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)

Clock Configuration:

      CPU0(ARMV7):1000 MHz,

      Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate),

Reset Configuration Word (RCW):

      00000000: 0608000a 00000000 00000000 00000000

      00000010: 30000000 00007900 e0025a00 21046000

      00000020: 00000000 00000000 00000000 00038000

      00000030: 00080000 48007340 00000000 00000000

Board: LS1021ATWR

CPLD:  V2.0

PCBA:  V1.0

VBank: 0

I2C:  ready

DRAM:  1 GiB

Using SERDES1 Protocol: 48 (0x30)


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,635 Views
dwokke
Contributor II

Hi Yiping,

So I finally got the Rev 2.0 board. I installed the Linux SDK for LS1021a v0.4. I configured the power management to include the userspace and ondemand governors. I measure the power consumption on the 5V power input and I don't see any change when runniong at 250000, 500000 and 1000000 Hz.

Could you please provide me with information on how to get this working as I am out of ideas and knowledge at this point?!?

Thanks

Best regards,

Dennis

0 Kudos

1,635 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dennis,

I checked the Kernel source code in Linux SDK LS1021a v0.4, the patch "0001-cpufreq-qoriq-fixed-a-clock-setting-error.patch"(fixing DFS on non-t4240 not working) has already been applied, so DFS feature in this version SDK should work.

Please check the following Kernel configuration.

CPU Power Management -->

  CPU Frequency scaling -->

        [*] CPU Frequency scaling

        <*> CPU frequency translation statistics

              Default CPUFreq governor (userspace) -->

        -*- 'userspace' governor for userspace frequency scaling

            ARM CPU frequency scaling drivers -->

                    <*> CPU frequency scaling driver for Freescale QorIQ SoCs

1. list all the frequencies a core can support (take cpu 0 for example) :

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

1000000 500000 250000

2. check the CPU's current frequency

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

1000000

3. change the CPU's frequency we expect:

# echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

4. # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

500000

Did you measure CPU current without any change?


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,634 Views
dwokke
Contributor II

Hi Yiping,

I checked the setting. They are as you described.

I also rechecked the power usage. Following your points 1 to 4. I found a saving of 0.02A on the complete board (total board power is 1.37A @ 1000MHz and 1.35A @ 500MHz.

So yes it seems to be working.

Could you give me some advise on getting the board to do IDLE states as well? I tried setting the IDLE settings using the menuconfig, but when running Linux I don't seem to have an IDLE driver. I'm currently running the minimal target.

root@ls1021atwr:~# cat /sys/devices/system/cpu/cpuidle/current_driver

none

root@ls1021atwr:~#

Goal is to reduce the boards power dramatically while idle. Something the board will have to do most of the time to conserve battery power.

Any help is greatly appreciated.

Best regards,

Dennis

0 Kudos

1,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dennis,

Please provide you Kernel configuration regarding CPU Idle.

Thanks,

Yiping

0 Kudos

1,634 Views
dwokke
Contributor II

Hi Yiping,

Kernel configuration of CPU Idle:

CPU Power Management -->

CPU Idle -->

  [*] CPU idle PM support

  [*] Ladder governor (for periodic timer tick)

  -*- Menu governor (for tickless system)

 

Under ARM CPU Idle drivers ---, I have no futher options. No drivers are listed.

Best regards,

Dennis

0 Kudos

1,635 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dennis,

In LS1021 0.4 Linux SDK release, the general CPU idle driver is used, no ls1021 specific driver in drivers/cpuidle/, the Linux SDK document needs to be modified.

Please refer to arch/arm/kernel/cpuidle.c and arch/arm/include/asm/cpuidle.h, WFI state is used as default.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,635 Views
dwokke
Contributor II

Hi Yiping,

Could you provide more information on how to get the CPU idle mode working?

Also can you give me information on how much power can be saved when in idle mode.

The board now consumes about 1.3A.

Reading the CPU gives me about 1050mA using: cat /sys/bus/i2c/devices/0-0040/curr1_input

I need to get this down preferably under the 100mA when in idle.

Is this the same as sleep/deep sleep mode?

Best regards,

Dennis Wokke

0 Kudos

1,635 Views
dwokke
Contributor II

Hi Yiping,

So yes I am srewed. I got the V1.0. See log below

U-Boot 2015.01+ls1+g6ba8eed (Sep 07 2015 - 14:03:16)

CPU:   Freescale LayerScape LS1021E, Version: 1.0, (0x87081110)

I just bought 3 boards all having the V1.0 revision and have been working on getting DFS running for ages using SDK V1.8. Only now to find out it will never happen.

Thanks for the help anyway.

Best regards,

Dennis

0 Kudos