boards: nxp: Add frdm_rw612

Add basic board definition of the freedom rw612 board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2024-04-24 13:08:20 -05:00 committed by Anas Nashif
commit 0ae759cb96
11 changed files with 369 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#
# Copyright 2022-2023 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
if(CONFIG_NXP_RW6XX_BOOT_HEADER)
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024)
zephyr_library()
# This FCB is specific to the flash on this board, it won't work
# for boards with different flash chips. If you flash this FCB
# onto a board with a different flash chip you may break it.
# See MCUXpresso config tools for making a correct one.
zephyr_library_sources(W25Q512JVFIQ_FCB.c)
endif()

View file

@ -0,0 +1,5 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0
config BOARD_FRDM_RW612
select SOC_PART_NUMBER_RW612ETA2I

View file

@ -0,0 +1,106 @@
/*
* Copyright 2021-2024 NXP
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <flash_config.h>
__attribute__((section(".flash_conf"), used)) const fc_flexspi_nor_config_t
flexspi_config = {
.memConfig = {
.tag = FC_BLOCK_TAG,
.version = FC_BLOCK_VERSION,
.readSampleClkSrc = 1,
.csHoldTime = 3,
.csSetupTime = 3,
.deviceModeCfgEnable = 1,
.deviceModeSeq = {.seqNum = 1, .seqId = 2},
.deviceModeArg = 0x02,
.configCmdEnable = 0,
.deviceType = 0x1,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = 5,
.sflashA1Size = 0x4000000U,
.sflashA2Size = 0,
.sflashB1Size = 0,
.sflashB2Size = 0,
.lookupTable = {
[0] = FC_FLEXSPI_LUT_SEQ(
FC_CMD_SDR, FC_FLEXSPI_1PAD, 0xEC,
FC_RADDR_SDR, FC_FLEXSPI_4PAD,
0x20),
[1] = FC_FLEXSPI_LUT_SEQ(
FC_MODE8_SDR, FC_FLEXS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FFF,
};

View file

@ -0,0 +1,9 @@
# Copyright 2022-2023 NXP
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=RW612" "--reset-after-load")
board_runner_args(linkserver "--device=RW612:RDRW612")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)

View file

@ -0,0 +1,5 @@
board:
name: frdm_rw612
vendor: nxp
socs:
- name: rw612

View file

@ -0,0 +1,116 @@
.. _frdm_rw612:
NXP FRDM_RW612
##############
Overview
********
The RW612 is a highly integrated, low-power tri-radio wireless MCU with an
integrated 260 MHz ARM Cortex-M33 MCU and Wi-Fi 6 + Bluetooth Low Energy (LE) 5.3 / 802.15.4
radios designed for a broad array of applications, including connected smart home devices,
gaming controllers, enterprise and industrial automation, smart accessories and smart energy.
The RW612 MCU subsystem includes 1.2 MB of on-chip SRAM and a high-bandwidth Quad SPI interface
with an on-the-fly decryption engine for securely accessing off-chip XIP flash.
The advanced design of the RW612 delivers tight integration, low power and highly secure
operation in a space- and cost-efficient wireless MCU requiring only a single 3.3V power supply.
Hardware
********
- 260 MHz ARM Cortex-M33, tri-radio cores for Wifi 6 + BLE 5.3 + 802.15.4
- 1.2 MB on-chip SRAM
Supported Features
==================
+-----------+------------+-----------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+===================================+
| NVIC | on-chip | nested vector interrupt controller|
+-----------+------------+-----------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-----------------------------------+
| MCI_IOMUX | on-chip | pinmux |
+-----------+------------+-----------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-----------------------------------+
| USART | on-chip | serial |
+-----------+------------+-----------------------------------+
The default configuration can be found in the defconfig file:
:zephyr_file:`boards/nxp/frdm_rw612/frdm_rw612_defconfig`
Other hardware features are not currently supported
Programming and Debugging
*************************
Build and flash applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Configuring a Debug Probe
=========================
A debug probe is used for both flashing and debugging the board. This board is
configured by default to use the JLink Firmware.
Configuring a Console
=====================
Connect a USB cable from your PC to J10, and use the serial terminal of your choice
(minicom, putty, etc.) with the following settings:
- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1
Flashing
========
Here is an example for the :ref:`hello_world` application. This example uses the
:ref:`jlink-debug-host-tools` as default.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: frdm_rw612
:goals: flash
Open a serial terminal, reset the board (press the RESET button), and you should
see the following message in the terminal:
.. code-block:: console
***** Booting Zephyr OS v3.6.0 *****
Hello World! frdm_rw612
Debugging
=========
Here is an example for the :ref:`hello_world` application. This example uses the
:ref:`jlink-debug-host-tools` as default.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: frdm_rw612
:goals: debug
Open a serial terminal, step through the application in your debugger, and you
should see the following message in the terminal:
.. code-block:: console
***** Booting Zephyr OS zephyr-v3.6.0 *****
Hello World! frdm_rw612
Resources
=========
.. _RW612 Website:
https://www.nxp.com/products/wireless-connectivity/wi-fi-plus-bluetooth-plus-802-15-4/wireless-mcu-with-integrated-tri-radiobr1x1-wi-fi-6-plus-bluetooth-low-energy-5-3-802-15-4:RW612

View file

@ -0,0 +1,16 @@
/*
* Copyright 2022-2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <nxp/rw/RW612-pinctrl.h>
&pinctrl {
pinmux_flexcomm3_usart: pinmux_flexcomm3_usart {
group0 {
pinmux = <IO_MUX_FC3_USART_DATA>;
slew-rate = "normal";
};
};
};

View file

@ -0,0 +1,57 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <nxp/nxp_rw6xx.dtsi>
#include "frdm_rw612-pinctrl.dtsi"
/ {
model = "nxp,frdm_rw612";
aliases {
led0 = &green_led;
};
chosen {
zephyr,sram = &sram_data;
zephyr,flash = &w25q512jvfiq;
zephyr,console = &flexcomm3;
};
leds {
compatible = "gpio-leds";
green_led: led_1 {
gpios = <&hsgpio0 12 0>;
};
};
};
&flexcomm3 {
compatible = "nxp,lpc-usart";
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&pinmux_flexcomm3_usart>;
pinctrl-names = "default";
};
&hsgpio0 {
status = "okay";
};
&flexspi {
status = "okay";
/* Winbond external flash */
w25q512jvfiq: w25q512jvfiq@0 {
compatible = "nxp,imx-flexspi-nor";
reg = <0>;
size = <(DT_SIZE_M(512) / 8)>;
status = "okay";
erase-block-size = <4096>;
write-block-size = <1>;
spi-max-frequency = <133000000>;
};
};

View file

@ -0,0 +1,18 @@
#
# Copyright 2022-2024 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
identifier: frdm_rw612
name: NXP FRDM_RW612
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 960
flash: 65536
supported:
- gpio

View file

@ -0,0 +1,15 @@
#
# Copyright 2022 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_PINCTRL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_GPIO=y
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_TRUSTED_EXECUTION_SECURE=y

View file

@ -0,0 +1,7 @@
# Copyright 2023 NXP
# SPDX-License-Identifier: Apache-2.0
# Suppress "simple_bus_reg" on RW6XX boards as all GPIO ports use the same register.
list(APPEND EXTRA_DTC_FLAGS "-Wno-simple_bus_reg")
# Suppress "spi_bus_bridge" as flexcomm node can be used as a SPI device.
list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge")