Skip to content

Commit 172a71c

Browse files
committed
boards: nxp: frdm_mcxa344: Support lpspi for NXP frdm_mcxa344 board
Support lpspi for NXP frdm_mcxa344 board. Signed-off-by: Neil Chen <[email protected]>
1 parent 30ac76f commit 172a71c

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

boards/nxp/frdm_mcxa344/board.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ void board_early_init_hook(void)
129129
CLOCK_AttachClk(kFRO_LF_DIV_to_LPI2C1);
130130
#endif
131131

132+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi0))
133+
CLOCK_SetClockDiv(kCLOCK_DivLPSPI0, 1u);
134+
CLOCK_AttachClk(kFRO_LF_DIV_to_LPSPI0);
135+
#endif
136+
137+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi1))
138+
CLOCK_SetClockDiv(kCLOCK_DivLPSPI1, 1u);
139+
CLOCK_AttachClk(kFRO_LF_DIV_to_LPSPI1);
140+
#endif
141+
132142
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0))
133143
CLOCK_SetClockDiv(kCLOCK_DivLPUART0, 1u);
134144
CLOCK_AttachClk(kFRO_LF_DIV_to_LPUART0);

boards/nxp/frdm_mcxa344/frdm_mcxa344-pinctrl.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
};
3131
};
3232

33+
pinmux_lpspi0: pinmux_lpspi0 {
34+
group0 {
35+
pinmux = <LPSPI0_SDO_P1_0>,
36+
<LPSPI0_SCK_P1_1>,
37+
<LPSPI0_SDI_P1_2>,
38+
<LPSPI0_PCS0_P1_3>;
39+
slew-rate = "fast";
40+
drive-strength = "low";
41+
input-enable;
42+
};
43+
};
44+
3345
pinmux_lpuart2: pinmux_lpuart2 {
3446
group0 {
3547
pinmux = <LPUART2_RXD_P2_3>,

boards/nxp/frdm_mcxa344/frdm_mcxa344.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@
166166
pinctrl-names = "default";
167167
};
168168

169+
&lpspi0 {
170+
status = "okay";
171+
pinctrl-0 = <&pinmux_lpspi0>;
172+
pinctrl-names = "default";
173+
};
174+
169175
&lpuart2 {
170176
status = "okay";
171177
current-speed = <115200>;

boards/nxp/frdm_mcxa344/frdm_mcxa344.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ supported:
1818
- flash
1919
- gpio
2020
- i2c
21+
- spi
2122
- uart
2223
vendor: nxp

0 commit comments

Comments
 (0)