Skip to content

Commit 05b1279

Browse files
drivers: clock_control_mcux_ccm_rev2: add SAR_ADC clock support
Added SAR_ADC clock support for clock_control_mcux_ccm_rev2 Signed-off-by: Qiang Zhao <[email protected]>
1 parent 822838a commit 05b1279

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/clock_control/clock_control_mcux_ccm_rev2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
281281
break;
282282
#endif
283283

284+
#ifdef CONFIG_ADC_MCUX_SAR_ADC
285+
case IMX_CCM_SAR_ADC1_CLK:
286+
clock_root = kCLOCK_Root_Adc + instance;
287+
break;
288+
#endif
289+
284290
#if defined(CONFIG_ETH_NXP_IMX_NETC)
285291
case IMX_CCM_NETC_CLK:
286292
clock_root = kCLOCK_Root_Netc;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021,2024 NXP
2+
* Copyright 2021,2024-2025 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -121,6 +121,7 @@
121121
/* ADC */
122122
#define IMX_CCM_LPADC1_CLK 0x1500UL
123123
#define IMX_CCM_LPADC2_CLK 0x1501UL
124+
#define IMX_CCM_SAR_ADC1_CLK 0x1500UL
124125

125126
/* TPM */
126127
#define IMX_CCM_TPM_CLK 0x1600UL

0 commit comments

Comments
 (0)