boards: frdm_mcxn947: Add support for I2C
Add support for I2C Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
parent
cbbe33996e
commit
0a0b902b71
6 changed files with 35 additions and 0 deletions
|
@ -99,6 +99,11 @@ static int frdm_mcxn947_init(void)
|
||||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM1);
|
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm2), okay)
|
||||||
|
CLOCK_SetClkDiv(kCLOCK_DivFlexcom2Clk, 1u);
|
||||||
|
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm4), okay)
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm4), okay)
|
||||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u);
|
CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u);
|
||||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
|
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
|
||||||
|
|
|
@ -64,6 +64,8 @@ The FRDM-MCXN947 board configuration supports the following hardware features:
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| DMA | on-chip | dma |
|
| DMA | on-chip | dma |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| I2C | on-chip | i2c |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
| CLOCK | on-chip | clock_control |
|
| CLOCK | on-chip | clock_control |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| FLASH | on-chip | soc flash |
|
| FLASH | on-chip | soc flash |
|
||||||
|
|
|
@ -19,6 +19,18 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pinmux_flexcomm2_lpi2c: pinmux_flexcomm2_lpi2c {
|
||||||
|
group0 {
|
||||||
|
pinmux = <FC2_P0_PIO4_0>,
|
||||||
|
<FC2_P1_PIO4_1>;
|
||||||
|
slew-rate = "fast";
|
||||||
|
drive-strength = "low";
|
||||||
|
input-enable;
|
||||||
|
bias-pull-up;
|
||||||
|
drive-open-drain;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
pinmux_flexcomm4_lpuart: pinmux_flexcomm4_lpuart {
|
pinmux_flexcomm4_lpuart: pinmux_flexcomm4_lpuart {
|
||||||
group0 {
|
group0 {
|
||||||
pinmux = <FC4_P0_PIO1_8>,
|
pinmux = <FC4_P0_PIO1_8>,
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "frdm_mcxn947-pinctrl.dtsi"
|
#include "frdm_mcxn947-pinctrl.dtsi"
|
||||||
|
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
aliases{
|
aliases{
|
||||||
|
@ -54,6 +55,12 @@
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&flexcomm2_lpi2c2 {
|
||||||
|
pinctrl-0 = <&pinmux_flexcomm2_lpi2c>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||||
|
};
|
||||||
|
|
||||||
&flexcomm4_lpuart4 {
|
&flexcomm4_lpuart4 {
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
pinctrl-0 = <&pinmux_flexcomm4_lpuart>;
|
pinctrl-0 = <&pinmux_flexcomm4_lpuart>;
|
||||||
|
|
|
@ -77,6 +77,14 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&flexcomm2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&flexcomm2_lpi2c2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&flexcomm4 {
|
&flexcomm4 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,4 +19,5 @@ supported:
|
||||||
- gpio
|
- gpio
|
||||||
- spi
|
- spi
|
||||||
- dac
|
- dac
|
||||||
|
- i2c
|
||||||
vendor: nxp
|
vendor: nxp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue