DDR bus frequency toggling 24MHz - 400MHz

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

DDR bus frequency toggling 24MHz - 400MHz

2,766 Views
samuelrythm
Contributor I

Hi all,

I am facing unexpected behaviour on bus freq driver. Indeed, while processing, DDR bus frequency is at 400MHz but every 5 seconds, it goes down to 24 MHz for few milliseconds and then back to 400MHz. It does not make any sense cause the processing is very systematic and continuous, there is no bus charge variation. The fact is that during these little time slots, we are missing samples on our SPI front end.

Does this behaviour show a misfunction of the Bus freq driver? 

I know it is possible to disable this driver to keep the frequency at 400MHz but can we manage manually?

Below are some kernel trace. It has been reproduce on both versions 3.14 and 4.1 NXP BSP.

Thank you for your help

2016-12-08T01:00:33.669+0000 kernel: Bus freq set to 400000000 start...
2016-12-08T01:00:33.669+0000 kernel: Bus freq set to 400000000 done...
2016-12-08T01:00:38.657+0000 kernel: Bus freq set to 24000000 start...
2016-12-08T01:00:38.678+0000 kernel: Bus freq set to 24000000 done...
2016-12-08T01:00:38.679+0000 kernel: Bus freq set to 400000000 start...
2016-12-08T01:00:38.679+0000 kernel: Bus freq set to 400000000 done...
2016-12-08T01:00:43.658+0000 kernel: Bus freq set to 24000000 start...
2016-12-08T01:00:43.677+0000 kernel: Bus freq set to 24000000 done...
2016-12-08T01:00:43.682+0000 kernel: Bus freq set to 400000000 start...
2016-12-08T01:00:43.683+0000 kernel: Bus freq set to 400000000 done...
2016-12-08T01:00:48.659+0000 kernel: Bus freq set to 24000000 start...
2016-12-08T01:00:48.688+0000 kernel: Bus freq set to 24000000 done...
2016-12-08T01:00:48.688+0000 kernel: Bus freq set to 400000000 start...
2016-12-08T01:00:48.688+0000 kernel: Bus freq set to 400000000 done...
Additional trace
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
Workqueue: events reduce_bus_freq_handler
[<800144a8>] (unwind_backtrace) from [<800121b0>] (show_stack+0x10/0x14)
[<800121b0>] (show_stack) from [<80026700>] (update_lpddr2_freq+0x44/0xf4)
[<80026700>] (update_lpddr2_freq) from [<8002744c>] (reduce_bus_freq+0x994/0x1020)
[<8002744c>] (reduce_bus_freq) from [<80027af0>] (reduce_bus_freq_handler+0x18/0x24)
[<80027af0>] (reduce_bus_freq_handler) from [<80045190>] (process_one_work+0x118/0x358)
[<80045190>] (process_one_work) from [<8004552c>] (worker_thread+0x15c/0x500)
[<8004552c>] (worker_thread) from [<8004a0a8>] (kthread+0xd4/0xec)
[<8004a0a8>] (kthread) from [<8000f308>] (ret_from_fork+0x14/0x2c)
TUTU update_lpddr2_freq
Bus freq set to 24000000 start...
Bus freq set to 24000000 done...
TUTU update_lpddr2_freq
CPU: 0 PID: 20 Comm: cfinteractive Not tainted 4.1.15 #6
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[<800144a8>] (unwind_backtrace) from [<800121b0>] (show_stack+0x10/0x14)
[<800121b0>] (show_stack) from [<80026700>] (update_lpddr2_freq+0x44/0xf4)
[<80026700>] (update_lpddr2_freq) from [<80028b38>] (set_high_bus_freq+0x61c/0xa88)
[<80028b38>] (set_high_bus_freq) from [<80029388>] (request_bus_freq+0x100/0x144)
[<80029388>] (request_bus_freq) from [<804326a4>] (imx6q_set_target+0x1b4/0x510)
[<804326a4>] (imx6q_set_target) from [<8042d05c>] (__cpufreq_driver_target+0x158/0x294)
[<8042d05c>] (__cpufreq_driver_target) from [<804310e0>] (cpufreq_interactive_speedchange_task+0xf8/0x13c)
[<804310e0>] (cpufreq_interactive_speedchange_task) from [<8004a0a8>] (kthread+0xd4/0xec)
[<8004a0a8>] (kthread) from [<8000f308>] (ret_from_fork+0x14/0x2c)
TUTU update_lpddr2_freq
Bus freq set to 400000000 start...
Bus freq set to 400000000 done...
TUTU update_lpddr2_freq
CPU: 0 PID: 183 Comm: kworker/0:2 Not tainted 4.1.15 #6
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
Workqueue: events reduce_bus_freq_handler
Labels (2)
0 Kudos
2 Replies

1,414 Views
igorpadykov
NXP Employee
NXP Employee

Hi Samuel

 Behaviour Bus freq driver can be tested with i.MX6UL EVK reference

board using DDR3 and L4.1.15_1.0.0. nxp official release

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/?h=imx_4.1.15_1.0.0_ga

Documentation

http://www.nxp.com/webapp/Download?colCode=L4.1.15_1.0.0_LINUX_DOCS&Parent_nodeId=133769948107170617... 

i.MX6UL EVK dts file

linux-2.6-imx.git - Freescale i.MX Linux Tree 

Please note there is no lpddr2 i.MX6UL reference board and L3.14.28 kernel does not support i.MX6UL.

Bus freq driver can be disabled using procedure decribed in attached Linux Manual

Chapter 24 Dynamic Bus Frequency Driver, also please check useful commands in

AN4509 i.MX 6Dual/6Quad Power Consumption Measurement sect.5.7.4 Steps

https://cache.freescale.com/files/32bit/doc/app_note/AN4509.pdf 

For lpddr2 i.MX6UL design one can check imx6ul-14x14-lpddr2-arm2.dts validation board

linux-2.6-imx.git - Freescale i.MX Linux Tree 

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

1,414 Views
samuelrythm
Contributor I

Igor,

Thank you for your reply.

I understand that the frequency cannot be set manually. Either we let the driver auto-adjust the frequency (wrongly in our case) or we disable it, inducing full frequency and thus full consumption at anytime. No solution in between...

0 Kudos