Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions boards/nxp/frdm_mcxa344/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,26 @@ void board_early_init_hook(void)
CLOCK_EnableClock(kCLOCK_GateGPIO4);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c0))
CLOCK_SetClockDiv(kCLOCK_DivLPI2C0, 1u);
CLOCK_AttachClk(kFRO_LF_DIV_to_LPI2C0);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c1))
CLOCK_SetClockDiv(kCLOCK_DivLPI2C1, 1u);
CLOCK_AttachClk(kFRO_LF_DIV_to_LPI2C1);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi0))
CLOCK_SetClockDiv(kCLOCK_DivLPSPI0, 1u);
CLOCK_AttachClk(kFRO_LF_DIV_to_LPSPI0);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi1))
CLOCK_SetClockDiv(kCLOCK_DivLPSPI1, 1u);
CLOCK_AttachClk(kFRO_LF_DIV_to_LPSPI1);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0))
CLOCK_SetClockDiv(kCLOCK_DivLPUART0, 1u);
CLOCK_AttachClk(kFRO_LF_DIV_to_LPUART0);
Expand All @@ -143,6 +163,10 @@ void board_early_init_hook(void)
RESET_ReleasePeripheralReset(kLPUART3_RST_SHIFT_RSTn);
#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
CLOCK_SetClockDiv(kCLOCK_DivWWDT0, 1u);
#endif

/* Set SystemCoreClock variable. */
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
}
39 changes: 37 additions & 2 deletions boards/nxp/frdm_mcxa344/frdm_mcxa344-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,49 @@
* SPDX-License-Identifier: Apache-2.0
*/


#include <nxp/mcx/MCXA344VLL-pinctrl.h>

&pinctrl {
pinmux_lpi2c0: pinmux_lpi2c0 {
group0 {
pinmux = <LPI2C0_SDA_P1_8>,
<LPI2C0_SCL_P1_9>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
bias-pull-up;
drive-open-drain;
};
};

pinmux_lpi2c1: pinmux_lpi2c1 {
group0 {
pinmux = <LPI2C1_SDA_P3_28>,
<LPI2C1_SCL_P3_27>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
bias-pull-up;
drive-open-drain;
};
};

pinmux_lpspi0: pinmux_lpspi0 {
group0 {
pinmux = <LPSPI0_SDO_P1_0>,
<LPSPI0_SCK_P1_1>,
<LPSPI0_SDI_P1_2>,
<LPSPI0_PCS0_P1_3>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
};
};

pinmux_lpuart2: pinmux_lpuart2 {
group0 {
pinmux = <LPUART2_RXD_P2_3>,
<LPUART2_TXD_P2_2>;
<LPUART2_TXD_P2_2>;
drive-strength = "low";
slew-rate = "fast";
input-enable;
Expand Down
79 changes: 51 additions & 28 deletions boards/nxp/frdm_mcxa344/frdm_mcxa344.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
model = "NXP FRDM_MCXA344 board";
compatible = "nxp,mcxa344", "nxp,mcx";

aliases{
aliases {
led0 = &red_led;
led1 = &green_led;
led2 = &blue_led;
sw0 = &user_button_2;
sw1 = &user_button_3;
watchdog0 = &wwdt0;
};

chosen {
Expand Down Expand Up @@ -105,33 +106,6 @@
status = "okay";
};

&gpio0 {
status = "okay";
};

&gpio1 {
status = "okay";
};

&gpio2 {
status = "okay";
};

&gpio3 {
status = "okay";
};

&gpio4 {
status = "okay";
};

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

&flash {
partitions {
compatible = "fixed-partitions";
Expand Down Expand Up @@ -160,3 +134,52 @@
};
};
};

&gpio0 {
status = "okay";
};

&gpio1 {
status = "okay";
};

&gpio2 {
status = "okay";
};

&gpio3 {
status = "okay";
};

&gpio4 {
status = "okay";
};

&lpi2c0 {
status = "okay";
pinctrl-0 = <&pinmux_lpi2c0>;
pinctrl-names = "default";
};

&lpi2c1 {
status = "okay";
pinctrl-0 = <&pinmux_lpi2c1>;
pinctrl-names = "default";
};

&lpspi0 {
status = "okay";
pinctrl-0 = <&pinmux_lpspi0>;
pinctrl-names = "default";
};

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

&wwdt0 {
status = "okay";
};
3 changes: 3 additions & 0 deletions boards/nxp/frdm_mcxa344/frdm_mcxa344.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ supported:
- arduino_gpio
- flash
- gpio
- i2c
- spi
- uart
- watchdog
vendor: nxp
26 changes: 26 additions & 0 deletions tests/drivers/i2c/i2c_target_api/boards/frdm_mcxa344.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

/* To test this sample, connect
* LPI2C0 SCL(J2-20) --> LPI2C1 SCL(J5-5)
* LPI2C0 SDA(J2-18) --> LPI2C1 SDA(J5-6)
*/

&lpi2c0 {
eeprom0: eeprom@54 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x54>;
size = <256>;
};
};

&lpi2c1 {
eeprom1: eeprom@56 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x56>;
size = <256>;
};
};
1 change: 1 addition & 0 deletions tests/drivers/i2c/i2c_target_api/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ tests:
- frdm_mcxa346
- frdm_mcxa266
- frdm_mcxa366
- frdm_mcxa344
- max32655evkit/max32655/m4
- max32662evkit
- max32666evkit/max32666/cpu0
Expand Down
22 changes: 22 additions & 0 deletions tests/drivers/spi/spi_loopback/boards/frdm_mcxa344.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

/* To test this sample, connect
* LPSPI0 MOSI(J6-6, P1_0/LPSPI0_SDO) --> LPSPI0 MISO(J6-5, P1_2/LPSPI0_SDI)
*/
&lpspi0 {
slow@0 {
compatible = "test-spi-loopback-slow";
reg = <0>;
spi-max-frequency = <500000>;
};

fast@0 {
compatible = "test-spi-loopback-fast";
reg = <0>;
spi-max-frequency = <16000000>;
};
};