From 8b54e8afa9f7186121d8fea0440600f1a88ee4d3 Mon Sep 17 00:00:00 2001 From: Tom Burdick Date: Fri, 11 Apr 2025 11:56:39 -0500 Subject: [PATCH] boards: frdm-mcxn947: Enable flexcomm3 Flexcomm3 is used for the mikrobus header, enable the clock for it and setup a pinctrl group for i2c. Signed-off-by: Tom Burdick --- boards/nxp/frdm_mcxn947/board.c | 6 ++++++ boards/nxp/frdm_mcxn947/frdm_mcxn947-pinctrl.dtsi | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/boards/nxp/frdm_mcxn947/board.c b/boards/nxp/frdm_mcxn947/board.c index 708c0fc081e..c1384e6c183 100644 --- a/boards/nxp/frdm_mcxn947/board.c +++ b/boards/nxp/frdm_mcxn947/board.c @@ -159,6 +159,12 @@ void board_early_init_hook(void) CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM2); #endif +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm3)) + /* Configure input clock to be able to reach the datasheet specified SPI band rate. */ + CLOCK_SetClkDiv(kCLOCK_DivFlexcom3Clk, 1u); + CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM3); +#endif + #if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm4)) /* Configure input clock to be able to reach the datasheet specified SPI band rate. */ CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u); diff --git a/boards/nxp/frdm_mcxn947/frdm_mcxn947-pinctrl.dtsi b/boards/nxp/frdm_mcxn947/frdm_mcxn947-pinctrl.dtsi index 83b496c635d..b2597191d55 100644 --- a/boards/nxp/frdm_mcxn947/frdm_mcxn947-pinctrl.dtsi +++ b/boards/nxp/frdm_mcxn947/frdm_mcxn947-pinctrl.dtsi @@ -31,6 +31,18 @@ }; }; + pinmux_flexcomm3_lpi2c: pinmux_flexcomm3_lpi2c { + group0 { + pinmux = , + ; + slew-rate = "fast"; + drive-strength = "low"; + input-enable; + bias-pull-up; + drive-open-drain; + }; + }; + pinmux_flexcomm7_lpi2c: pimux_flexcomm7_lpi2c { group0 { pinmux = ,