diff --git a/boards/nuvoton/npcm400_evb/Kconfig.defconfig b/boards/nuvoton/npcm400_evb/Kconfig.defconfig new file mode 100644 index 00000000000..058d1ef0ad0 --- /dev/null +++ b/boards/nuvoton/npcm400_evb/Kconfig.defconfig @@ -0,0 +1,6 @@ +# Copyright (c) 2024 Nuvoton Technology Corporation. +# +# SPDX-License-Identifier: Apache-2.0 + +config SYS_CLOCK_TICKS_PER_SEC + default 1000 diff --git a/boards/nuvoton/npcm400_evb/Kconfig.npcm400_evb b/boards/nuvoton/npcm400_evb/Kconfig.npcm400_evb new file mode 100644 index 00000000000..068f536f3f9 --- /dev/null +++ b/boards/nuvoton/npcm400_evb/Kconfig.npcm400_evb @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Nuvoton Technology Corporation. +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NPCM400_EVB + select SOC_NPCM400 diff --git a/boards/nuvoton/npcm400_evb/board.cmake b/boards/nuvoton/npcm400_evb/board.cmake new file mode 100644 index 00000000000..1b63186eb8e --- /dev/null +++ b/boards/nuvoton/npcm400_evb/board.cmake @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Nuvoton Technology Corporation. +# +# SPDX-License-Identifier: Apache-2.0 + +board_runner_args(jlink "--device=npcm400" "--speed=4000") +board_runner_args(jlink "--file=./build/zephyr/${CONFIG_KERNEL_BIN_NAME}.npcm.bin") +board_runner_args(jlink "--reset-after-load") +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) diff --git a/boards/nuvoton/npcm400_evb/board.yml b/boards/nuvoton/npcm400_evb/board.yml new file mode 100644 index 00000000000..1a428cc5fe1 --- /dev/null +++ b/boards/nuvoton/npcm400_evb/board.yml @@ -0,0 +1,5 @@ +board: + name: npcm400_evb + vendor: nuvoton + socs: + - name: npcm400 diff --git a/boards/nuvoton/npcm400_evb/doc/index.rst b/boards/nuvoton/npcm400_evb/doc/index.rst new file mode 100644 index 00000000000..930ac3dfe3a --- /dev/null +++ b/boards/nuvoton/npcm400_evb/doc/index.rst @@ -0,0 +1,108 @@ +.. _npcm400_evb: + +Nuvoton NPCM400_EVB +#################### + +Overview +******** + +The NPCM400_EVB kit is a development platform to evaluate the +Nuvoton NPCM4 series microcontrollers. This board needs to be mated with +part number NPCM400 Satellite Management Controller (SMC). + +.. image:: npcm400_evb.webp + :align: center + :alt: NPCM400 Evaluation Board + +Hardware +******** + +- ARM Cortex-M4F Processor +- Core clock up to 100 MHz +- 1MB Integrated Flash +- 32KB cache for XIP and Data +- 768 KB RAM and 64 KB boot ROM +- ADC & GPIO headers +- UART0 and UART1 +- I2C/I3C +- RMII +- USB2.0 Device +- USB1.1 Host +- Secure Boot is supported + +Supported Features +================== + +The following features are supported: + ++-----------+------------+-------------------------------------+ +| Interface | Controller | Driver/Component | ++===========+============+=====================================+ +| NVIC | on-chip | nested vector interrupt controller | ++-----------+------------+-------------------------------------+ +| ADC | on-chip | adc controller | ++-----------+------------+-------------------------------------+ +| CLOCK | on-chip | reset and clock control | ++-----------+------------+-------------------------------------+ +| GPIO | on-chip | gpio | ++-----------+------------+-------------------------------------+ +| I2C | on-chip | i2c port/controller | ++-----------+------------+-------------------------------------+ +| I3C | on-chip | i3c port/controller | ++-----------+------------+-------------------------------------+ +| PINMUX | on-chip | pinmux | ++-----------+------------+-------------------------------------+ +| UART | on-chip | serial port-polling; | +| | | serial port-interrupt | ++-----------+------------+-------------------------------------+ +| WDT | on-chip | watchdog | ++-----------+------------+-------------------------------------+ + +The default configuration can be found in the defconfig file: +:zephyr_file:`boards/nuvoton/npcm400_evb/npcm400_evb_defconfig` + +Connections and IOs +=================== + +Nuvoton to provide the schematic for this board. + +Serial Port +=========== + +UART0 is configured for serial logs. The default serial setup is 115200 8N1. + +Programming and Debugging +************************* + +This board comes with a Cortex ETM port which facilitates tracing and debugging +using a single physical connection. In addition, it comes with sockets for +JTAG-only sessions. + +Flashing +======== + +If the correct headers are installed, this board supports J-TAG. + +To flash with J-TAG, install the drivers for your programmer, for example: +SEGGER J-link's drivers are at https://www.segger.com/downloads/jlink/ + +Here is an example for the :ref:`hello_world` application. + +.. zephyr-app-commands:: + :zephyr-app: samples/hello_world + :board: npcm400_evb + :goals: flash + +Open a serial terminal, and you should see the following message in the terminal: + +.. code-block:: console + + Hello World! npcm400_evb/npcm400 + +Debugging +========= + +Use JTAG/SWD with a J-Link + +References +********** diff --git a/boards/nuvoton/npcm400_evb/doc/npcm400_evb.webp b/boards/nuvoton/npcm400_evb/doc/npcm400_evb.webp new file mode 100644 index 00000000000..479e7c5cec6 Binary files /dev/null and b/boards/nuvoton/npcm400_evb/doc/npcm400_evb.webp differ diff --git a/boards/nuvoton/npcm400_evb/npcm400_evb.dts b/boards/nuvoton/npcm400_evb/npcm400_evb.dts new file mode 100644 index 00000000000..2211799235c --- /dev/null +++ b/boards/nuvoton/npcm400_evb/npcm400_evb.dts @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 Nuvoton Technology Corporation. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include + +/ { + model = "Nuvoton NPCM400 evaluation board"; + + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + aliases { + }; + +}; diff --git a/boards/nuvoton/npcm400_evb/npcm400_evb.yaml b/boards/nuvoton/npcm400_evb/npcm400_evb.yaml new file mode 100644 index 00000000000..c9628e4553d --- /dev/null +++ b/boards/nuvoton/npcm400_evb/npcm400_evb.yaml @@ -0,0 +1,16 @@ +# +# Copyright (c) 2024 Nuvoton Technology Corporation. +# +# SPDX-License-Identifier: Apache-2.0 +# + +identifier: npcm400_evb +name: Nuvoton NPCM400 EVB +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb +ram: 768 +flash: 1024 +vendor: nuvoton diff --git a/boards/nuvoton/npcm400_evb/npcm400_evb_defconfig b/boards/nuvoton/npcm400_evb/npcm400_evb_defconfig new file mode 100644 index 00000000000..687f322919b --- /dev/null +++ b/boards/nuvoton/npcm400_evb/npcm400_evb_defconfig @@ -0,0 +1,16 @@ +# Copyright (c) 2024 Nuvoton Technology Corporation. +# +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_SRAM_VECTOR_TABLE=y + +# General Kernel Options +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000 +CONFIG_XIP=y + +# UART Driver +CONFIG_SERIAL=n + +# Console Driver +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n