Skip to content

Commit

Permalink
drivers: clock_control: add i3c clock for clock_control_mcux_ccm_rev2.c
Browse files Browse the repository at this point in the history
add i3c case to get i3c instance clock

Signed-off-by: Lucien Zhao <[email protected]>
  • Loading branch information
lucien-nxp committed Nov 26, 2024
1 parent a7f982b commit 948cef8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/clock_control/clock_control_mcux_ccm_rev2.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
#endif
#endif

#ifdef CONFIG_I3C_MCUX
case IMX_CCM_I3C1_CLK:
case IMX_CCM_I3C2_CLK:
clock_root = kCLOCK_Root_I3c1 + instance;
break;
#endif

#ifdef CONFIG_SPI_MCUX_LPSPI
case IMX_CCM_LPSPI1_CLK:
clock_root = kCLOCK_Root_Lpspi1 + instance;
Expand Down
5 changes: 5 additions & 0 deletions include/zephyr/dt-bindings/clock/imx_ccm_rev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@
#define IMX_CCM_MIPI_CSI2RX_UI_CLK 0x2000UL
#define IMX_CCM_MIPI_CSI2RX_ESC_CLK 0x2100UL

/* I3C */
#define IMX_CCM_I3C_CLK 0x2200UL
#define IMX_CCM_I3C1_CLK 0x2200UL
#define IMX_CCM_I3C2_CLK 0x2201UL

/* QTMR */
#define IMX_CCM_QTMR_CLK 0x6000UL
#define IMX_CCM_QTMR1_CLK 0x6000UL
Expand Down

0 comments on commit 948cef8

Please sign in to comment.