i.MX233: System freeze after enabling CLKSEQ_BYPASS_CPU

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

i.MX233: System freeze after enabling CLKSEQ_BYPASS_CPU

1,782 Views
lategoodbye
Senior Contributor I

Hi,

want to reduce cpu frequency of the i.MX23 (LQFP 128 pin) to 24 MHz for standby. Unfortunately the Linux system (Kernel 4.5) freeze after enabling CLKCTRL_CLKSEQ_BYPASS_CPU.

Here a register dump before modifing CLKCTRL_CLKSEQ_BYPASS_CPU:

HW_CLKCTRL_HBUS   = 0x00000003

HW_CLKCTRL_CPU    = 0x00011001

HW_CLKCTRL_CLKSEQ = 0x0000011A

HW_CLKCTRL_EMI    = 0x00000102

What could be the reason for this behavior?

Labels (2)
Tags (2)
0 Kudos
Reply
5 Replies

1,496 Views
lategoodbye
Senior Contributor I

I moved code for the clock switching in OCRAM, but it shows the same behavior.

Then i did the same in U-Boot which leads to Data abort R14 and a bootloop.

I also tried the Freescale Kernel 2.6.35 which also show no reaction to resume.

Btw here is the naming of the i.MX233:

MCIMX233CAG4C

A5 M88S

XAA1132A

0 Kudos
Reply

1,496 Views
Yuri
NXP Employee
NXP Employee

Hello,

  What Linux is used in the case ?

NXP recent release is

https://www.nxp.com/webapp/Download?colCode=L2.6.31_10.05.00_SDK_SOURCE&appType=license&location=nul...

Perhaps it makes sense to post this issue to meta-fsl-arm mailing list,
since there is no official NXP release for kernel 4.5

https://lists.yoctoproject.org/listinfo/meta-freescale

Have a great day,
Yuri

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

0 Kudos
Reply

1,496 Views
lategoodbye
Senior Contributor I

Hello Yuri,

it's the mainline kernel. I'm trying to port standby support to mainline.

I stuck on this line in my Linux 4.5 repo (which actually enabling CLKCTRL_CLKSEQ_BYPASS_CPU):

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

This is my code:

linux-mxs-power/pm.c at rebase-4.5 · lategoodbye/linux-mxs-power · GitHub

I think my issue is related to a wrong or missing register settings which causes the freeze, because i don't get any debug output after this call.

Are there any constraints before enabling CLKCTRL_CLKSEQ_BYPASS_CPU?

Edit:

Do the code to switch BYPASS_CPU must run from OCRAM?

Do i take care of HBUS or XBUS clock setting?

0 Kudos
Reply

1,496 Views
Yuri
NXP Employee
NXP Employee
0 Kudos
Reply

1,496 Views
lategoodbye
Senior Contributor I

Hi Yuri,

i added debug messages after each instruction. The issue appears before entering the suspend function in OCRAM, directly after:

if (clk_set_parent(cpu_clk, osc_clk) < 0) {

I will try to move this code into OCRAM.

0 Kudos
Reply