File tree Expand file tree Collapse file tree 2 files changed +33
-6
lines changed Expand file tree Collapse file tree 2 files changed +33
-6
lines changed Original file line number Diff line number Diff line change 181181 reg = <0x2b000 0x400>;
182182 interrupts = <74 0>;
183183 };
184+
185+ tpm0: pwm@31000 {
186+ compatible = "nxp,kinetis-tpm";
187+ reg = <0x31000 0x100>;
188+ interrupts = <37 0>;
189+ clocks = <&scg SCG_K4_FIRC_CLK 0xc4>;
190+ status = "disabled";
191+ #pwm-cells = <3>;
192+ };
193+
194+ tpm1: pwm@32000 {
195+ compatible = "nxp,kinetis-tpm";
196+ reg = <0x32000 0x100>;
197+ interrupts = <38 0>;
198+ clocks = <&scg SCG_K4_FIRC_CLK 0xc8>;
199+ status = "disabled";
200+ #pwm-cells = <3>;
201+ };
184202};
185203
186204&fast_peripheral0 {
Original file line number Diff line number Diff line change @@ -121,12 +121,21 @@ static ALWAYS_INLINE void clock_init(void)
121121 CLOCK_SetIpSrcDiv (kCLOCK_Lpi2c1 , kSCG_SysClkDivBy16 );
122122
123123 /* Ungate clocks if the peripheral is enabled in devicetree */
124- #if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (lpuart0 ), nxp_lpc_lpuart , okay ))
125- CLOCK_EnableClock (kCLOCK_Lpuart0 );
126- #endif
127- #if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (lpuart1 ), nxp_lpc_lpuart , okay ))
128- CLOCK_EnableClock (kCLOCK_Lpuart1 );
129- #endif
124+ if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (lpuart0 ), nxp_lpc_lpuart , okay )) {
125+ CLOCK_EnableClock (kCLOCK_Lpuart0 );
126+ }
127+
128+ if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (lpuart1 ), nxp_lpc_lpuart , okay )) {
129+ CLOCK_EnableClock (kCLOCK_Lpuart1 );
130+ }
131+
132+ if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (tpm0 ), nxp_kinetis_tpm , okay )) {
133+ CLOCK_EnableClock (kCLOCK_Tpm0 );
134+ }
135+
136+ if (DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (tpm1 ), nxp_kinetis_tpm , okay )) {
137+ CLOCK_EnableClock (kCLOCK_Tpm1 );
138+ }
130139}
131140
132141static void vbat_init (void )
You can’t perform that action at this time.
0 commit comments