Browse Source

boards: samd21_xpro: Convert to HWMv2

Port the board to HWMv2.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
pull/69687/head
Gerson Fernando Budke 1 year ago committed by Carles Cufi
parent
commit
0fdbe3552e
  1. 6
      boards/atmel/sam0/samd21_xpro/Kconfig.samd21_xpro
  2. 0
      boards/atmel/sam0/samd21_xpro/board.cmake
  3. 5
      boards/atmel/sam0/samd21_xpro/board.yml
  4. 0
      boards/atmel/sam0/samd21_xpro/doc/img/ATSAMD21-XPRO-pinout.jpg
  5. 0
      boards/atmel/sam0/samd21_xpro/doc/img/atsamd21_xpro.jpg
  6. 20
      boards/atmel/sam0/samd21_xpro/doc/index.rst
  7. 3
      boards/atmel/sam0/samd21_xpro/pre_dt_board.cmake
  8. 0
      boards/atmel/sam0/samd21_xpro/samd21_xpro-pinctrl.dtsi
  9. 5
      boards/atmel/sam0/samd21_xpro/samd21_xpro.dts
  10. 7
      boards/atmel/sam0/samd21_xpro/samd21_xpro.yaml
  11. 6
      boards/atmel/sam0/samd21_xpro/samd21_xpro_defconfig
  12. 0
      boards/atmel/sam0/samd21_xpro/support/openocd.cfg
  13. 8
      boards/boards_legacy/arm/atsamd21_xpro/Kconfig.board
  14. 8
      boards/boards_legacy/arm/atsamd21_xpro/Kconfig.defconfig

6
boards/atmel/sam0/samd21_xpro/Kconfig.samd21_xpro

@ -0,0 +1,6 @@ @@ -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

0
boards/boards_legacy/arm/atsamd21_xpro/board.cmake → boards/atmel/sam0/samd21_xpro/board.cmake

5
boards/atmel/sam0/samd21_xpro/board.yml

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

0
boards/boards_legacy/arm/atsamd21_xpro/doc/img/ATSAMD21-XPRO-pinout.jpg → boards/atmel/sam0/samd21_xpro/doc/img/ATSAMD21-XPRO-pinout.jpg

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

0
boards/boards_legacy/arm/atsamd21_xpro/doc/img/atsamd21_xpro.jpg → boards/atmel/sam0/samd21_xpro/doc/img/atsamd21_xpro.jpg

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

20
boards/boards_legacy/arm/atsamd21_xpro/doc/index.rst → boards/atmel/sam0/samd21_xpro/doc/index.rst

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
.. _atsamd21_xpro:
.. _samd21_xpro:
SAM D21 Xplained Pro Evaluation Kit
###################################
@ -15,14 +15,14 @@ hardware. @@ -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 @@ -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: @@ -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`_. @@ -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 @@ -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 @@ -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
**********

3
boards/boards_legacy/arm/atsamd21_xpro/pre_dt_board.cmake → boards/atmel/sam0/samd21_xpro/pre_dt_board.cmake

@ -1,6 +1,9 @@ @@ -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

0
boards/boards_legacy/arm/atsamd21_xpro/atsamd21_xpro-pinctrl.dtsi → boards/atmel/sam0/samd21_xpro/samd21_xpro-pinctrl.dtsi

5
boards/boards_legacy/arm/atsamd21_xpro/atsamd21_xpro.dts → boards/atmel/sam0/samd21_xpro/samd21_xpro.dts

@ -1,5 +1,6 @@ @@ -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 @@ @@ -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;

7
boards/boards_legacy/arm/atsamd21_xpro/atsamd21_xpro.yaml → boards/atmel/sam0/samd21_xpro/samd21_xpro.yaml

@ -1,15 +1,16 @@ @@ -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

6
boards/boards_legacy/arm/atsamd21_xpro/atsamd21_xpro_defconfig → boards/atmel/sam0/samd21_xpro/samd21_xpro_defconfig

@ -1,15 +1,13 @@ @@ -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

0
boards/boards_legacy/arm/atsamd21_xpro/support/openocd.cfg → boards/atmel/sam0/samd21_xpro/support/openocd.cfg

8
boards/boards_legacy/arm/atsamd21_xpro/Kconfig.board

@ -1,8 +0,0 @@ @@ -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

8
boards/boards_legacy/arm/atsamd21_xpro/Kconfig.defconfig

@ -1,8 +0,0 @@ @@ -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
Loading…
Cancel
Save