Skip to content

Commit 1056269

Browse files
committed
drivers: clock_control_mcux_syscon: add HSCMP clock support
add HSCMP clock support. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1 parent b7948b9 commit 1056269

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

drivers/clock_control/clock_control_mcux_syscon.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,24 @@ static int mcux_lpc_syscon_clock_control_on(const struct device *dev,
176176
}
177177
#endif
178178

179+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(hscmp0))
180+
if ((uint32_t)sub_system == MCUX_HSCMP0_CLK) {
181+
CLOCK_EnableClock(kCLOCK_Hscmp0);
182+
}
183+
#endif
184+
185+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(hscmp1))
186+
if ((uint32_t)sub_system == MCUX_HSCMP1_CLK) {
187+
CLOCK_EnableClock(kCLOCK_Hscmp1);
188+
}
189+
#endif
190+
191+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(hscmp2))
192+
if ((uint32_t)sub_system == MCUX_HSCMP2_CLK) {
193+
CLOCK_EnableClock(kCLOCK_Hscmp2);
194+
}
195+
#endif
196+
179197
#ifdef CONFIG_SOC_FAMILY_MCXN
180198
#if DT_NODE_HAS_STATUS(DT_NODELABEL(trng), okay)
181199
if ((uint32_t)sub_system == MCUX_ELS_CLK) {

include/zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,8 @@
140140

141141
#define MCUX_MICFIL_CLK MCUX_LPC_CLK_ID(0x20, 0x00)
142142

143+
#define MCUX_HSCMP0_CLK MCUX_LPC_CLK_ID(0x21, 0x00)
144+
#define MCUX_HSCMP1_CLK MCUX_LPC_CLK_ID(0x21, 0x01)
145+
#define MCUX_HSCMP2_CLK MCUX_LPC_CLK_ID(0x21, 0x02)
146+
143147
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_ */

0 commit comments

Comments
 (0)