Skip to content

Commit 663960c

Browse files
NeilChen93henrikbrixandersen
authored andcommitted
boards: nxp: frdm_mcxa156: Support lpuart1 for NXP frdm_mcxa156 board
Support lpuart1 for NXP frdm_mcxa156 board. Signed-off-by: Neil Chen <[email protected]>
1 parent cf6e4cd commit 663960c

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

boards/nxp/frdm_mcxa156/board.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ static int frdm_mcxa156_init(void)
116116
CLOCK_AttachClk(kFRO12M_to_LPUART0);
117117
#endif
118118

119+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart1))
120+
CLOCK_SetClockDiv(kCLOCK_DivLPUART1, 1u);
121+
CLOCK_AttachClk(kFRO12M_to_LPUART1);
122+
#endif
123+
119124
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer0))
120125
CLOCK_SetClockDiv(kCLOCK_DivCTIMER0, 1u);
121126
CLOCK_AttachClk(kFRO_HF_to_CTIMER0);

boards/nxp/frdm_mcxa156/frdm_mcxa156-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
input-enable;
1717
};
1818
};
19+
pinmux_lpuart1: pinmux_lpuart1 {
20+
group0 {
21+
pinmux = <LPUART1_RXD_P3_20>,
22+
<LPUART1_TXD_P3_21>;
23+
drive-strength = "low";
24+
slew-rate = "fast";
25+
input-enable;
26+
};
27+
};
1928
pinmux_dac0: pinmux_dac0 {
2029
group0 {
2130
pinmux = <DAC0_OUT_P2_2>;

boards/nxp/frdm_mcxa156/frdm_mcxa156.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@
107107
pinctrl-names = "default";
108108
};
109109

110+
&lpuart1 {
111+
status = "okay";
112+
current-speed = <115200>;
113+
pinctrl-0 = <&pinmux_lpuart1>;
114+
pinctrl-names = "default";
115+
};
116+
110117
&ctimer0 {
111118
status = "okay";
112119
};

0 commit comments

Comments
 (0)