UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
2,166 Views
Registered: ‎09-18-2009

Zynq Linux Power Management (Power States)

Hello,

We are trying to enable power states of Zynq based Linux system for power saving. But we couldn't activate it. Please look at our working and some outputs if you have any idea to advice.

Regards,
Ali

We added following kernel config parameters to config file.

CONFIG_THERMAL=y
CONFIG_CPU_THERMAL=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_PM_SLEEP=y
CONFIG_ARM_ZYNQ_CPUIDLE=y

CONFIG_ARM_ZYNQ_CPUFREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

#
# Power management options
#
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM=y
CONFIG_ARCH_HAS_OPP=y
CONFIG_PM_OPP=y
CONFIG_PM_CLK=y
CONFIG_CPU_PM=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARM_CPU_SUSPEND=y



We couldn't see "Xilinx Zynq CpuIdle Driver started" message on dmesg outputs. Probably it couldn't load "cpuidle-zynq" driver.

This is our device tree related to processors.

    compatible = "xlnx,zynq-7000";
    #address-cells = <1>;
    #size-cells = <1>;
    interrupt-parent = <&gic>;

    cpus {
        #address-cells = <1>;
        #cpus = <0x2>;
        #size-cells = <0>;
        ps7_cortexa9_0: cpu@0 {
            compatible = "arm,cortex-a9";
            d-cache-line-size = <0x20>;
            d-cache-size = <0x8000>;
            device_type = "cpu";
            i-cache-line-size = <0x20>;
            i-cache-size = <0x8000>;
                        operating-points = <666667 1000000 333334 1000000 222223 1000000>;
            reg = <0x0>;
        } ;
        ps7_cortexa9_1: cpu@1 {
            compatible = "arm,cortex-a9";
            d-cache-line-size = <0x20>;
            d-cache-size = <0x8000>;
            device_type = "cpu";
            i-cache-line-size = <0x20>;
            i-cache-size = <0x8000>;
            reg = <0x1>;
        };
    };

    pmu {
        compatible = "arm,cortex-a9-pmu";
        interrupts = <0 5 4>, <0 6 4>;
        interrupt-parent = <&gic>;
    };



There are two states on the /sys/devices/system/cpu/cpu0/cpuidle/ folder, they are called state0 and state1. Please look at following cat outputs. state1 time is probably idle mode. But state1 time is very low and never increases.

root@linaro-ubuntu-desktop:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/desc
ARM WFI
root@linaro-ubuntu-desktop:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/desc
WFI and RAM Self Refresh
root@linaro-ubuntu-desktop:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/time
8349327248
root@linaro-ubuntu-desktop:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/time
718

 

0 Kudos
1 Reply
Contributor
Contributor
2,163 Views
Registered: ‎09-18-2009

Re: Zynq Linux Power Management (Power States)

An update: We can see "Xilinx Zynq CpuIdle Driver started" message. I realized that I missed out it.

0 Kudos