From a30c5731aedaf8744a5abd0a8a90e9711f58de8e Mon Sep 17 00:00:00 2001 From: cyliang tw Date: Fri, 31 May 2024 20:06:28 +0800 Subject: [PATCH] tests: drivers: can: api: support numaker_m2l31ki Add support for Nuvoton numaker board numaker_m2l31ki. m2l31x has 4 MPU regions and can't afford one more region for USERSPACE, so set CONFIG_USERSPACE=n in m2l31ki_defconfig. Signed-off-by: cyliang tw --- .../numaker_m2l31ki/numaker_m2l31ki_defconfig | 3 +++ .../can/api/boards/numaker_m2l31ki.overlay | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/drivers/can/api/boards/numaker_m2l31ki.overlay diff --git a/boards/nuvoton/numaker_m2l31ki/numaker_m2l31ki_defconfig b/boards/nuvoton/numaker_m2l31ki/numaker_m2l31ki_defconfig index e59234cb73c..4e555333a7e 100644 --- a/boards/nuvoton/numaker_m2l31ki/numaker_m2l31ki_defconfig +++ b/boards/nuvoton/numaker_m2l31ki/numaker_m2l31ki_defconfig @@ -21,3 +21,6 @@ CONFIG_UART_CONSOLE=y # Enable RMC CONFIG_FLASH=y + +# m2l31x has 4 MPU regions and can't afford to enable CONFIG_USERSPACE +CONFIG_USERSPACE=n diff --git a/tests/drivers/can/api/boards/numaker_m2l31ki.overlay b/tests/drivers/can/api/boards/numaker_m2l31ki.overlay new file mode 100644 index 00000000000..17e70677570 --- /dev/null +++ b/tests/drivers/can/api/boards/numaker_m2l31ki.overlay @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: Apache-2.0 */ + +/ { + chosen { + zephyr,canbus = &canfd0; + }; +}; + +&pinctrl { + /* CAN TX/RX --> UNO D3/D2 */ + canfd0_default: canfd0_default { + group0 { + pinmux = , + ; + }; + }; +}; + +&canfd0 { + pinctrl-0 = <&canfd0_default>; + pinctrl-names = "default"; + status = "okay"; +};