From 882524d2a0446cd4079c7fa3d1c1e15defa67e37 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 2 Feb 2024 11:38:04 +0000 Subject: [PATCH] boards: arm: nrf21540dk_nrf52840: Convert to v2 Converts the board to hwmv2 Signed-off-by: Jamie McCrae --- .../nrf21540dk}/Kconfig | 2 +- .../nrf21540dk}/Kconfig.defconfig | 7 ++----- .../nrf21540dk/Kconfig.nrf21540dk} | 7 ++++--- .../nrf21540dk}/board.cmake | 0 boards/nordic_nrf/nrf21540dk/board.yml | 5 +++++ .../nrf21540dk}/doc/img/nrf21540dk_nrf52840.jpg | Bin .../nrf21540dk}/doc/index.rst | 8 ++++---- .../nrf21540dk}/nrf21540dk_nrf52840-pinctrl.dtsi | 0 .../nrf21540dk}/nrf21540dk_nrf52840.dts | 0 .../nrf21540dk}/nrf21540dk_nrf52840.yaml | 2 +- .../nrf21540dk}/nrf21540dk_nrf52840_defconfig | 4 ---- .../nrf21540dk}/pre_dt_board.cmake | 0 12 files changed, 17 insertions(+), 18 deletions(-) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/Kconfig (84%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/Kconfig.defconfig (59%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.board => nordic_nrf/nrf21540dk/Kconfig.nrf21540dk} (58%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/board.cmake (100%) create mode 100644 boards/nordic_nrf/nrf21540dk/board.yml rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/doc/img/nrf21540dk_nrf52840.jpg (100%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/doc/index.rst (97%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/nrf21540dk_nrf52840-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/nrf21540dk_nrf52840.dts (100%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/nrf21540dk_nrf52840.yaml (90%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/nrf21540dk_nrf52840_defconfig (76%) rename boards/{boards_legacy/arm/nrf21540dk_nrf52840 => nordic_nrf/nrf21540dk}/pre_dt_board.cmake (100%) diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig b/boards/nordic_nrf/nrf21540dk/Kconfig similarity index 84% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig rename to boards/nordic_nrf/nrf21540dk/Kconfig index 67b25837390..522eb6e44dd 100644 --- a/boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig +++ b/boards/nordic_nrf/nrf21540dk/Kconfig @@ -7,4 +7,4 @@ config BOARD_ENABLE_DCDC bool "DCDC mode" select SOC_DCDC_NRF52X default y - depends on BOARD_NRF21540DK_NRF52840 + depends on BOARD_NRF21540DK diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.defconfig b/boards/nordic_nrf/nrf21540dk/Kconfig.defconfig similarity index 59% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.defconfig rename to boards/nordic_nrf/nrf21540dk/Kconfig.defconfig index 71cb76615ed..28a3f3e2c98 100644 --- a/boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.defconfig +++ b/boards/nordic_nrf/nrf21540dk/Kconfig.defconfig @@ -3,12 +3,9 @@ # Copyright (c) 2020 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -if BOARD_NRF21540DK_NRF52840 - -config BOARD - default "nrf21540dk_nrf52840" +if BOARD_NRF21540DK config BT_CTLR default BT -endif # BOARD_NRF21540DK_NRF52840 +endif # BOARD_NRF21540DK diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.board b/boards/nordic_nrf/nrf21540dk/Kconfig.nrf21540dk similarity index 58% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.board rename to boards/nordic_nrf/nrf21540dk/Kconfig.nrf21540dk index b2c9c86d53e..c4b53a662ba 100644 --- a/boards/boards_legacy/arm/nrf21540dk_nrf52840/Kconfig.board +++ b/boards/nordic_nrf/nrf21540dk/Kconfig.nrf21540dk @@ -3,6 +3,7 @@ # Copyright (c) 2020 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -config BOARD_NRF21540DK_NRF52840 - bool "nRF21540 DK NRF52840" - depends on SOC_NRF52840_QIAA +config BOARD_NRF21540DK + bool + default y + select SOC_NRF52840_QIAA diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/board.cmake b/boards/nordic_nrf/nrf21540dk/board.cmake similarity index 100% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/board.cmake rename to boards/nordic_nrf/nrf21540dk/board.cmake diff --git a/boards/nordic_nrf/nrf21540dk/board.yml b/boards/nordic_nrf/nrf21540dk/board.yml new file mode 100644 index 00000000000..2e3b6cdeeae --- /dev/null +++ b/boards/nordic_nrf/nrf21540dk/board.yml @@ -0,0 +1,5 @@ +board: + name: nrf21540dk + vendor: Nordic Semiconductor + socs: + - name: nrf52840 diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/doc/img/nrf21540dk_nrf52840.jpg b/boards/nordic_nrf/nrf21540dk/doc/img/nrf21540dk_nrf52840.jpg similarity index 100% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/doc/img/nrf21540dk_nrf52840.jpg rename to boards/nordic_nrf/nrf21540dk/doc/img/nrf21540dk_nrf52840.jpg diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/doc/index.rst b/boards/nordic_nrf/nrf21540dk/doc/index.rst similarity index 97% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/doc/index.rst rename to boards/nordic_nrf/nrf21540dk/doc/index.rst index 617f240b0a9..f5b8e010a36 100644 --- a/boards/boards_legacy/arm/nrf21540dk_nrf52840/doc/index.rst +++ b/boards/nordic_nrf/nrf21540dk/doc/index.rst @@ -44,7 +44,7 @@ of the slow clock is 32.768 kHz. The frequency of the main clock is 32 MHz. Supported Features ================== -The nrf21540dk_nrf52840 board configuration supports the following +The nrf21540dk/nrf52840 board configuration supports the following hardware features: +-----------+------------+----------------------+ @@ -122,7 +122,7 @@ Front End Module Programming and Debugging ************************* -Applications for the ``nrf21540dk_nrf52840`` board configuration can be built, +Applications for the ``nrf21540dk/nrf52840`` board configuration can be built, flashed, and debugged in the usual way. See :ref:`build_an_application` and :ref:`application_run` for more details on building and running. @@ -150,7 +150,7 @@ Then build and flash the application in the usual way. .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: nrf21540dk_nrf52840 + :board: nrf21540dk/nrf52840 :goals: build flash Debugging @@ -173,7 +173,7 @@ the board are working properly with Zephyr: You can build and flash the examples to make sure Zephyr is running correctly on your board. The button and LED definitions can be found in -:zephyr_file:`boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts`. +:zephyr_file:`boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840.dts`. Changing UART1 pins ******************* diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840-pinctrl.dtsi b/boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840-pinctrl.dtsi rename to boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts b/boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840.dts similarity index 100% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts rename to boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840.dts diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.yaml b/boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840.yaml similarity index 90% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.yaml rename to boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840.yaml index 985dba241e1..a1bcc36e034 100644 --- a/boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.yaml +++ b/boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840.yaml @@ -1,4 +1,4 @@ -identifier: nrf21540dk_nrf52840 +identifier: nrf21540dk/nrf52840 name: nRF21540-DK-NRF52840 type: mcu arch: arm diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig b/boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840_defconfig similarity index 76% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig rename to boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840_defconfig index fecb5052471..8daa29dc473 100644 --- a/boards/boards_legacy/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig +++ b/boards/nordic_nrf/nrf21540dk/nrf21540dk_nrf52840_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRF21540DK_NRF52840=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/boards/boards_legacy/arm/nrf21540dk_nrf52840/pre_dt_board.cmake b/boards/nordic_nrf/nrf21540dk/pre_dt_board.cmake similarity index 100% rename from boards/boards_legacy/arm/nrf21540dk_nrf52840/pre_dt_board.cmake rename to boards/nordic_nrf/nrf21540dk/pre_dt_board.cmake