diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51-pinctrl.dtsi b/boards/96boards/96b_carbon/96b_carbon_nrf51822-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51-pinctrl.dtsi rename to boards/96boards/96b_carbon/96b_carbon_nrf51822-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51.dts b/boards/96boards/96b_carbon/96b_carbon_nrf51822.dts similarity index 95% rename from boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51.dts rename to boards/96boards/96b_carbon/96b_carbon_nrf51822.dts index f4cd9310023..98ccd264fdf 100644 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51.dts +++ b/boards/96boards/96b_carbon/96b_carbon_nrf51822.dts @@ -6,7 +6,7 @@ /dts-v1/; #include -#include "96b_carbon_nrf51-pinctrl.dtsi" +#include "96b_carbon_nrf51822-pinctrl.dtsi" / { model = "Seeed Studio Carbon nRF51 96board"; diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51.yaml b/boards/96boards/96b_carbon/96b_carbon_nrf51822.yaml similarity index 82% rename from boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51.yaml rename to boards/96boards/96b_carbon/96b_carbon_nrf51822.yaml index 5ae43e121c7..135d5aa461b 100644 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51.yaml +++ b/boards/96boards/96b_carbon/96b_carbon_nrf51822.yaml @@ -1,4 +1,4 @@ -identifier: 96b_carbon_nrf51 +identifier: 96b_carbon/nrf51822 name: 96Boards Carbon (nRF51) type: mcu arch: arm diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig b/boards/96boards/96b_carbon/96b_carbon_nrf51822_defconfig similarity index 50% rename from boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig rename to boards/96boards/96b_carbon/96b_carbon_nrf51822_defconfig index e53e9565e4a..0a45ef65e11 100644 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig +++ b/boards/96boards/96b_carbon/96b_carbon_nrf51822_defconfig @@ -1,14 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_NRF51X=y -CONFIG_SOC_NRF51822_QFAC=y - -# enable GPIO +# Enable GPIO CONFIG_GPIO=y -# enable uart driver +# Enable UART driver CONFIG_SERIAL=y -# enable console +# Enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y diff --git a/boards/96boards/96b_carbon/96b_carbon.dts b/boards/96boards/96b_carbon/96b_carbon_stm32f401xe.dts similarity index 100% rename from boards/96boards/96b_carbon/96b_carbon.dts rename to boards/96boards/96b_carbon/96b_carbon_stm32f401xe.dts diff --git a/boards/96boards/96b_carbon/96b_carbon.yaml b/boards/96boards/96b_carbon/96b_carbon_stm32f401xe.yaml similarity index 84% rename from boards/96boards/96b_carbon/96b_carbon.yaml rename to boards/96boards/96b_carbon/96b_carbon_stm32f401xe.yaml index 1c49d2a190b..4b0c56dc5a4 100644 --- a/boards/96boards/96b_carbon/96b_carbon.yaml +++ b/boards/96boards/96b_carbon/96b_carbon_stm32f401xe.yaml @@ -1,4 +1,4 @@ -identifier: 96b_carbon +identifier: 96b_carbon/stm32f401xe name: 96Boards Carbon type: mcu arch: arm diff --git a/boards/96boards/96b_carbon/96b_carbon_defconfig b/boards/96boards/96b_carbon/96b_carbon_stm32f401xe_defconfig similarity index 100% rename from boards/96boards/96b_carbon/96b_carbon_defconfig rename to boards/96boards/96b_carbon/96b_carbon_stm32f401xe_defconfig diff --git a/boards/96boards/96b_carbon/Kconfig.96b_carbon b/boards/96boards/96b_carbon/Kconfig.96b_carbon index db253ead50e..4b8fbe6ea42 100644 --- a/boards/96boards/96b_carbon/Kconfig.96b_carbon +++ b/boards/96boards/96b_carbon/Kconfig.96b_carbon @@ -1,5 +1,10 @@ # Copyright (c) 2016 Linaro Limited. # SPDX-License-Identifier: Apache-2.0 -config BOARD_96B_CARBON +config BOARD_96B_CARBON_STM32F401XE + bool select SOC_STM32F401XE + +config BOARD_96B_CARBON_NRF51822 + bool + select SOC_NRF51822_QFAC diff --git a/boards/96boards/96b_carbon/Kconfig.defconfig b/boards/96boards/96b_carbon/Kconfig.defconfig index e9c7c71240a..fe90a4fdd4c 100644 --- a/boards/96boards/96b_carbon/Kconfig.defconfig +++ b/boards/96boards/96b_carbon/Kconfig.defconfig @@ -3,7 +3,7 @@ # Copyright (c) 2016 Linaro Limited. # SPDX-License-Identifier: Apache-2.0 -if BOARD_96B_CARBON +if BOARD_96B_CARBON_STM32F401XE config SPI_STM32_INTERRUPT default y @@ -51,4 +51,11 @@ config NET_L2_BT_ZEP1656 endif # NETWORKING -endif # BOARD_96B_CARBON +endif # BOARD_96B_CARBON_STM32F401XE + +if BOARD_96B_CARBON_NRF51822 + +config BT_CTLR + default BT + +endif # BOARD_96B_CARBON_NRF51822 diff --git a/boards/96boards/96b_carbon/board.cmake b/boards/96boards/96b_carbon/board.cmake index 2e222be114c..19e4554022e 100644 --- a/boards/96boards/96b_carbon/board.cmake +++ b/boards/96boards/96b_carbon/board.cmake @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 -board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse") +if(CONFIG_BOARD_96B_CARBON_STM32F401XE) + board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse") -include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake) + include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake) +endif() diff --git a/boards/96boards/96b_carbon/board.yml b/boards/96boards/96b_carbon/board.yml index 5d3dff7f318..79101f957be 100644 --- a/boards/96boards/96b_carbon/board.yml +++ b/boards/96boards/96b_carbon/board.yml @@ -2,4 +2,5 @@ board: name: 96b_carbon vendor: 96boards socs: - - name: stm32f401xe + - name: stm32f401xe + - name: nrf51822 diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/doc/img/96b_carbon_nrf51.jpg b/boards/96boards/96b_carbon/doc/img/96b_carbon_nrf51.jpg similarity index 100% rename from boards/boards_legacy/arm/96b_carbon_nrf51/doc/img/96b_carbon_nrf51.jpg rename to boards/96boards/96b_carbon/doc/img/96b_carbon_nrf51.jpg diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/doc/index.rst b/boards/96boards/96b_carbon/doc/nrf51822.rst similarity index 95% rename from boards/boards_legacy/arm/96b_carbon_nrf51/doc/index.rst rename to boards/96boards/96b_carbon/doc/nrf51822.rst index 5a17733d35f..0ae61cfdc8a 100644 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/doc/index.rst +++ b/boards/96boards/96b_carbon/doc/nrf51822.rst @@ -49,9 +49,8 @@ Supported Features | RADIO | on-chip | Bluetooth | +-----------+------------+-------------------------------------+ -The default configuration can be found in the defconfig file: - - ``boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig`` +The default configuration can be found in +:zephyr_file:`boards/96boards/96b_carbon/96b_carbon_nrf51822_defconfig` Connections and IOs =================== @@ -135,12 +134,12 @@ on the board and attach a wire to the nRF51822's UART output. Providing Bluetooth to 96b_carbon ********************************* -This 96b_carbon_nrf51 Zephyr configuration can be used to provide +This ``96b_carbon/nrf51822`` Zephyr board configuration can be used to provide Bluetooth functionality from the secondary nRF51822 chip to the primary STM32F401RE chip on the :ref:`96b_carbon_board`. To do this, build the ``samples/bluetooth/hci_spi/`` application -provided with Zephyr with ``BOARD=96b_carbon_nrf51``, then flash it to +provided with Zephyr with ``BOARD=96b_carbon/nrf51822``, then flash it to the nRF51822 chip using the instructions :ref:`above <96b_carbon_nrf51_programming>`. (For instructions on how to build a Zephyr application, see :ref:`build_an_application`.) diff --git a/boards/96boards/96b_carbon/doc/index.rst b/boards/96boards/96b_carbon/doc/stm32f401xe.rst similarity index 96% rename from boards/96boards/96b_carbon/doc/index.rst rename to boards/96boards/96b_carbon/doc/stm32f401xe.rst index bd4b88aa6cd..ff875faf46b 100644 --- a/boards/96boards/96b_carbon/doc/index.rst +++ b/boards/96boards/96b_carbon/doc/stm32f401xe.rst @@ -15,13 +15,13 @@ the Cortex-M4 CPU over SPI for Bluetooth LE connectivity. Even though both chips exist on the same physical board, they must be programmed separately: -- The ``96b_carbon`` configuration is used when developing programs for +- The ``96b_carbon/stm32f401xe`` configuration is used when developing programs for the main chip on the board, the STM32F401RET. Users will likely want to write applications targeting this chip, using the ``96b_carbon`` configuration, since it is connected to all of the breakout I/O headers. -- The ``96b_carbon_nrf51`` configuration should be used for programming +- The ``96b_carbon/nrf51822`` configuration should be used for programming the secondary nRF51822 chip. Most users will likely not develop applications for this chip, since Zephyr already provides a sample application that can be flashed onto the nRF51822 @@ -73,8 +73,8 @@ More information about STM32F401RE can be found here: Supported Features ================== -The Zephyr 96b_carbon board configuration supports the following hardware -features: +The Zephyr ``96b_carbon/stm32f401xe`` board configuration supports the following +hardware features: +------------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | @@ -303,7 +303,7 @@ Then build and flash an application. Here is an example for the .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: 96b_carbon + :board: 96b_carbon/stm32f401xe :goals: build flash Connect the micro-USB cable to the USB UART (FTDI) port and to your computer. @@ -344,7 +344,7 @@ in general, see :ref:`build_an_application`. .. zephyr-app-commands:: :zephyr-app: samples/bluetooth/ipsp - :board: 96b_carbon + :board: 96b_carbon/stm32f401xe :goals: build flash #. Refer to the instructions in :ref:`bluetooth-ipsp-sample` for how @@ -357,7 +357,7 @@ further Bluetooth application development. Debugging ========= -The 96b_carbon can be debugged by installing a 100 mil (0.1 inch) header +The ``96b_carbon/stm32f401xe`` board can be debugged by installing a 100 mil (0.1 inch) header into the header at the bottom right hand side of the board, and attaching an SWD debugger to the 3V3 (3.3V), GND, CLK, DIO, and RST pins on that header. Then apply power to the 96Boards Carbon via one diff --git a/boards/96boards/96b_carbon/pre_dt_board.cmake b/boards/96boards/96b_carbon/pre_dt_board.cmake new file mode 100644 index 00000000000..2b6fc0edc87 --- /dev/null +++ b/boards/96boards/96b_carbon/pre_dt_board.cmake @@ -0,0 +1,8 @@ +# Copyright (c) 2022 Nordic Semiconductor +# SPDX-License-Identifier: Apache-2.0 + +if("${BOARD_IDENTIFIER}" STREQUAL "/nrf51822") + # Suppress "unique_unit_address_if_enabled" to handle the following overlaps: + # - power@40000000 & clock@40000000 & nrf-mpu@40000000 + list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") +endif() diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/Kconfig.board b/boards/boards_legacy/arm/96b_carbon_nrf51/Kconfig.board deleted file mode 100644 index 71833ec87c8..00000000000 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# 96Boards Carbon nRF51 board configuration - -# Copyright (c) 2016, 2017 Linaro Limited. -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_96B_CARBON_NRF51 - bool "96Boards Carbon (nRF51)" - depends on SOC_NRF51822_QFAC diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/Kconfig.defconfig b/boards/boards_legacy/arm/96b_carbon_nrf51/Kconfig.defconfig deleted file mode 100644 index 87875314cd3..00000000000 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/Kconfig.defconfig +++ /dev/null @@ -1,14 +0,0 @@ -# 96Boards Carbon nRF51 board default configuration - -# Copyright (c) 2016, 2017 Linaro Limited. -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_96B_CARBON_NRF51 - -config BOARD - default "96b_carbon_nrf51" - -config BT_CTLR - default BT - -endif # BOARD_96B_CARBON_NRF51 diff --git a/boards/boards_legacy/arm/96b_carbon_nrf51/pre_dt_board.cmake b/boards/boards_legacy/arm/96b_carbon_nrf51/pre_dt_board.cmake deleted file mode 100644 index 5cdf5c021e8..00000000000 --- a/boards/boards_legacy/arm/96b_carbon_nrf51/pre_dt_board.cmake +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -# Suppress "unique_unit_address_if_enabled" to handle the following overlaps: -# - power@40000000 & clock@40000000 & nrf-mpu@40000000 -list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")