Skip to content

Commit

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

Signed-off-by: Neil Chen <[email protected]>
  • Loading branch information
NeilChen93 authored and henrikbrixandersen committed Jan 8, 2025
1 parent cf6e4cd commit 663960c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boards/nxp/frdm_mcxa156/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ static int frdm_mcxa156_init(void)
CLOCK_AttachClk(kFRO12M_to_LPUART0);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart1))
CLOCK_SetClockDiv(kCLOCK_DivLPUART1, 1u);
CLOCK_AttachClk(kFRO12M_to_LPUART1);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer0))
CLOCK_SetClockDiv(kCLOCK_DivCTIMER0, 1u);
CLOCK_AttachClk(kFRO_HF_to_CTIMER0);
Expand Down
9 changes: 9 additions & 0 deletions boards/nxp/frdm_mcxa156/frdm_mcxa156-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
input-enable;
};
};
pinmux_lpuart1: pinmux_lpuart1 {
group0 {
pinmux = <LPUART1_RXD_P3_20>,
<LPUART1_TXD_P3_21>;
drive-strength = "low";
slew-rate = "fast";
input-enable;
};
};
pinmux_dac0: pinmux_dac0 {
group0 {
pinmux = <DAC0_OUT_P2_2>;
Expand Down
7 changes: 7 additions & 0 deletions boards/nxp/frdm_mcxa156/frdm_mcxa156.dts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@
pinctrl-names = "default";
};

&lpuart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&pinmux_lpuart1>;
pinctrl-names = "default";
};

&ctimer0 {
status = "okay";
};
Expand Down

0 comments on commit 663960c

Please sign in to comment.