Skip to content

Commit c52c9c7

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

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

drivers/clock_control/clock_control_mcux_syscon.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ static int mcux_lpc_syscon_clock_control_on(const struct device *dev,
136136
#endif /* CONFIG_SOC_FAMILY_MCXN */
137137
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(rtc), okay) */
138138

139+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pdm), okay)
140+
CLOCK_EnableClock(kCLOCK_Micfil);
141+
#endif
142+
139143
return 0;
140144
}
141145

@@ -571,6 +575,12 @@ static int mcux_lpc_syscon_clock_control_get_subsys_rate(const struct device *de
571575
*rate = CLOCK_GetLpspiClkFreq(1);
572576
break;
573577
#endif /* defined(CONFIG_SPI_NXP_LPSPI) */
578+
579+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pdm), okay)
580+
case MCUX_PDM_CLK:
581+
*rate = CLOCK_GetMicfilClkFreq();
582+
break;
583+
#endif
574584
}
575585

576586
return 0;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2024 NXP
2+
* Copyright 2020-2025 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -129,4 +129,6 @@
129129
#define MCUX_LPSPI0_CLK MCUX_LPC_CLK_ID(0x17, 0x00)
130130
#define MCUX_LPSPI1_CLK MCUX_LPC_CLK_ID(0x17, 0x01)
131131

132+
#define MCUX_PDM_CLK MCUX_LPC_CLK_ID(0x18, 0x00)
133+
132134
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_ */

0 commit comments

Comments
 (0)