Skip to content

Commit 4a32f35

Browse files
NeilChen93kartben
authored andcommitted
boards: nxp: frdm_mcxa153: Support i3c for NXP frdm_mcxa153 board
Support i3c for NXP frdm_mcxa153 board. Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
1 parent 960e015 commit 4a32f35

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

boards/nxp/frdm_mcxa153/board.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ void board_early_init_hook(void)
105105
CLOCK_EnableClock(kCLOCK_GateGPIO3);
106106
#endif
107107

108+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i3c0))
109+
/* Attach FRO_HF_DIV clock to I3C, 96MHz / 4 = 24MHz. */
110+
CLOCK_SetClockDiv(kCLOCK_DivI3C0_FCLK, 4U);
111+
CLOCK_AttachClk(kFRO_HF_DIV_to_I3C0FCLK);
112+
#endif
113+
108114
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpadc0))
109115
CLOCK_SetClockDiv(kCLOCK_DivADC0, 1u);
110116
CLOCK_AttachClk(kFRO12M_to_ADC0);

boards/nxp/frdm_mcxa153/frdm_mcxa153-pinctrl.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,23 @@
1616
};
1717
};
1818

19+
pinmux_i3c0: pinmux_i3c0 {
20+
group0 {
21+
pinmux = <I3C0_SDA_P0_16>,
22+
<I3C0_SCL_P0_17>;
23+
slew-rate = "fast";
24+
drive-strength = "low";
25+
input-enable;
26+
bias-pull-up;
27+
};
28+
group1 {
29+
pinmux = <I3C0_PUR_P1_11>;
30+
slew-rate = "fast";
31+
drive-strength = "low";
32+
input-enable;
33+
};
34+
};
35+
1936
pinmux_lpadc0: pinmux_lpadc0 {
2037
group0 {
2138
pinmux = <ADC0_A0_P2_0>,

boards/nxp/frdm_mcxa153/frdm_mcxa153.dts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <nxp/nxp_mcxa153.dtsi>
1010
#include "frdm_mcxa153-pinctrl.dtsi"
1111
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
#include <freq.h>
1213

1314
/ {
1415
model = "NXP FRDM_MCXA153 board";
@@ -21,6 +22,7 @@
2122
sw0 = &user_button_2;
2223
sw1 = &user_button_3;
2324
pwm-0 = &flexpwm0_pwm0;
25+
ambient-temp0 = &p3t1755;
2426
};
2527

2628
chosen {
@@ -124,6 +126,22 @@
124126
status = "okay";
125127
};
126128

129+
&i3c0 {
130+
status = "okay";
131+
pinctrl-0 = <&pinmux_i3c0>;
132+
pinctrl-names = "default";
133+
134+
i2c-scl-hz = <DT_FREQ_K(400)>;
135+
i3c-scl-hz = <DT_FREQ_M(4)>;
136+
i3c-od-scl-hz = <DT_FREQ_K(1500)>;
137+
138+
p3t1755: p3t1755@4800000236152a0090 {
139+
compatible = "nxp,p3t1755";
140+
reg = <0x48 0x0236 0x152a0090>;
141+
status = "okay";
142+
};
143+
};
144+
127145
&lpadc0 {
128146
status = "okay";
129147
pinctrl-0 = <&pinmux_lpadc0>;

boards/nxp/frdm_mcxa153/frdm_mcxa153.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ supported:
2020
- flash
2121
- gpio
2222
- i2c
23+
- i3c
2324
- pwm
2425
- spi
2526
- uart

0 commit comments

Comments
 (0)