From 31273692c0b223c86cec80bd3ffa97e42bf5c25a Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Fri, 9 Feb 2024 22:40:04 +0100 Subject: [PATCH] boards: sam4l_ek: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek | 5 +++++ .../arm => atmel/sam}/sam4l_ek/board.cmake | 0 boards/atmel/sam/sam4l_ek/board.yml | 5 +++++ .../doc/img/atmel-sam4l-ek-callouts.jpg | Bin .../arm => atmel/sam}/sam4l_ek/doc/index.rst | 20 +++++++++++------- .../sam}/sam4l_ek/sam4l_ek-pinctrl.dtsi | 0 .../arm => atmel/sam}/sam4l_ek/sam4l_ek.dts | 0 .../arm => atmel/sam}/sam4l_ek/sam4l_ek.yaml | 10 ++++++--- .../sam}/sam4l_ek/sam4l_ek_defconfig | 5 ----- .../boards_legacy/arm/sam4l_ek/Kconfig.board | 8 ------- .../arm/sam4l_ek/Kconfig.defconfig | 11 ---------- 11 files changed, 29 insertions(+), 35 deletions(-) create mode 100644 boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/board.cmake (100%) create mode 100644 boards/atmel/sam/sam4l_ek/board.yml rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/doc/index.rst (93%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek.dts (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek.yaml (78%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek_defconfig (58%) delete mode 100644 boards/boards_legacy/arm/sam4l_ek/Kconfig.board delete mode 100644 boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig diff --git a/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek b/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek new file mode 100644 index 00000000000..be93be83111 --- /dev/null +++ b/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek @@ -0,0 +1,5 @@ +# Copyright (c) 2020-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_SAM4L_EK + select SOC_SAM4LC4C diff --git a/boards/boards_legacy/arm/sam4l_ek/board.cmake b/boards/atmel/sam/sam4l_ek/board.cmake similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/board.cmake rename to boards/atmel/sam/sam4l_ek/board.cmake diff --git a/boards/atmel/sam/sam4l_ek/board.yml b/boards/atmel/sam/sam4l_ek/board.yml new file mode 100644 index 00000000000..7045ba351ce --- /dev/null +++ b/boards/atmel/sam/sam4l_ek/board.yml @@ -0,0 +1,5 @@ +board: + name: sam4l_ek + vendor: atmel + socs: + - name: sam4lc4c diff --git a/boards/boards_legacy/arm/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg b/boards/atmel/sam/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg rename to boards/atmel/sam/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg diff --git a/boards/boards_legacy/arm/sam4l_ek/doc/index.rst b/boards/atmel/sam/sam4l_ek/doc/index.rst similarity index 93% rename from boards/boards_legacy/arm/sam4l_ek/doc/index.rst rename to boards/atmel/sam/sam4l_ek/doc/index.rst index ee5d7120171..a28b0728836 100644 --- a/boards/boards_legacy/arm/sam4l_ek/doc/index.rst +++ b/boards/atmel/sam/sam4l_ek/doc/index.rst @@ -61,29 +61,33 @@ The sam4l_ek board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ -| GPIO | on-chip | gpio | -+-----------+------------+-------------------------------------+ -| HWINFO | on-chip | Unique 120 bit serial number | -+-----------+------------+-------------------------------------+ | MPU | on-chip | arch/arm | +-----------+------------+-------------------------------------+ | NVIC | on-chip | arch/arm | +-----------+------------+-------------------------------------+ -| SPI | on-chip | spi | -+-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ -| TRNG | on-chip | 32-bit True Random Number Generator | +| COUNTER | on-chip | counter | ++-----------+------------+-------------------------------------+ +| GPIO | on-chip | gpio | ++-----------+------------+-------------------------------------+ +| HWINFO | on-chip | Unique 120 bit serial number | ++-----------+------------+-------------------------------------+ +| SPI | on-chip | spi | ++-----------+------------+-------------------------------------+ +| TRNG | on-chip | entropy | +-----------+------------+-------------------------------------+ | TWIM | on-chip | i2c master port-interrupt | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ +| USB | on-chip | usb device | ++-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/sam4l_ek/sam4l_ek_defconfig`. +:zephyr_file:`boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig`. Connections and IOs =================== diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek-pinctrl.dtsi b/boards/atmel/sam/sam4l_ek/sam4l_ek-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek-pinctrl.dtsi rename to boards/atmel/sam/sam4l_ek/sam4l_ek-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek.dts b/boards/atmel/sam/sam4l_ek/sam4l_ek.dts similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek.dts rename to boards/atmel/sam/sam4l_ek/sam4l_ek.dts diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek.yaml b/boards/atmel/sam/sam4l_ek/sam4l_ek.yaml similarity index 78% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek.yaml rename to boards/atmel/sam/sam4l_ek/sam4l_ek.yaml index cdadbee508a..f33959c7805 100644 --- a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek.yaml +++ b/boards/atmel/sam/sam4l_ek/sam4l_ek.yaml @@ -2,16 +2,20 @@ identifier: sam4l_ek name: SAM4L-EK type: mcu arch: arm -flash: 256 -ram: 32 toolchain: - zephyr - gnuarmemb - xtools +flash: 256 +ram: 32 supported: + - counter - gpio + - entropy + - hwinfo - i2c - spi - - usart + - uart + - usb - usb_device vendor: atmel diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek_defconfig b/boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig similarity index 58% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek_defconfig rename to boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig index c5faaad1983..6c902f537d7 100644 --- a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek_defconfig +++ b/boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig @@ -1,13 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_SAM4L=y -CONFIG_SOC_PART_NUMBER_SAM4LC4C=y -CONFIG_BOARD_SAM4L_EK=y - CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_CONSOLE=y -CONFIG_GPIO=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam4l_ek/Kconfig.board b/boards/boards_legacy/arm/sam4l_ek/Kconfig.board deleted file mode 100644 index 1c0987a045f..00000000000 --- a/boards/boards_legacy/arm/sam4l_ek/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Atmel SAM4L-EK selection - -# Copyright (c) 2020 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SAM4L_EK - bool "Atmel SAM4L-EK" - depends on SOC_PART_NUMBER_SAM4LC4C diff --git a/boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig b/boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig deleted file mode 100644 index 315afa1b312..00000000000 --- a/boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# Atmel SAM4L-EK Board configuration - -# Copyright (c) 2020 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_SAM4L_EK - -config BOARD - default "sam4l_ek" - -endif # BOARD_SAM4L_EK