From c1565b3d14ca4d53e14b61d6051a2c4af873b434 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 2 Feb 2024 11:38:13 +0000 Subject: [PATCH] boards: arm: xiao_ble: Convert to v2 Converts the board to hwmv2 Signed-off-by: Jamie McCrae --- .../arm/xiao_ble/xiao_ble_sense_defconfig | 33 ------------------ boards/qemu/qemu_cortex_m0/board.yml | 2 ++ .../arm => seeed_studio}/xiao_ble/Kconfig | 0 .../xiao_ble/Kconfig.defconfig | 7 ++-- .../xiao_ble/Kconfig.xiao_ble} | 3 +- .../arm => seeed_studio}/xiao_ble/board.cmake | 0 boards/seeed_studio/xiao_ble/board.yml | 5 +++ .../xiao_ble/doc/img/xiao_ble.jpg | Bin .../xiao_ble/doc/index.rst | 8 ++--- .../xiao_ble/pre_dt_board.cmake | 0 .../xiao_ble/seeed_xiao_connector.dtsi | 0 .../xiao_ble/xiao_ble-pinctrl.dtsi | 0 .../xiao_ble/xiao_ble.dts | 0 .../xiao_ble/xiao_ble.yaml | 0 .../xiao_ble/xiao_ble_common.dtsi | 0 .../xiao_ble/xiao_ble_defconfig | 12 +++---- .../xiao_ble/xiao_ble_nrf52840_sense.dts} | 0 .../xiao_ble/xiao_ble_nrf52840_sense.yaml} | 2 +- .../xiao_ble_nrf52840_sense_defconfig | 4 +++ 19 files changed, 23 insertions(+), 53 deletions(-) delete mode 100644 boards/boards_legacy/arm/xiao_ble/xiao_ble_sense_defconfig rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/Kconfig (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/Kconfig.defconfig (90%) rename boards/{boards_legacy/arm/xiao_ble/Kconfig.board => seeed_studio/xiao_ble/Kconfig.xiao_ble} (73%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/board.cmake (100%) create mode 100644 boards/seeed_studio/xiao_ble/board.yml rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/doc/img/xiao_ble.jpg (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/doc/index.rst (97%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/pre_dt_board.cmake (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/seeed_xiao_connector.dtsi (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/xiao_ble-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/xiao_ble.dts (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/xiao_ble.yaml (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/xiao_ble_common.dtsi (100%) rename boards/{boards_legacy/arm => seeed_studio}/xiao_ble/xiao_ble_defconfig (73%) rename boards/{boards_legacy/arm/xiao_ble/xiao_ble_sense.dts => seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.dts} (100%) rename boards/{boards_legacy/arm/xiao_ble/xiao_ble_sense.yaml => seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.yaml} (88%) create mode 100644 boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense_defconfig diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble_sense_defconfig b/boards/boards_legacy/arm/xiao_ble/xiao_ble_sense_defconfig deleted file mode 100644 index 73878352edd..00000000000 --- a/boards/boards_legacy/arm/xiao_ble/xiao_ble_sense_defconfig +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_XIAO_BLE=y - -# Enable MPU -CONFIG_ARM_MPU=y - -# Enable hardware stack protection -CONFIG_HW_STACK_PROTECTION=y - -# enable GPIO -CONFIG_GPIO=y - -# enable uart driver -CONFIG_SERIAL=y - -# enable console -CONFIG_CONSOLE=y - -# Logger cannot use itself to log -CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y - -# enable USB -CONFIG_USB_DEVICE_STACK=y - -# Build UF2 by default, supported by the Adafruit nRF52 Bootloader -CONFIG_BUILD_OUTPUT_UF2=y -CONFIG_USE_DT_CODE_PARTITION=y - -# required to enable LSM6DS3TR-C power -CONFIG_REGULATOR=y diff --git a/boards/qemu/qemu_cortex_m0/board.yml b/boards/qemu/qemu_cortex_m0/board.yml index 9d694ff2d53..4f15b7b85fd 100644 --- a/boards/qemu/qemu_cortex_m0/board.yml +++ b/boards/qemu/qemu_cortex_m0/board.yml @@ -1,3 +1,5 @@ board: name: qemu_cortex_m0 vendor: Nordic Semiconductor + socs: + - name: nrf51822 diff --git a/boards/boards_legacy/arm/xiao_ble/Kconfig b/boards/seeed_studio/xiao_ble/Kconfig similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/Kconfig rename to boards/seeed_studio/xiao_ble/Kconfig diff --git a/boards/boards_legacy/arm/xiao_ble/Kconfig.defconfig b/boards/seeed_studio/xiao_ble/Kconfig.defconfig similarity index 90% rename from boards/boards_legacy/arm/xiao_ble/Kconfig.defconfig rename to boards/seeed_studio/xiao_ble/Kconfig.defconfig index e0e6dbc28e8..d02785ec152 100644 --- a/boards/boards_legacy/arm/xiao_ble/Kconfig.defconfig +++ b/boards/seeed_studio/xiao_ble/Kconfig.defconfig @@ -5,14 +5,9 @@ if BOARD_XIAO_BLE -config BOARD - default "xiao_ble" - config BT_CTLR default BT -endif # BOARD_XIAO_BLE - if USB_DEVICE_STACK config UART_CONSOLE @@ -22,3 +17,5 @@ config USB_DEVICE_INITIALIZE_AT_BOOT default y endif # USB_DEVICE_STACK + +endif # BOARD_XIAO_BLE diff --git a/boards/boards_legacy/arm/xiao_ble/Kconfig.board b/boards/seeed_studio/xiao_ble/Kconfig.xiao_ble similarity index 73% rename from boards/boards_legacy/arm/xiao_ble/Kconfig.board rename to boards/seeed_studio/xiao_ble/Kconfig.xiao_ble index ca317fd2451..8901b7dcbdb 100644 --- a/boards/boards_legacy/arm/xiao_ble/Kconfig.board +++ b/boards/seeed_studio/xiao_ble/Kconfig.xiao_ble @@ -4,5 +4,4 @@ # SPDX-License-Identifier: Apache-2.0 config BOARD_XIAO_BLE - bool "XIAO BLE" - depends on SOC_NRF52840_QIAA + select SOC_NRF52840_QIAA diff --git a/boards/boards_legacy/arm/xiao_ble/board.cmake b/boards/seeed_studio/xiao_ble/board.cmake similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/board.cmake rename to boards/seeed_studio/xiao_ble/board.cmake diff --git a/boards/seeed_studio/xiao_ble/board.yml b/boards/seeed_studio/xiao_ble/board.yml new file mode 100644 index 00000000000..8792dd1c8f2 --- /dev/null +++ b/boards/seeed_studio/xiao_ble/board.yml @@ -0,0 +1,5 @@ +board: + name: xiao_ble + vendor: Seeed Studio + variants: + - name: 'sense' diff --git a/boards/boards_legacy/arm/xiao_ble/doc/img/xiao_ble.jpg b/boards/seeed_studio/xiao_ble/doc/img/xiao_ble.jpg similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/doc/img/xiao_ble.jpg rename to boards/seeed_studio/xiao_ble/doc/img/xiao_ble.jpg diff --git a/boards/boards_legacy/arm/xiao_ble/doc/index.rst b/boards/seeed_studio/xiao_ble/doc/index.rst similarity index 97% rename from boards/boards_legacy/arm/xiao_ble/doc/index.rst rename to boards/seeed_studio/xiao_ble/doc/index.rst index d4d4266311b..91fecf40e21 100644 --- a/boards/boards_legacy/arm/xiao_ble/doc/index.rst +++ b/boards/seeed_studio/xiao_ble/doc/index.rst @@ -146,7 +146,7 @@ initialized before any text is printed, as below: .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: xiao_ble_sense + :board: xiao_ble/nrf52840/sense :goals: build flash :gen-args: -DCONFIG_BOOT_DELAY=5000 @@ -177,12 +177,12 @@ properly with Zephyr: .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky - :board: xiao_ble_sense + :board: xiao_ble/nrf52840/sense :goals: build flash You can build and flash the examples to make sure Zephyr is running correctly on your board. The LED definitions can be found in -:zephyr_file:`boards/arm/xiao_ble/xiao_ble_common.dtsi`. +:zephyr_file:`boards/xiao_ble/xiao_ble_common.dtsi`. Testing shell over USB in the XIAO BLE (Sense) ********************************************** @@ -203,7 +203,7 @@ with Zephyr: .. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/shell_module - :board: xiao_ble_sense + :board: xiao_ble/nrf52840/sense :goals: build flash References diff --git a/boards/boards_legacy/arm/xiao_ble/pre_dt_board.cmake b/boards/seeed_studio/xiao_ble/pre_dt_board.cmake similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/pre_dt_board.cmake rename to boards/seeed_studio/xiao_ble/pre_dt_board.cmake diff --git a/boards/boards_legacy/arm/xiao_ble/seeed_xiao_connector.dtsi b/boards/seeed_studio/xiao_ble/seeed_xiao_connector.dtsi similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/seeed_xiao_connector.dtsi rename to boards/seeed_studio/xiao_ble/seeed_xiao_connector.dtsi diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble-pinctrl.dtsi b/boards/seeed_studio/xiao_ble/xiao_ble-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble-pinctrl.dtsi rename to boards/seeed_studio/xiao_ble/xiao_ble-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble.dts b/boards/seeed_studio/xiao_ble/xiao_ble.dts similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble.dts rename to boards/seeed_studio/xiao_ble/xiao_ble.dts diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble.yaml b/boards/seeed_studio/xiao_ble/xiao_ble.yaml similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble.yaml rename to boards/seeed_studio/xiao_ble/xiao_ble.yaml diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble_common.dtsi b/boards/seeed_studio/xiao_ble/xiao_ble_common.dtsi similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble_common.dtsi rename to boards/seeed_studio/xiao_ble/xiao_ble_common.dtsi diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble_defconfig b/boards/seeed_studio/xiao_ble/xiao_ble_defconfig similarity index 73% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble_defconfig rename to boards/seeed_studio/xiao_ble/xiao_ble_defconfig index 59471d3d22a..84eb3e97f22 100644 --- a/boards/boards_legacy/arm/xiao_ble/xiao_ble_defconfig +++ b/boards/seeed_studio/xiao_ble/xiao_ble_defconfig @@ -1,28 +1,24 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_XIAO_BLE=y - # Enable MPU CONFIG_ARM_MPU=y # Enable hardware stack protection CONFIG_HW_STACK_PROTECTION=y -# enable GPIO +# Enable GPIO CONFIG_GPIO=y -# enable uart driver +# Enable UART driver CONFIG_SERIAL=y -# enable console +# Enable console CONFIG_CONSOLE=y # Logger cannot use itself to log CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y -# enable USB +# Enable USB CONFIG_USB_DEVICE_STACK=y # Build UF2 by default, supported by the Adafruit nRF52 Bootloader diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble_sense.dts b/boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.dts similarity index 100% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble_sense.dts rename to boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.dts diff --git a/boards/boards_legacy/arm/xiao_ble/xiao_ble_sense.yaml b/boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.yaml similarity index 88% rename from boards/boards_legacy/arm/xiao_ble/xiao_ble_sense.yaml rename to boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.yaml index 7d11907651a..dfb8bc4e8af 100644 --- a/boards/boards_legacy/arm/xiao_ble/xiao_ble_sense.yaml +++ b/boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense.yaml @@ -1,4 +1,4 @@ -identifier: xiao_ble_sense +identifier: xiao_ble/nrf52840/sense name: XIAO BLE Sense type: mcu arch: arm diff --git a/boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense_defconfig b/boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense_defconfig new file mode 100644 index 00000000000..ff4b012b93c --- /dev/null +++ b/boards/seeed_studio/xiao_ble/xiao_ble_nrf52840_sense_defconfig @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 + +# Required to enable LSM6DS3TR-C power +CONFIG_REGULATOR=y