Skip to content

Commit fdd051c

Browse files
committed
doc: migration guide for new radio architecture
- sample hardware description with shields - new devicetree source configuration Signed-off-by: Krzysztof Taborowski <[email protected]>
1 parent 602b162 commit fdd051c

File tree

1 file changed

+183
-0
lines changed

1 file changed

+183
-0
lines changed
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
.. _migration_guide_addon_v110:
2+
3+
Migration guide for moving to Sidewalk Add-on v1.1.0
4+
####################################################
5+
6+
7+
Semtech radio
8+
=============
9+
10+
Key changes:
11+
- **Architecture**: from single-radio to multi-radio architecture
12+
- **Samples**: from board-specific to shield-based configuration
13+
- **Devicetree Sources**: from basic GPIO and SPI label to advanced radio description
14+
15+
radio configuration:
16+
- DTS : pinout, spi instance, tcxo, ...
17+
- subGHz_config.c
18+
19+
Samples
20+
*******
21+
22+
Sidewalk transport protocol configuration (BLE, FSK, LoRa) is chosen automatically based on hardware description. Use Zephyr shield to describe your hardware (nRF development boards and attached modules).
23+
24+
.. tabs::
25+
.. tab:: New Shield-based configuration
26+
27+
BLE only
28+
29+
.. code-block:: console
30+
31+
west build -b nrf52840dk/nrf52840
32+
33+
Semtech sx1262 radio
34+
35+
.. code-block:: console
36+
37+
west build -b nrf52840dk/nrf52840 --shield semtech_sx1262mb2cas
38+
39+
Semtech lr1110 radio
40+
41+
.. code-block:: console
42+
43+
west build -b nrf52840dk/nrf52840 --shield semtech_lr1110mb1kas
44+
45+
Semtech radio on nRF54L15 DK
46+
47+
.. code-block:: console
48+
49+
west build -b nrf54l15dk/nrf54l15/cpuapp --shield simple_arduino_adapter --shield semtech_sx1262mb2cas
50+
51+
.. tab:: Old board-specific configuration
52+
53+
BLE only
54+
55+
.. code-block:: console
56+
57+
west build -b nrf52840dk/nrf52840 -- -DCONFIG_SIDEWALK_SUBGHZ_SUPPORT=n
58+
59+
Semtech sx1262 radio
60+
61+
.. code-block:: console
62+
63+
west build -b nrf52840dk/nrf52840
64+
65+
Semtech lr1110 radio
66+
67+
Not supported
68+
69+
Semtech radio on nRF54L15 DK
70+
71+
.. code-block:: console
72+
73+
west build -b nrf54l15dk/nrf54l15/cpuapp
74+
75+
Devicetree Sources
76+
*******************
77+
78+
.. tabs::
79+
80+
.. tab:: New radio description
81+
82+
.. code-block:: dts
83+
84+
#include <zephyr/dt-bindings/lora_lbm/sx126x.h>
85+
86+
/ {
87+
chosen {
88+
zephyr,lora-transceiver = &lora_semtech_sx126xmb2xxs;
89+
};
90+
aliases {
91+
lora-transceiver = &lora_semtech_sx126xmb2xxs;
92+
};
93+
};
94+
95+
&spi30 {
96+
status = "okay";
97+
98+
cs-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
99+
100+
lora_semtech_sx126xmb2xxs: lora@0 {
101+
reg = <0>;
102+
spi-max-frequency = <DT_FREQ_M(8)>;
103+
104+
reset-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
105+
106+
busy-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
107+
108+
dio1-gpios = <&&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
109+
dio2-as-rf-switch;
110+
111+
reg-mode = <SX126X_REG_MODE_LDO>;
112+
113+
tcxo-wakeup-time = <0>;
114+
tcxo-voltage = <SX126X_TCXO_SUPPLY_1_8V>;
115+
};
116+
};
117+
118+
Notes:
119+
120+
- Compatible with ``sidewalk/dts/bindings/lora_lbm``
121+
- Semtech radio ``chosen`` as zephyr lora transceiver
122+
- Semtech radio is a sub-node for spi node
123+
124+
.. tab:: Old GPIO and SPI labels
125+
.. code-block:: dts
126+
127+
/{
128+
semtech_sx1262_gpios{
129+
compatible = "gpio-keys";
130+
semtech_sx1262_reset_gpios: reset {
131+
gpios = <&gpio2 8 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
132+
label = "semtech_sx1262 Reset";
133+
};
134+
semtech_sx1262_busy_gpios: busy {
135+
gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH)>;
136+
label = "semtech_sx1262 Busy";
137+
};
138+
semtech_sx1262_antenna_enable_gpios: antena_enable {
139+
gpios = <&gpio2 10 (GPIO_ACTIVE_HIGH)>;
140+
label = "semtech_sx1262 Antena Enable";
141+
};
142+
semtech_sx1262_dio1_gpios: dio1 {
143+
gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH|GPIO_PULL_DOWN)>;
144+
label = "semtech_sx1262 DIO1";
145+
};
146+
};
147+
};
148+
149+
sid_semtech: &spi30 {
150+
compatible = "nordic,nrf-spim";
151+
status = "okay";
152+
cs-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
153+
pinctrl-0 = <&spi30_default_alt>;
154+
pinctrl-1 = <&spi30_sleep_alt>;
155+
pinctrl-names = "default", "sleep";
156+
clock-frequency = <DT_FREQ_M(8)>;
157+
};
158+
159+
Notes:
160+
161+
- SPI instance alias ``sid_semtech``
162+
- Semtech gpios defined separately
163+
- For nRF52 with nrfx spi driver see:
164+
.. TODO: add nrfx spi snippet section
165+
166+
167+
168+
Compare Zephyr LBM and Sidewalk
169+
*******************************
170+
Rationale. Simplify moving from LoRaWAN to Sidewalk.
171+
The Semtech radio was added based on Semtech Lora Basic Modem for Zephyr project.
172+
Sidewalk configuration uses similar dts configuration, but different driver implementation.
173+
174+
Troubleshooting
175+
***************
176+
- no sidewalk in west (no boards, dts, sources)
177+
- sid_semtech left
178+
- nrfx spi as snippet (for FSK issues on nRF52)
179+
180+
181+
Links:
182+
- Nordic Academy Device Tree lesson https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-2-reading-buttons-and-controlling-leds/topic/devicetree/
183+
- Shields https://docs.nordicsemi.com/bundle/ncs-3.0.0/page/zephyr/hardware/porting/shields.html#shield_activation

0 commit comments

Comments
 (0)