-
Notifications
You must be signed in to change notification settings - Fork 7.7k
soc: nxp: imxrt10xx: support configuration of SYSPLL using devicetree #72168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
soc: nxp: imxrt10xx: support configuration of SYSPLL using devicetree #72168
Conversation
Allow configuration of the system pll on the iMXRT10xx series parts, via a fractional pll node under the CCM module. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
@matt-wood-ct, I have tested this PR by checking the frequency of a pin toggled every 25ms (using |
Great work, I will give this a go when I'm back in the office tomorrow, thanks for your work on this your solution looks pretty elegant. |
Hi Daniel,
After 4 minutes it was 25 seconds out, imx reported 3m35s. But perhaps more concerningly I get these errors out on boot:
My out of tree board file does not configure systick or the gpt at all beyond the obligatory:
|
iMXRT1042 SOC should be clocked at 528 MHz maximum. Correct the clock setup to use the system PLL. Fixes zephyrproject-rtos#70755 Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
9edb73d
to
b9a7948
Compare
Just a note here- the
This looks like the peripheral clock is being reported at 66MHz, which is expected here given that the core clock has dropped from 600MHz to 528MHz. I'd recommend setting the
This is more concerning. What values are set in your application for the following registers?
Based on the log you sent, it does seem like the PERCLK_CLK_ROOT is being set correctly (so the AHB_CLK_ROOT probably is too). Maybe check the value of In particular, make sure that I tried a similar test to yours with a stopwatch over one minute, and checked uptime at 30 seconds and 60 seconds:
|
Apologies for the delay, thanks for the additional fixes, I have rerun the test using your new version. I've attached the debugger and captured the registers you mentioned, values below. CCM->CBCMR = 0xFDA29114 Full CCM register dump:
|
So to summarise, it is all working for me, many thanks again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding is that this is all platform specific boot time configuration which is fine in DT also worth noting that I expect this is a temporary solution to add more flexibility since Daniel's clock management RFC would probably change all this again |
Hi @decsny could you point me to this clock management RFC? I was going to introduce a PR which modifies the ARM PLL divider based on devicetree for those who wish to do so, but just wanted to make sure there's no work already in progress |
Support configuration of SYSPLL (a fractional-n PLL) on iMXRT parts using devicetree.
This PR also sets up the iMXRT1040 SOC to clock from the SYSPLL, running at 528MHz (the maximum supported frequency for the part)
Fixes #70755