boards: samd21_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 14:49:45 +01:00
committed by Carles Cufi
parent 854cff3905
commit 0fdbe3552e
14 changed files with 33 additions and 35 deletions

View File

@@ -0,0 +1,6 @@
# Copyright (c) 2018 Bryan O'Donoghue
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_SAMD21_XPRO
select SOC_SAMD21J18A

View File

@@ -0,0 +1,5 @@
board:
name: samd21_xpro
vendor: atmel
socs:
- name: samd21j18a

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,4 +1,4 @@
.. _atsamd21_xpro:
.. _samd21_xpro:
SAM D21 Xplained Pro Evaluation Kit
###################################
@@ -15,14 +15,14 @@ hardware.
.. figure:: img/atsamd21_xpro.jpg
:width: 500px
:align: center
:alt: ATSAMD21-XPRO
:alt: SAMD21-XPRO
ATSAMD21-XPRO (Credit: `Microchip Technology`_)
SAMD21-XPRO (Credit: `Microchip Technology`_)
Hardware
********
- ATSAMD21J18 ARM Cortex-M0+ processor at 48 MHz
- SAMD21J18 ARM Cortex-M0+ processor at 48 MHz
- 32.768 kHz crystal oscillator
- 256 KiB flash memory and 32 KiB of RAM
- One yellow user LED
@@ -33,7 +33,7 @@ Hardware
Supported Features
==================
The atsamd21_xpro board configuration supports the following hardware
The samd21_xpro board configuration supports the following hardware
features:
.. list-table::
@@ -79,7 +79,7 @@ features:
Other hardware features are not currently supported by Zephyr.
The default configuration can be found in the Kconfig
``boards/arm/atsamd21_xpro/atsamd21_xpro_defconfig``.
``boards/atmel/sam0/samd21_xpro/samd21_xpro_defconfig``.
Pin Mapping
===========
@@ -92,7 +92,7 @@ Xplained Pro Schematic`_.
.. image:: img/ATSAMD21-XPRO-pinout.jpg
:align: center
:alt: ATSAMD21-XPRO-pinout
:alt: SAMD21-XPRO-pinout
Default Zephyr Peripheral Mapping:
----------------------------------
@@ -155,7 +155,7 @@ Flashing
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: atsamd21_xpro
:board: samd21_xpro
:goals: build
:compact:
@@ -181,11 +181,11 @@ Flashing
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: atsamd21_xpro
:board: samd21_xpro
:goals: flash
:compact:
You should see "Hello World! atsamd21_xpro" in your terminal.
You should see "Hello World! samd21_xpro" in your terminal.
References
**********

View File

@@ -1,6 +1,9 @@
# Copyright (c) 2021 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
# SPI is implemented via sercom so node name isn't spi@...
list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge")
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - /soc/pinmux@41004400 & /soc/gpio@41004400
# - /soc/pinmux@41004480 & /soc/gpio@41004480

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018 Bryan O'Donoghue
* Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -8,12 +9,12 @@
#include <freq.h>
#include <atmel/samd21.dtsi>
#include <atmel/samx2xx18.dtsi>
#include "atsamd21_xpro-pinctrl.dtsi"
#include "samd21_xpro-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "SAM D21 Xplained Pro";
compatible = "atsamd21,xpro", "atmel,samd21j18a", "atmel,samd21";
compatible = "samd21,xpro", "atmel,samd21j18a", "atmel,samd21";
chosen {
zephyr,console = &sercom3;

View File

@@ -1,15 +1,16 @@
# Copyright (c) 2018 Bryan O'Donoghue
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0
identifier: atsamd21_xpro
identifier: samd21_xpro
name: SAM D21 Xplained Pro
type: mcu
arch: arm
ram: 32
flash: 256
toolchain:
- zephyr
- gnuarmemb
- xtools
flash: 256
ram: 32
supported:
- adc
- counter

View File

@@ -1,15 +1,13 @@
# Copyright (c) 2018 Bryan O'Donoghue
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_SAMD21=y
CONFIG_SOC_PART_NUMBER_SAMD21J18A=y
CONFIG_SOC_ATMEL_SAMD_XOSC32K=y
CONFIG_SOC_ATMEL_SAMD_XOSC32K_AS_MAIN=y
CONFIG_BOARD_ATSAMD21_XPRO=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_CONSOLE=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y

View File

@@ -1,8 +0,0 @@
# SAM D21 Xplained Pro Board configuration
# Copyright (c) 2018 Bryan O'Donoghue
# SPDX-License-Identifier: Apache-2.0
config BOARD_ATSAMD21_XPRO
bool "SAM D21 Xplained Pro"
depends on SOC_PART_NUMBER_SAMD21J18A

View File

@@ -1,8 +0,0 @@
# SAM D21 Xplained Pro board configuration
# Copyright (c) 2018 Bryan O'Donoghue
# SPDX-License-Identifier: Apache-2.0
config BOARD
default "atsamd21_xpro"
depends on BOARD_ATSAMD21_XPRO