File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,25 @@ void board_early_init_hook(void)
133
133
CLOCK_AttachClk (kFRO12M_to_LPSPI1 );
134
134
#endif
135
135
136
+ #if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lptmr0 ))
137
+
138
+ /*
139
+ * Clock Select Decides what input source the lptmr will clock from
140
+ *
141
+ * 0 <- Reserved
142
+ * 1 <- 16K FRO
143
+ * 2 <- Reserved
144
+ * 3 <- Combination of clocks configured in MRCC_LPTMR0_CLKSEL[MUX] field
145
+ */
146
+ #if DT_PROP (DT_NODELABEL (lptmr0 ), clk_source ) == 0x1
147
+ CLOCK_SetupFRO16KClocking (kCLKE_16K_SYSTEM | kCLKE_16K_COREMAIN );
148
+ #elif DT_PROP (DT_NODELABEL (lptmr0 ), clk_source ) == 0x3
149
+ CLOCK_SetClockDiv (kCLOCK_DivLPTMR0 , 1u );
150
+ CLOCK_AttachClk (kFRO12M_to_LPTMR0 );
151
+ #endif /* DT_PROP(DT_NODELABEL(lptmr0), clk_source) */
152
+
153
+ #endif
154
+
136
155
#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpuart0 ))
137
156
CLOCK_SetClockDiv (kCLOCK_DivLPUART0 , 1u );
138
157
CLOCK_AttachClk (kFRO12M_to_LPUART0 );
Original file line number Diff line number Diff line change 148
148
pinctrl-names = "default";
149
149
};
150
150
151
+ &lptmr0 {
152
+ status = "okay";
153
+ };
154
+
151
155
&lpuart0 {
152
156
status = "okay";
153
157
current-speed = <115200>;
You can’t perform that action at this time.
0 commit comments