Skip to content

Commit 4930d62

Browse files
boards: nxp: lpcxpresso55s69: add support for clock management on CPU0
Add support for clock management on CPU0. This requires adding clock setup for the CPU0 core clock to run at 144MHz from PLL1, and adding clock setup for the flexcomm0 uart node to use the FROHF clock input. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
1 parent e6085fe commit 4930d62

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

boards/nxp/lpcxpresso55s69/lpcxpresso55s69_lpc55s69_cpu0.dts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "lpcxpresso55s69.dtsi"
1111
#include <zephyr/dt-bindings/pwm/pwm.h>
1212
#include <zephyr/dt-bindings/input/input-event-codes.h>
13+
#include <freq.h>
1314

1415
/ {
1516
model = "NXP LPCXpresso55S69 board";
@@ -109,6 +110,50 @@
109110

110111
&flexcomm0 {
111112
status = "okay";
113+
clock-state-0 = <&fxcom0_96mhz>;
114+
clock-state-names = "default";
115+
};
116+
117+
&cpu0 {
118+
clock-state-0 = <&sys_clk_144mhz>;
119+
clock-state-names = "default";
120+
};
121+
122+
&fxcom0_clock {
123+
/* 96 MHz setpoint for Flexcomm0 clock using FROHF */
124+
fxcom0_96mhz: fxcom0_96mhz {
125+
compatible = "clock-state";
126+
clocks = <&fcclksel0 3 &frohfdiv 1>;
127+
clock-frequency = <DT_FREQ_M(96)>;
128+
};
129+
};
130+
131+
&system_clock {
132+
/* 144 MHz setpoint for CPU core clock */
133+
sys_clk_144mhz: sys_clk_144mhz {
134+
compatible = "clock-state";
135+
clocks = <&ahbclkdiv 1 &fro_12m 1 &mainclkselb 0 &mainclksela 0
136+
&xtal32m 1 &clk_in_en 1 &pll1clksel 1
137+
&pll1_pdec 2 &pll1 288000000 8 144 0 53 31
138+
&pll1_directo 0 &pll1_bypass 0
139+
&mainclkselb 2>;
140+
clock-frequency = <DT_FREQ_M(144)>;
141+
locking-state;
142+
};
143+
};
144+
145+
&fxcom2_clock {
146+
/* 96 MHz setpoint for Flexcomm2 clock using FROHF */
147+
fxcom2_96mhz: fxcom2_96mhz {
148+
compatible = "clock-state";
149+
clocks = <&fcclksel2 3 &frohfdiv 1>;
150+
clock-frequency = <DT_FREQ_M(96)>;
151+
};
152+
};
153+
154+
&flexcomm2 {
155+
clock-state-0 = <&fxcom2_96mhz>;
156+
clock-state-names = "default";
112157
};
113158

114159
&flexcomm4 {

boards/nxp/lpcxpresso55s69/lpcxpresso55s69_lpc55s69_cpu0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ supported:
1919
- arduino_i2c
2020
- arduino_serial
2121
- arduino_spi
22+
- clock_management
2223
- counter
2324
- flash
2425
- gpio

boards/nxp/lpcxpresso55s69/lpcxpresso55s69_lpc55s69_cpu0_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ CONFIG_HW_STACK_PROTECTION=y
1818
# Enable TrustZone-M
1919
CONFIG_TRUSTED_EXECUTION_SECURE=y
2020
CONFIG_ARM_TRUSTZONE_M=y
21+
22+
# Enable clock management
23+
CONFIG_CLOCK_MANAGEMENT=y

0 commit comments

Comments
 (0)