-
Notifications
You must be signed in to change notification settings - Fork 8.1k
boards: rakwireless: Add support for RAK3112 #96533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) 2025 Kenneth Lu | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config HEAP_MEM_POOL_ADD_SIZE_BOARD | ||
int | ||
default 4096 if BOARD_RAK3112_ESP32S3_PROCPU | ||
default 256 if BOARD_RAK3112_ESP32S3_APPCPU |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) 2025 Kenneth Lu | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_RAK3112 | ||
select SOC_ESP32S3_R2 | ||
select SOC_ESP32S3_PROCPU if BOARD_RAK3112_ESP32S3_PROCPU | ||
select SOC_ESP32S3_APPCPU if BOARD_RAK3112_ESP32S3_APPCPU |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
choice BOOTLOADER | ||
default BOOTLOADER_MCUBOOT | ||
endchoice | ||
|
||
choice BOOT_SIGNATURE_TYPE | ||
default BOOT_SIGNATURE_TYPE_NONE | ||
endchoice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*") | ||
set(OPENOCD OPENOCD-NOTFOUND) | ||
endif() | ||
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH) | ||
|
||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: rak3112 | ||
full_name: RAK3112 | ||
vendor: rakwireless | ||
socs: | ||
- name: esp32s3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
kuohsianglu marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
.. zephyr:board:: rak3112 | ||
|
||
Overview | ||
******** | ||
|
||
The RAK3112 is a low-power, long-range LoRaWAN module based on the | ||
Espressif ESP32-S3 MCU with an integrated Semtech SX1262 LoRa | ||
transceiver. Supporting LoRa, BLE, and Wi-Fi, this module is ideal for | ||
various IoT applications such as home automation, sensor networks, | ||
building automation, and other IoT network applications. | ||
|
||
Hardware | ||
******** | ||
|
||
It is designed for easy access to the pins on the board and to simplify the evaluation of the RAK3112 | ||
module. | ||
|
||
The main hardware features are: | ||
|
||
- RAK3112 based on Espressif ESP32-S3, dual-core Xtensa® LX7 CPU up to 240 MHz | ||
- Semtech SX1262 for LoRa® modulations | ||
- Integrated 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth® LE 5 | ||
- 512 KB of SRAM and 384 KB of ROM on the chip | ||
- IPEX connectors for the antennas | ||
- I/O ports: | ||
|
||
- UART | ||
- I2C | ||
- SPI | ||
- GPIO | ||
- ADC | ||
|
||
.. image:: img/pinout.webp | ||
:align: center | ||
:alt: RAK3112-pinout | ||
|
||
For more information about the RAK3112 stamp module: | ||
|
||
- `WisDuo RAK3112 Website`_ | ||
- `Espressif ESP32-S3 Website`_ | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
|
||
System requirements | ||
******************* | ||
|
||
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command | ||
below to retrieve those files. | ||
|
||
.. code-block:: console | ||
|
||
west blobs fetch hal_espressif | ||
|
||
.. note:: | ||
|
||
It is recommended running the command above after :file:`west update`. | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
.. zephyr:board-supported-runners:: | ||
|
||
.. include:: ../../../espressif/common/building-flashing.rst | ||
:start-after: espressif-building-flashing | ||
|
||
.. include:: ../../../espressif/common/board-variants.rst | ||
:start-after: espressif-board-variants | ||
|
||
References | ||
********** | ||
|
||
.. target-notes:: | ||
|
||
.. _WisDuo RAK3112 Website: | ||
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK3112-Module/Overview/ | ||
|
||
.. _Espressif ESP32-S3 Website: | ||
https://www.espressif.com/en/products/socs/esp32-s3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (c) 2025 Kenneth Lu | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h> | ||
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h> | ||
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h> | ||
|
||
&pinctrl { | ||
|
||
i2c0_default: i2c0_default { | ||
group1 { | ||
pinmux = <I2C0_SDA_GPIO9>, <I2C0_SCL_GPIO40>; | ||
bias-pull-up; | ||
drive-open-drain; | ||
output-high; | ||
}; | ||
}; | ||
|
||
i2c1_default: i2c1_default { | ||
group1 { | ||
pinmux = <I2C1_SDA_GPIO17>, <I2C1_SCL_GPIO18>; | ||
bias-pull-up; | ||
drive-open-drain; | ||
output-high; | ||
}; | ||
}; | ||
|
||
spim2_default: spim2_default { | ||
group1 { | ||
pinmux = <SPIM2_MISO_GPIO3>, | ||
<SPIM2_SCLK_GPIO5>, | ||
<SPIM2_CSEL_GPIO7>; | ||
}; | ||
|
||
group2 { | ||
kuohsianglu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pinmux = <SPIM2_MOSI_GPIO6>; | ||
output-low; | ||
}; | ||
}; | ||
|
||
spim3_default: spim3_default { | ||
group1 { | ||
pinmux = <SPIM3_MISO_GPIO10>, | ||
<SPIM3_SCLK_GPIO13>, | ||
<SPIM3_CSEL_GPIO12>; | ||
}; | ||
|
||
group2 { | ||
pinmux = <SPIM3_MOSI_GPIO11>; | ||
output-low; | ||
}; | ||
}; | ||
|
||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <UART0_TX_GPIO43>; | ||
output-high; | ||
}; | ||
|
||
group2 { | ||
pinmux = <UART0_RX_GPIO44>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2025 Kenneth Lu | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <espressif/esp32s3/esp32s3_r2.dtsi> | ||
#include <espressif/partitions_0x0_amp_16M.dtsi> | ||
|
||
/ { | ||
model = "RAK3112 APPCPU"; | ||
compatible = "rakwireless,rak3112"; | ||
|
||
chosen { | ||
zephyr,sram = &sram1; | ||
zephyr,ipc_shm = &shm0; | ||
zephyr,ipc = &ipm0; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_appcpu_partition; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
reg = <0x0 DT_SIZE_M(16)>; | ||
}; | ||
|
||
&trng0 { | ||
status = "okay"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
identifier: rak3112/esp32s3/appcpu | ||
name: RAK3112 APPCPU | ||
type: mcu | ||
arch: xtensa | ||
toolchain: | ||
- zephyr | ||
supported: | ||
- uart | ||
testing: | ||
ignore_tags: | ||
- net | ||
- bluetooth | ||
- flash | ||
- cpp | ||
- posix | ||
- watchdog | ||
- logging | ||
- kernel | ||
- pm | ||
- gpio | ||
- crypto | ||
- eeprom | ||
- heap | ||
- cmsis_rtos | ||
- jwt | ||
- zdsp | ||
vendor: rakwireless |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_CLOCK_CONTROL=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
* Copyright (c) 2025 Kenneth Lu | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <espressif/esp32s3/esp32s3_r2.dtsi> | ||
#include "rak3112-pinctrl.dtsi" | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
#include <espressif/partitions_0x0_amp_16M.dtsi> | ||
#include <zephyr/dt-bindings/lora/sx126x.h> | ||
|
||
/ { | ||
model = "RAK3112 PROCPU"; | ||
compatible = "espressif,esp32s3"; | ||
|
||
aliases { | ||
i2c-1 = &i2c1; | ||
uart-0 = &uart0; | ||
watchdog0 = &wdt0; | ||
lora0 = &lora; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &sram1; | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_partition; | ||
zephyr,bt-hci = &esp32_bt_hci; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
reg = <0x0 DT_SIZE_M(16)>; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio1 { | ||
status = "okay"; | ||
}; | ||
|
||
&i2c0 { | ||
clock-frequency = <I2C_BITRATE_STANDARD>; | ||
pinctrl-0 = <&i2c0_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&spi2 { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
pinctrl-0 = <&spim2_default>; | ||
pinctrl-names = "default"; | ||
|
||
lora: lora@0 { | ||
compatible = "semtech,sx1262"; | ||
reg = <0>; | ||
reset-gpios = <&gpio 8 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; | ||
busy-gpios = <&gpio 48 GPIO_ACTIVE_HIGH>; | ||
dio1-gpios = <&gpio 47 GPIO_ACTIVE_HIGH>; | ||
antenna-enable-gpios = <&gpio 4 GPIO_ACTIVE_LOW>; | ||
dio2-tx-enable; | ||
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V8>; | ||
tcxo-power-startup-delay-ms = <5>; | ||
spi-max-frequency = <1000000>; | ||
}; | ||
}; | ||
|
||
&uart0 { | ||
status = "okay"; | ||
current-speed = <115200>; | ||
pinctrl-0 = <&uart0_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&wdt0 { | ||
status = "okay"; | ||
}; | ||
|
||
&trng0 { | ||
status = "okay"; | ||
}; | ||
|
||
&timer0 { | ||
status = "okay"; | ||
}; | ||
|
||
&timer1 { | ||
status = "okay"; | ||
}; | ||
|
||
&timer2 { | ||
status = "okay"; | ||
}; | ||
|
||
&timer3 { | ||
status = "okay"; | ||
}; | ||
|
||
&esp32_bt_hci { | ||
status = "okay"; | ||
}; | ||
|
||
&wifi { | ||
status = "okay"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
identifier: rak3112/esp32s3/procpu | ||
name: RAK3112 PROCPU | ||
type: mcu | ||
arch: xtensa | ||
toolchain: | ||
- zephyr | ||
supported: | ||
- gpio | ||
- i2c | ||
- spi | ||
- watchdog | ||
- regulator | ||
- uart | ||
- pwm | ||
- pinmux | ||
- nvs | ||
- display | ||
vendor: rakwireless |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2025 Kenneth Lu | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_GPIO=y | ||
CONFIG_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_CLOCK_CONTROL=y |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kartben for comment on file