boards: samc21n_xpro: Convert to HWMv2

Port the board to HWMv2.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke
2024-02-10 16:02:13 +01:00
committed by Carles Cufi
parent f11cf73df1
commit e48e1f5d5b
13 changed files with 29 additions and 34 deletions

View File

@@ -0,0 +1,6 @@
# Copyright (c) 2022 Kamil Serwus
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_SAMC21N_XPRO
select SOC_SAMC21N18A

View File

@@ -0,0 +1,5 @@
board:
name: samc21n_xpro
vendor: atmel
socs:
- name: samc21n18a

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -1,4 +1,4 @@
.. _atsamc21n_xpro: .. _samc21n_xpro:
SAM C21N Xplained Pro Evaluation Kit SAM C21N Xplained Pro Evaluation Kit
#################################### ####################################
@@ -14,12 +14,12 @@ hardware.
.. image:: img/atsamc21n_xpro.jpg .. image:: img/atsamc21n_xpro.jpg
:align: center :align: center
:alt: ATSAMC21N-XPRO :alt: SAMC21N-XPRO
Hardware Hardware
******** ********
- ATSAMC21N18A ARM Cortex-M0+ processor at 48 MHz - SAMC21N18A ARM Cortex-M0+ processor at 48 MHz
- 32.768 kHz crystal oscillator - 32.768 kHz crystal oscillator
- 256 KiB flash memory, 32 KiB of RAM, 8KB RRW flash - 256 KiB flash memory, 32 KiB of RAM, 8KB RRW flash
- One yellow user LED - One yellow user LED
@@ -32,7 +32,7 @@ Hardware
Supported Features Supported Features
================== ==================
The atsamc21n_xpro board configuration supports the following hardware The samc21n_xpro board configuration supports the following hardware
features: features:
.. list-table:: .. list-table::
@@ -78,7 +78,7 @@ features:
Other hardware features are not currently supported by Zephyr. Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig The default configuration can be found in the Kconfig
``boards/arm/atsamc21n_xpro/atsamc21n_xpro_defconfig``. ``boards/atmel/sam0/samc21n_xpro/samc21n_xpro_defconfig``.
Pin Mapping Pin Mapping
=========== ===========
@@ -147,7 +147,7 @@ Flashing
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/hello_world :zephyr-app: samples/hello_world
:board: atsamc21n_xpro :board: samc21n_xpro
:goals: build :goals: build
:compact: :compact:
@@ -173,11 +173,11 @@ Flashing
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/hello_world :zephyr-app: samples/hello_world
:board: atsamc21n_xpro :board: samc21n_xpro
:goals: flash :goals: flash
:compact: :compact:
You should see "Hello World! atsamc21n_xpro" in your terminal. You should see "Hello World! samc21n_xpro" in your terminal.
References References
********** **********

View File

@@ -8,12 +8,12 @@
#include <atmel/samc21.dtsi> #include <atmel/samc21.dtsi>
#include <atmel/samx2xx18.dtsi> #include <atmel/samx2xx18.dtsi>
#include "atsamc21n_xpro-pinctrl.dtsi" #include "samc21n_xpro-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h> #include <zephyr/dt-bindings/input/input-event-codes.h>
/ { / {
model = "SAM C21N Xplained Pro"; model = "SAM C21N Xplained Pro";
compatible = "atsamc21n,xpro", "atmel,samc21n18a", "atmel,samc21"; compatible = "samc21n,xpro", "atmel,samc21n18a", "atmel,samc21";
chosen { chosen {
zephyr,console = &sercom4; zephyr,console = &sercom4;

View File

@@ -1,15 +1,16 @@
# Copyright (c) 2022 Kamil Serwus # Copyright (c) 2022 Kamil Serwus
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
identifier: atsamc21n_xpro identifier: samc21n_xpro
name: SAM C21N Xplained Pro name: SAM C21N Xplained Pro
type: mcu type: mcu
arch: arm arch: arm
ram: 32
flash: 256
toolchain: toolchain:
- zephyr - zephyr
- gnuarmemb - gnuarmemb
- xtools - xtools
flash: 256
ram: 32
supported: supported:
- adc - adc
- can - can

View File

@@ -1,11 +1,10 @@
# Copyright (c) 2022 Kamil Serwus # Copyright (c) 2022 Kamil Serwus
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_SAMC21=y
CONFIG_SOC_PART_NUMBER_SAMC21N18A=y
CONFIG_BOARD_ATSAMC21N_XPRO=y
CONFIG_BUILD_OUTPUT_HEX=y CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_CONSOLE=y CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_GPIO=y

View File

@@ -1,8 +0,0 @@
# SAM C21N Xplained Pro Board configuration
# Copyright (c) 2022 Kamil Serwus
# SPDX-License-Identifier: Apache-2.0
config BOARD_ATSAMC21N_XPRO
bool "SAM C21N Xplained Pro"
depends on SOC_PART_NUMBER_SAMC21N18A

View File

@@ -1,8 +0,0 @@
# SAM C21N Xplained Pro board configuration
# Copyright (c) 2022 Kamil Serwus
# SPDX-License-Identifier: Apache-2.0
config BOARD
default "atsamc21n_xpro"
depends on BOARD_ATSAMC21N_XPRO