Skip to content

Commit 966097b

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 966097b

File tree

1 file changed

+217
-0
lines changed

1 file changed

+217
-0
lines changed
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
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+
pinctrl-0 = <&spi30_default_alt>;
98+
pinctrl-1 = <&spi30_sleep_alt>;
99+
pinctrl-names = "default", "sleep";
100+
cs-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
101+
lora_semtech_sx126xmb2xxs: lora@0 {
102+
reg = <0>;
103+
spi-max-frequency = <DT_FREQ_M(8)>;
104+
reset-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
105+
busy-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
106+
dio1-gpios = <&&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
107+
dio2-as-rf-switch;
108+
reg-mode = <SX126X_REG_MODE_LDO>;
109+
tcxo-wakeup-time = <0>;
110+
tcxo-voltage = <SX126X_TCXO_SUPPLY_1_8V>;
111+
};
112+
};
113+
114+
&pinctrl {
115+
spi30_default_alt: spi30_default_alt {
116+
group1 {
117+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
118+
<NRF_PSEL(SPIM_MISO, 0, 2)>,
119+
<NRF_PSEL(SPIM_MOSI, 0, 1)>;
120+
};
121+
};
122+
123+
spi30_sleep_alt: spi30_sleep_alt {
124+
group1 {
125+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
126+
<NRF_PSEL(SPIM_MISO, 0, 2)>,
127+
<NRF_PSEL(SPIM_MOSI, 0, 1)>;
128+
low-power-enable;
129+
};
130+
};
131+
};
132+
133+
Notes:
134+
135+
- Compatible with ``sidewalk/dts/bindings/lora_lbm``
136+
- Semtech radio ``chosen`` as zephyr lora transceiver
137+
- Semtech radio is a sub-node for spi node
138+
139+
.. tab:: Old GPIO and SPI labels
140+
.. code-block:: dts
141+
142+
/{
143+
semtech_sx1262_gpios{
144+
compatible = "gpio-keys";
145+
semtech_sx1262_reset_gpios: reset {
146+
gpios = <&gpio2 8 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
147+
label = "semtech_sx1262 Reset";
148+
};
149+
semtech_sx1262_busy_gpios: busy {
150+
gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH)>;
151+
label = "semtech_sx1262 Busy";
152+
};
153+
semtech_sx1262_antenna_enable_gpios: antena_enable {
154+
gpios = <&gpio2 10 (GPIO_ACTIVE_HIGH)>;
155+
label = "semtech_sx1262 Antena Enable";
156+
};
157+
semtech_sx1262_dio1_gpios: dio1 {
158+
gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH|GPIO_PULL_DOWN)>;
159+
label = "semtech_sx1262 DIO1";
160+
};
161+
};
162+
};
163+
164+
sid_semtech: &spi30 {
165+
compatible = "nordic,nrf-spim";
166+
status = "okay";
167+
cs-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
168+
pinctrl-0 = <&spi30_default_alt>;
169+
pinctrl-1 = <&spi30_sleep_alt>;
170+
pinctrl-names = "default", "sleep";
171+
clock-frequency = <DT_FREQ_M(8)>;
172+
};
173+
174+
&pinctrl {
175+
spi30_default_alt: spi30_default_alt {
176+
group1 {
177+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
178+
<NRF_PSEL(SPIM_MISO, 0, 2)>,
179+
<NRF_PSEL(SPIM_MOSI, 0, 1)>;
180+
};
181+
};
182+
183+
spi30_sleep_alt: spi30_sleep_alt {
184+
group1 {
185+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
186+
<NRF_PSEL(SPIM_MISO, 0, 2)>,
187+
<NRF_PSEL(SPIM_MOSI, 0, 1)>;
188+
low-power-enable;
189+
};
190+
};
191+
};
192+
193+
Notes:
194+
195+
- SPI instance alias ``sid_semtech``
196+
- Semtech gpios defined separately
197+
- For nRF52 with nrfx spi driver see:
198+
.. TODO: add nrfx spi snippet section
199+
200+
201+
202+
Compare Zephyr LBM and Sidewalk
203+
*******************************
204+
Rationale. Simplify moving from LoRaWAN to Sidewalk.
205+
The Semtech radio was added based on Semtech Lora Basic Modem for Zephyr project.
206+
Sidewalk configuration uses similar dts configuration, but different driver implementation.
207+
208+
Troubleshooting
209+
***************
210+
- no sidewalk in west (no boards, dts, sources)
211+
- sid_semtech left
212+
- nrfx spi as snippet (for FSK issues on nRF52)
213+
214+
215+
Links:
216+
- Nordic Academy Device Tree lesson https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-2-reading-buttons-and-controlling-leds/topic/devicetree/
217+
- Shields https://docs.nordicsemi.com/bundle/ncs-3.0.0/page/zephyr/hardware/porting/shields.html#shield_activation

0 commit comments

Comments
 (0)