Skip to content

Commit df95a86

Browse files
Declan Snyderhenrikbrixandersen
authored andcommitted
soc: nxp: mcxw71: Add FlexCAN node/clocking
Add node and enable clock for the FlexCAN module on MCXW71. Signed-off-by: Declan Snyder <[email protected]>
1 parent a3d2b86 commit df95a86

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

dts/arm/nxp/nxp_mcxw71.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,16 @@
307307
interrupts = <48 2>;
308308
interrupt-names = "hci_int";
309309
};
310+
311+
flexcan0: can@3b000 {
312+
compatible = "nxp,flexcan";
313+
reg = <0x3b000 0x3080>;
314+
interrupts = <47 0>;
315+
interrupt-names = "common";
316+
clocks = <&scg SCG_K4_FIRC_CLK 0xec>;
317+
clk-source = <2>;
318+
status = "disabled";
319+
};
310320
};
311321

312322
&fast_peripheral0 {

soc/nxp/mcx/mcxw/soc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ static ALWAYS_INLINE void clock_init(void)
154154
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(lpspi1), nxp_imx_lpspi, okay)) {
155155
CLOCK_EnableClock(kCLOCK_Lpspi1);
156156
}
157+
158+
if (IS_ENABLED(CONFIG_CAN_MCUX_FLEXCAN)) {
159+
CLOCK_EnableClock(kCLOCK_Can0);
160+
}
157161
}
158162

159163
static void vbat_init(void)

0 commit comments

Comments
 (0)