Low energy with imx53

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Low energy with imx53

1,873 次查看
enaud
Contributor III

Hi,

I dont want use echo mem > /sys/power/state because i cant wakeup system after with a GPIO and how reduce the consumption via software with for example  (reduce the frequency of the CPU and  shutdown the various peripherals)?

how modified mx53_loco.c for to obtaine reduced consumption and which register i must modified? there is an example?

For example I'm trying to turn off all clock with CCM_CCGR register, but i dont know how to do..

I've inserted this code in my mx53_loco.c:

_clk_disable(&pll1_sw_clk) but i have same error...

thanks..

0 项奖励
11 回复数

1,386 次查看
enaud
Contributor III

do you have QQ?

0 项奖励

1,386 次查看
lily_zhang
NXP Employee
NXP Employee

Recommend that you have posted the questions into imxcommunity. So you can get more supports from the whole world.

Regarding the brightness control code, you can use:

fopen – Open backlight sys file

fread – get backlight

fprintf – write new backlight file

fclose

0 项奖励

1,386 次查看
lily_zhang
NXP Employee
NXP Employee

You mean you hope to reduce MX53 power in idle/normal case?

If you want to switch CPU, you can use enable DVFS to do CPU frequency switch with voltage change:

To Enable the DVFS core use this command:

echo 1 > /sys/devices/platform/mxc_dvfs_core.0/enable

To Disable The DVFS core use this command:

echo 0 > /sys/devices/platform/mxc_dvfs_core.0/enable

As you mentioned, you can close the clocks which are not used in our cases.

You can also disable the modules which are not used or put them into low memory modes according to spec.

0 项奖励

1,386 次查看
enaud
Contributor III

ok thanks,

but how close the clocks which are not used?

you can write a little example?

0 项奖励

1,386 次查看
lily_zhang
NXP Employee
NXP Employee

You can call function “clk_disable”.

Please note you should ensure clk_enable and clk_disable keep pair.

Meanwhile, you can also use memtool to dump CCM register bits for CG bit. And ensure the required clocks are closed really for debug purpose.

0 项奖励

1,386 次查看
enaud
Contributor III

ok and how disable also pwm?

in stanby state i note that pwm of my backlight is max value (0) i want that it's 255.

I've view in pwm_bl.c this function:

#ifdef CONFIG_PM

static int pwm_backlight_suspend(struct platform_device *pdev,pm_message_t state);

Now how use it in pm.c?

pwm_backlight_suspend(struct platform_device *pdev,pm_message_t state);

What i must put at "struct platform_device *pdev" and pm_message_t state?

i want disable pwm.0 and in mx53_loco.c I have this:

static struct platform_pwm_backlight_data mxc_pwm_backlight_data= {

  .pwm_id = 1,

  .max_brightness = 255,

  .dft_brightness = 128,

  .pwm_period_ns = 50000,

};

0 项奖励

1,386 次查看
lily_zhang
NXP Employee
NXP Employee

For pwm backlight, you can control from user space through sys.

Suspend:

echo 0 > /sys/class/backlight/pwm-backlight.0/brightness

Then restore to original value after resume.

To disable PWM0, please remove PWM Pin configuration firstly. Then remove relative driver register into the board files.

0 项奖励

1,386 次查看
enaud
Contributor III

yes i know this:

but at start:

cat /sys/class/backlight/pwm-backlight.0/brightness

128


after

echo mem > /sys/power/state

i view that brigthness is max (seems that standby do echo 255 > /sys/class/backlight/pwm-backlight.0/brightness).

0 项奖励

1,386 次查看
lily_zhang
NXP Employee
NXP Employee

One common way is:

1.    Get current backlight in user space.

2.    Then set as new value for suspend.

3.    Suspend.

4.    Resume

5.    Restore to early stored value.

You can add the logs in pwm_bl.c to debug the issue you observed. And see whether brightness is changed or not.

0 项奖励

1,386 次查看
enaud
Contributor III

cat /sys/class/backlight/pwm-backlight.0/brightness

128


Then set as new value for suspend.   <--how?


echo mem > /sys/power/state <-- i view backlight at max


resume:

cat /sys/class/backlight/pwm-backlight.0/brightness

128



i think that in pm.c i must call pwm_backlight_suspend(struct platform_device *pdev,pm_message_t state); but how?


you can write an example for me thanks?


0 项奖励

1,386 次查看
enaud
Contributor III

nothing?

0 项奖励