dts: arm: nxp: rt118x: add lptmr instances
Config/Enable lptmr1/2/3 clock Add 3 lptmr instances for RT118X Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
This commit is contained in:
parent
dacc462bbd
commit
e5ee95893c
2 changed files with 58 additions and 0 deletions
|
@ -630,6 +630,39 @@
|
||||||
clk-source = <0>;
|
clk-source = <0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lptmr1: lptmr@4300000 {
|
||||||
|
compatible = "nxp,lptmr";
|
||||||
|
reg = <0x4300000 0x1000>;
|
||||||
|
interrupts = <18 0>;
|
||||||
|
clock-frequency = <80000000>;
|
||||||
|
prescaler = <1>;
|
||||||
|
clk-source = <0>;
|
||||||
|
resolution = <32>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
lptmr2: lptmr@24d0000 {
|
||||||
|
compatible = "nxp,lptmr";
|
||||||
|
reg = <0x24d0000 0x1000>;
|
||||||
|
interrupts = <67 0>;
|
||||||
|
clock-frequency = <80000000>;
|
||||||
|
prescaler = <1>;
|
||||||
|
clk-source = <0>;
|
||||||
|
resolution = <32>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
lptmr3: lptmr@2cd0000 {
|
||||||
|
compatible = "nxp,lptmr";
|
||||||
|
reg = <0x2cd0000 0x1000>;
|
||||||
|
interrupts = <150 0>;
|
||||||
|
clock-frequency = <80000000>;
|
||||||
|
prescaler = <1>;
|
||||||
|
clk-source = <0>;
|
||||||
|
resolution = <32>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&flexspi1 {
|
&flexspi1 {
|
||||||
|
|
|
@ -366,6 +366,31 @@ static ALWAYS_INLINE void clock_init(void)
|
||||||
|
|
||||||
#endif /* CONFIG_CAN_MCUX_FLEXCAN */
|
#endif /* CONFIG_CAN_MCUX_FLEXCAN */
|
||||||
|
|
||||||
|
#if defined(CONFIG_MCUX_LPTMR_TIMER) || defined(CONFIG_COUNTER_MCUX_LPTMR)
|
||||||
|
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr1), okay)
|
||||||
|
/* Configure LPTIMER1 using SYS_PLL3_DIV2_CLK */
|
||||||
|
rootCfg.mux = kCLOCK_LPTIMER1_ClockRoot_MuxSysPll3Div2;
|
||||||
|
rootCfg.div = 3;
|
||||||
|
CLOCK_SetRootClock(kCLOCK_Root_Lptimer1, &rootCfg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr2), okay)
|
||||||
|
/* Configure LPTIMER2 using SYS_PLL3_DIV2_CLK */
|
||||||
|
rootCfg.mux = kCLOCK_LPTIMER2_ClockRoot_MuxSysPll3Div2;
|
||||||
|
rootCfg.div = 3;
|
||||||
|
CLOCK_SetRootClock(kCLOCK_Root_Lptimer2, &rootCfg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr3), okay)
|
||||||
|
/* Configure LPTIMER3 using SYS_PLL3_DIV2_CLK */
|
||||||
|
rootCfg.mux = kCLOCK_LPTIMER3_ClockRoot_MuxSysPll3Div2;
|
||||||
|
rootCfg.div = 3;
|
||||||
|
CLOCK_SetRootClock(kCLOCK_Root_Lptimer3, &rootCfg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* CONFIG_MCUX_LPTMR_TIMER || CONFIG_COUNTER_MCUX_LPTMR */
|
||||||
|
|
||||||
/* Keep core clock ungated during WFI */
|
/* Keep core clock ungated during WFI */
|
||||||
CCM->LPCG[1].LPM0 = 0x33333333;
|
CCM->LPCG[1].LPM0 = 0x33333333;
|
||||||
CCM->LPCG[1].LPM1 = 0x33333333;
|
CCM->LPCG[1].LPM1 = 0x33333333;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue