Initial import

This commit is contained in:
2026-03-25 18:14:45 +01:00
commit d074cd2e43
99 changed files with 3781 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
if BOARD_RAK_WISMESH_POCKET
config BOARD
default "rak_wismesh_pocket"
endif # BOARD_RAK_WISMESH_POCKET

View File

@@ -0,0 +1,2 @@
config BOARD_RAK_WISMESH_POCKET
select SOC_NRF52840_QIAA

View File

@@ -0,0 +1,9 @@
# RAK WisMesh Pocket — board.cmake
# Uses nrfjprog or pyocd for flashing via SWD.
# J-Link is the recommended debugger for RAK WisBlock-family boards.
board_runner_args(nrfjprog "--nrf-family=NRF52")
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000" "--reset-after-load")
board_runner_args(pyocd "--target=nrf52840")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

View File

@@ -0,0 +1,7 @@
board:
name: rak_wismesh_pocket
full_name: "RAK WisMesh Pocket"
vendor: rak
url: https://docs.rakwireless.com/Product-Categories/WisMesh/
socs:
- name: nrf52840

View File

@@ -0,0 +1,47 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* RAK WisMesh Pocket — pin control definitions
* Matches RAK4631 GPIO assignments. Verify from WisMesh Pocket schematic.
*/
#include <nordic/nrf52840.dtsi>
#include <dt-bindings/pinctrl/nrf-pinctrl.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 19)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 18)>;
bias-pull-up;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 19)>,
<NRF_PSEL(UART_RX, 0, 18)>;
low-power-enable;
};
};
/* SPI1 for SX1262 — RAK4631 pin assignments */
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 3)>,
<NRF_PSEL(SPIM_MOSI, 1, 2)>,
<NRF_PSEL(SPIM_MISO, 1, 1)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 3)>,
<NRF_PSEL(SPIM_MOSI, 1, 2)>,
<NRF_PSEL(SPIM_MISO, 1, 1)>;
low-power-enable;
};
};
};

View File

@@ -0,0 +1,119 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* RAK WisMesh Pocket — Device Tree Source
* SoC: nRF52840 (same as RAK4631 WisBlock Core)
* Radio: SX1262
*
* The WisMesh Pocket is derived from the RAK4631 with a different
* form factor optimized for portable deployment. GPIO assignments
* are assumed identical to RAK4631; verify against the WisMesh
* Pocket schematic before using with real hardware.
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "rak_wismesh_pocket-pinctrl.dtsi"
/ {
model = "RAK WisMesh Pocket";
compatible = "rak,wismesh-pocket";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
aliases {
lora0 = &lora;
led0 = &led_green;
};
leds {
compatible = "gpio-leds";
led_green: led_0 {
/* RAK4631 green LED — verify for WisMesh Pocket */
gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
label = "Green LED";
};
};
};
&uicr {
gpio-as-nreset;
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
/*
* SX1262 on SPI1
* GPIO assignments match RAK4631 — verify for WisMesh Pocket.
*/
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
cs-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
lora: lora@0 {
compatible = "semtech,sx1262";
reg = <0>;
spi-max-frequency = <1000000>;
reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
dio1-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
dio2-tx-enable;
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_3V3>;
tcxo-power-startup-delay-ms = <5>;
};
};
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x0000C000>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000C000 0x00067000>;
};
slot1_partition: partition@73000 {
label = "image-1";
reg = <0x00073000 0x00067000>;
};
storage_partition: partition@da000 {
label = "storage";
reg = <0x000da000 0x00006000>;
};
};
};

View File

@@ -0,0 +1,8 @@
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_RAK_WISMESH_POCKET=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_NRFX_POWER=y