Skip to content

Commit a8c3bed

Browse files
committed
boards: rakwireless: Add support for RAK3112
The RAK3112 WisDuo is a low-power, long-range LoRaWAN module based on the Espressif ESP32-S3 Signed-off-by: Kenneth Lu <kuohsianglu@gmail.com>
1 parent b8541c5 commit a8c3bed

16 files changed

+392
-0
lines changed

boards/rakwireless/rak3112/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2025 Kenneth Lu
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
5+
int
6+
default 4096 if BOARD_RAK3112_ESP32S3_PROCPU
7+
default 256 if BOARD_RAK3112_ESP32S3_APPCPU
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2025 Kenneth Lu
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_RAK3112
5+
select SOC_ESP32S3_R2
6+
select SOC_ESP32S3_PROCPU if BOARD_RAK3112_ESP32S3_PROCPU
7+
select SOC_ESP32S3_APPCPU if BOARD_RAK3112_ESP32S3_APPCPU
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2025 Kenneth Lu
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
choice BOOTLOADER
5+
default BOOTLOADER_MCUBOOT
6+
endchoice
7+
8+
choice BOOT_SIGNATURE_TYPE
9+
default BOOT_SIGNATURE_TYPE_NONE
10+
endchoice
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2025 Kenneth Lu
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
5+
set(OPENOCD OPENOCD-NOTFOUND)
6+
endif()
7+
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
8+
9+
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
10+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: rak3112
3+
full_name: RAK3112
4+
vendor: rakwireless
5+
socs:
6+
- name: esp32s3
37.2 KB
Loading
8.77 KB
Loading
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.. zephyr:board:: rak3112
2+
3+
Overview
4+
********
5+
6+
The RAK3112 is a low-power, long-range LoRaWAN module based on the
7+
Espressif ESP32-S3 MCU with an integrated Semtech SX1262 LoRa
8+
transceiver. Supporting LoRa, BLE, and Wi-Fi, this module is ideal for
9+
various IoT applications such as home automation, sensor networks,
10+
building automation, and other IoT network applications.
11+
12+
Hardware
13+
********
14+
15+
It is designed for easy access to the pins on the board and to simplify the evaluation of the RAK3112
16+
module.
17+
18+
The main hardware features are:
19+
20+
- RAK3112 based on Espressif ESP32-S3, dual-core Xtensa® LX7 CPU up to 240 MHz
21+
- Semtech SX1262 for LoRa® modulations
22+
- Integrated 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth® LE 5
23+
- 512 KB of SRAM and 384 KB of ROM on the chip
24+
- IPEX connectors for the antennas
25+
- I/O ports:
26+
27+
- UART
28+
- I2C
29+
- SPI
30+
- GPIO
31+
- ADC
32+
33+
.. image:: img/pinout.webp
34+
:align: center
35+
:alt: RAK3112-pinout
36+
37+
For more information about the RAK3112 stamp module:
38+
39+
- `WisDuo RAK3112 Website`_
40+
- `Espressif ESP32-S3 Website`_
41+
42+
Supported Features
43+
==================
44+
45+
.. zephyr:board-supported-hw::
46+
47+
System requirements
48+
*******************
49+
50+
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
51+
below to retrieve those files.
52+
53+
.. code-block:: console
54+
55+
west blobs fetch hal_espressif
56+
57+
.. note::
58+
59+
It is recommended running the command above after :file:`west update`.
60+
61+
Programming and Debugging
62+
*************************
63+
64+
.. zephyr:board-supported-runners::
65+
66+
.. include:: ../../../espressif/common/building-flashing.rst
67+
:start-after: espressif-building-flashing
68+
69+
.. include:: ../../../espressif/common/board-variants.rst
70+
:start-after: espressif-board-variants
71+
72+
References
73+
**********
74+
75+
.. target-notes::
76+
77+
.. _WisDuo RAK3112 Website:
78+
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK3112-Module/Overview/
79+
80+
.. _Espressif ESP32-S3 Website:
81+
https://www.espressif.com/en/products/socs/esp32-s3
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright (c) 2025 Kenneth Lu
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
7+
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
8+
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h>
9+
10+
&pinctrl {
11+
12+
i2c0_default: i2c0_default {
13+
group1 {
14+
pinmux = <I2C0_SDA_GPIO9>, <I2C0_SCL_GPIO40>;
15+
bias-pull-up;
16+
drive-open-drain;
17+
output-high;
18+
};
19+
};
20+
21+
i2c1_default: i2c1_default {
22+
group1 {
23+
pinmux = <I2C1_SDA_GPIO17>, <I2C1_SCL_GPIO18>;
24+
bias-pull-up;
25+
drive-open-drain;
26+
output-high;
27+
};
28+
};
29+
30+
spim2_default: spim2_default {
31+
group1 {
32+
pinmux = <SPIM2_MISO_GPIO3>,
33+
<SPIM2_SCLK_GPIO5>,
34+
<SPIM2_CSEL_GPIO7>;
35+
};
36+
37+
group2 {
38+
pinmux = <SPIM2_MOSI_GPIO6>;
39+
output-low;
40+
};
41+
};
42+
43+
spim3_default: spim3_default {
44+
group1 {
45+
pinmux = <SPIM3_MISO_GPIO10>,
46+
<SPIM3_SCLK_GPIO13>,
47+
<SPIM3_CSEL_GPIO12>;
48+
};
49+
50+
group2 {
51+
pinmux = <SPIM3_MOSI_GPIO11>;
52+
output-low;
53+
};
54+
};
55+
56+
uart0_default: uart0_default {
57+
group1 {
58+
pinmux = <UART0_TX_GPIO43>;
59+
output-high;
60+
};
61+
62+
group2 {
63+
pinmux = <UART0_RX_GPIO44>;
64+
bias-pull-up;
65+
};
66+
};
67+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Kenneth Lu
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
#include <espressif/esp32s3/esp32s3_r2.dtsi>
8+
#include <espressif/partitions_0x0_amp_16M.dtsi>
9+
10+
/ {
11+
model = "RAK3112 APPCPU";
12+
compatible = "rakwireless,rak3112";
13+
14+
chosen {
15+
zephyr,sram = &sram1;
16+
zephyr,ipc_shm = &shm0;
17+
zephyr,ipc = &ipm0;
18+
zephyr,flash = &flash0;
19+
zephyr,code-partition = &slot0_appcpu_partition;
20+
};
21+
};
22+
23+
&flash0 {
24+
reg = <0x0 DT_SIZE_M(16)>;
25+
};
26+
27+
&trng0 {
28+
status = "okay";
29+
};

0 commit comments

Comments
 (0)