Skip to content

Commit 222162d

Browse files
lucien-nxpnashif
authored andcommitted
drivers: clock_control: update clock_control/clock_control_mcux_ccm_rev2.c
Due to two lpuart instance use common clock root, update driver to support new feature for RT1180. Signed-off-by: Lucien Zhao <[email protected]>
1 parent 8782ab9 commit 222162d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

drivers/clock_control/clock_control_mcux_ccm_rev2.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,18 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
7575
#endif
7676

7777
#ifdef CONFIG_UART_MCUX_LPUART
78+
#if defined(CONFIG_SOC_SERIES_IMXRT118X)
79+
case IMX_CCM_LPUART0102_CLK:
80+
case IMX_CCM_LPUART0304_CLK:
81+
clock_root = kCLOCK_Root_Lpuart0102 + instance;
82+
break;
83+
#else
7884
case IMX_CCM_LPUART1_CLK:
7985
case IMX_CCM_LPUART2_CLK:
8086
clock_root = kCLOCK_Root_Lpuart1 + instance;
8187
break;
8288
#endif
89+
#endif
8390

8491
#if CONFIG_IMX_USDHC
8592
case IMX_CCM_USDHC1_CLK:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@
2323
/* LPUART */
2424
#define IMX_CCM_LPUART_CLK 0x300UL
2525
#define IMX_CCM_LPUART1_CLK 0x300UL
26+
#define IMX_CCM_LPUART0102_CLK 0x300UL
2627
#define IMX_CCM_LPUART2_CLK 0x301UL
28+
#define IMX_CCM_LPUART0304_CLK 0x301UL
2729
#define IMX_CCM_LPUART3_CLK 0x302UL
30+
#define IMX_CCM_LPUART0506_CLK 0x302UL
2831
#define IMX_CCM_LPUART4_CLK 0x303UL
32+
#define IMX_CCM_LPUART0708_CLK 0x303UL
2933
#define IMX_CCM_LPUART5_CLK 0x304UL
34+
#define IMX_CCM_LPUART0910_CLK 0x304UL
3035
#define IMX_CCM_LPUART6_CLK 0x305UL
36+
#define IMX_CCM_LPUART1112_CLK 0x305UL
3137
#define IMX_CCM_LPUART7_CLK 0x306UL
3238
#define IMX_CCM_LPUART8_CLK 0x307UL
3339
#define IMX_CCM_LPUART9_CLK 0x308UL

0 commit comments

Comments
 (0)