Skip to content

Commit

Permalink
boards: nxp: frdm_mcxn236: Support i3c for NXP frdm_mcxn236 board
Browse files Browse the repository at this point in the history
Support i3c for NXP frdm_mcxn236 board.

Signed-off-by: Neil Chen <[email protected]>
  • Loading branch information
NeilChen93 authored and kartben committed Jan 7, 2025
1 parent 50f128d commit f861b4f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boards/nxp/frdm_mcxn236/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ static int frdm_mcxn236_init(void)

#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lptmr0)) */

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i3c1))
CLOCK_SetClkDiv(kCLOCK_DivI3c1FClk, DT_PROP(DT_NODELABEL(i3c1), clk_divider));
/* Attach PLL0 clock to I3C, 150MHz / 6 = 25MHz. */
CLOCK_AttachClk(kPLL0_to_I3C1FCLK);
#endif

/* Set SystemCoreClock variable. */
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;

Expand Down
2 changes: 2 additions & 0 deletions boards/nxp/frdm_mcxn236/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The FRDM-MCXN236 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| I3C | on-chip | i3c |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | soc flash |
Expand Down
17 changes: 17 additions & 0 deletions boards/nxp/frdm_mcxn236/frdm_mcxn236-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,23 @@
};
};

pinmux_i3c1: pinmux_i3c1 {
group0 {
pinmux = <I3C1_SDA_PIO1_16>,
<I3C1_SCL_PIO1_17>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
bias-pull-up;
};
group1 {
pinmux = <I3C1_PUR_PIO1_15>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
};
};

pinmux_flexio_lcd: pinmux_flexio_lcd {
group0 {
pinmux = <FLEXIO0_D4_PIO0_20>,
Expand Down
4 changes: 4 additions & 0 deletions boards/nxp/frdm_mcxn236/frdm_mcxn236.dts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ zephyr_udc0: &usb1 {
status = "okay";
};

&i3c1 {
status = "okay";
};

&flexio0 {
status = "okay";
};
Expand Down
8 changes: 8 additions & 0 deletions boards/nxp/frdm_mcxn236/frdm_mcxn236.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,11 @@ zephyr_mipi_dbi_parallel: &flexio0_lcd {
pinctrl-0 = <&pinmux_flexio_lcd>;
pinctrl-names = "default";
};

&i3c1 {
pinctrl-0 = <&pinmux_i3c1>;
pinctrl-names = "default";
};

p3t1755dp_ard_i3c_interface: &i3c1 {};
p3t1755dp_ard_i2c_interface: &flexcomm5_lpi2c5 {};
1 change: 1 addition & 0 deletions boards/nxp/frdm_mcxn236/frdm_mcxn236.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ supported:
- flash
- gpio
- i2c
- i3c
- pwm
- regulator
- spi
Expand Down

0 comments on commit f861b4f

Please sign in to comment.