Skip to content

Commit a2a730b

Browse files
committed
drivers: mcux_syscon: enable MICFIL clock control
Enable MICFIL clock control for NXP MCUX SoCs. Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent e1b8489 commit a2a730b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

drivers/clock_control/clock_control_mcux_syscon.c

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

179+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(micfil), okay)
180+
CLOCK_EnableClock(kCLOCK_Micfil);
181+
#endif
182+
179183
return 0;
180184
}
181185

@@ -611,6 +615,12 @@ static int mcux_lpc_syscon_clock_control_get_subsys_rate(const struct device *de
611615
*rate = CLOCK_GetLpspiClkFreq(1);
612616
break;
613617
#endif /* defined(CONFIG_SPI_NXP_LPSPI) */
618+
619+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(micfil), okay)
620+
case MCUX_MICFIL_CLK:
621+
*rate = CLOCK_GetMicfilClkFreq();
622+
break;
623+
#endif
614624
}
615625

616626
return 0;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright 2020-2025 NXP
23
* Copyright 2020-2025 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
@@ -134,4 +135,6 @@
134135
#define MCUX_OPAMP2_CLK MCUX_LPC_CLK_ID(0x18, 0x02)
135136
#define MCUX_OPAMP3_CLK MCUX_LPC_CLK_ID(0x18, 0x03)
136137

138+
#define MCUX_MICFIL_CLK MCUX_LPC_CLK_ID(0x18, 0x00)
139+
137140
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_ */

0 commit comments

Comments
 (0)