Skip to content

Commit 7c0784d

Browse files
mjchen0mmahadevan108
authored andcommitted
mimxrt595_evk: add i3c
Add i3c to device tree and the clock init to soc.c Signed-off-by: Mike J. Chen <mjchen@google.com>
1 parent fdb631c commit 7c0784d

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

boards/arm/mimxrt595_evk/mimxrt595_evk_cm33-pinctrl.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,21 @@
220220
drive-strength = "normal";
221221
};
222222
};
223+
224+
pinmux_i3c: pinmux_i3c {
225+
group0 {
226+
pinmux = <I3C0_SCL_PIO2_29>,
227+
<I3C0_SDA_PIO2_30>;
228+
input-enable;
229+
slew-rate = "slow";
230+
drive-strength = "high";
231+
};
232+
233+
group1 {
234+
pinmux = <I3C0_PUR_PIO2_31>;
235+
slew-rate = "normal";
236+
drive-strength = "normal";
237+
};
238+
};
239+
223240
};

boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,3 +528,10 @@ zephyr_udc0: &usbhs {
528528
pinctrl-names = "default";
529529
status = "okay";
530530
};
531+
532+
&i3c0 {
533+
pinctrl-0 = <&pinmux_i3c>;
534+
pinctrl-names = "default";
535+
536+
status = "okay";
537+
};

dts/arm/nxp/nxp_rt5xx_common.dtsi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,19 @@
495495
clock-names = "dphy", "esc", "pixel";
496496
status = "disabled";
497497
};
498+
499+
i3c0: i3c@36000 {
500+
compatible = "nxp,mcux-i3c";
501+
reg = <0x36000 0x1000>;
502+
interrupts = <49 0>;
503+
clocks = <&clkctl1 MCUX_I3C_CLK>;
504+
clk-divider = <2>;
505+
clk-divider-slow = <1>;
506+
clk-divider-tc = <1>;
507+
status = "disabled";
508+
#address-cells = <3>;
509+
#size-cells = <0>;
510+
};
498511
};
499512

500513
&flexspi {

soc/arm/nxp_imx/rt5xx/soc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ static void clock_init(void)
302302
/* Switch FLEXCOMM4 to FRO_DIV4 */
303303
CLOCK_AttachClk(kFRO_DIV4_to_FLEXCOMM4);
304304
#endif
305+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(i3c0), nxp_mcux_i3c, okay)
306+
/* Attach main clock to I3C, divider will be set in i3c_mcux.c */
307+
CLOCK_AttachClk(kMAIN_CLK_to_I3C_CLK);
308+
CLOCK_AttachClk(kLPOSC_to_I3C_TC_CLK);
309+
#endif
305310
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(hs_spi1), nxp_lpc_spi, okay)
306311
CLOCK_AttachClk(kFRO_DIV4_to_FLEXCOMM16);
307312
#endif

0 commit comments

Comments
 (0)