Skip to content

Commit 84b8e92

Browse files
danieldegrassenashif
authored andcommitted
soc: nxp: imxrt: clock imxrt1042 SOC at 528 MHz
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>
1 parent 9668b35 commit 84b8e92

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

dts/arm/nxp/nxp_rt1040.dtsi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
};
1212

1313
&sysclk {
14-
clock-frequency = <500000000>;
14+
clock-frequency = <528000000>;
1515
};
1616

1717
&ccm {
@@ -20,10 +20,13 @@
2020
};
2121

2222
arm-podf {
23-
clock-div = <2>;
23+
clock-div = <1>;
2424
};
2525
};
2626

27+
&gpt2 {
28+
gptfreq = <33000000>;
29+
};
2730

2831
/ {
2932
soc {

soc/nxp/imxrt/imxrt10xx/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ config SOC_MIMXRT1042
7070
select CPU_HAS_FPU_DOUBLE_PRECISION
7171
select CPU_HAS_ARM_MPU
7272
select INIT_ARM_PLL
73+
select INIT_SYS_PLL
7374

7475
config SOC_MIMXRT1051
7576
select HAS_MCUX_ENET

soc/nxp/imxrt/imxrt10xx/soc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,13 @@ static ALWAYS_INLINE void clock_init(void)
186186
BUILD_ASSERT_PODF_IN_RANGE(ipg_podf, 1, 4);
187187
CLOCK_SetDiv(kCLOCK_IpgDiv, DT_PROP(DT_CHILD(CCM_NODE, ipg_podf), clock_div) - 1);
188188

189+
#ifdef CONFIG_SOC_MIMXRT1042
190+
/* Set PRE_PERIPH_CLK to SYS_PLL */
191+
CLOCK_SetMux(kCLOCK_PrePeriphMux, 0x0);
192+
#else
189193
/* Set PRE_PERIPH_CLK to PLL1, 1200M */
190194
CLOCK_SetMux(kCLOCK_PrePeriphMux, 0x3);
195+
#endif
191196

192197
/* Set PERIPH_CLK MUX to PRE_PERIPH_CLK */
193198
CLOCK_SetMux(kCLOCK_PeriphMux, 0x0);

0 commit comments

Comments
 (0)