Skip to content

Commit 2887e1f

Browse files
subGHz: add lr1110
add support for lr1110 for fsk and lora transport Signed-off-by: Robert Gałat <[email protected]>
1 parent 2e60ec0 commit 2887e1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+15301
-17
lines changed

Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ config SIDEWALK_SUBGHZ_SUPPORT
2424

2525
if SIDEWALK_SUBGHZ_SUPPORT
2626

27+
choice SIDEWALK_SUBGHZ_RADIO
28+
prompt "Sub-GHz radio type"
29+
default SIDEWALK_SUBGHZ_RADIO_SX126X if SHIELD_SEMTECH_SX126xMB2xxS
30+
default SIDEWALK_SUBGHZ_RADIO_LR1110 if SHIELD_SEMTECH_LR1110MB1xxS
31+
help
32+
Choose the sub-GHz radio type for Sidewalk.
33+
34+
config SIDEWALK_SUBGHZ_RADIO_SX126X
35+
bool "Semtech SX126X"
36+
37+
config SIDEWALK_SUBGHZ_RADIO_LR1110
38+
bool "Semtech LR1110 [EXPERIMENTAL]"
39+
select EXPERIMENTAL
40+
41+
endchoice # SIDEWALK_SUBGHZ_RADIO
42+
2743
config SIDEWALK_SUBGHZ_TRIM_CAP_VAL
2844
hex "value for trim cap used by subGHz radio"
2945
range 0x0 0xFFFF
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Semtech Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_SEMTECH_LR1110MB1xxS
5+
def_bool $(shields_list_contains,semtech_lr1110mb1xxs)
6+
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.. semtech_lr11xxmb1xxs:
2+
3+
Semtech LR11xxMB1xxS LoRa Shields
4+
#################################
5+
6+
Overview
7+
********
8+
9+
Semtech provides a series of Arduino compatible shields based on their LoRa
10+
transceivers LR1110, LR1120, and LR1121.
11+
Those shields are mostly similar and include a LIS2DE12 3-axis i2c accelerometer
12+
from STMicroelectronics.
13+
14+
More information about the shield can be found at the `mbed LR1110MB1xxS
15+
website`_.
16+
17+
Pins Assignment of the Semtech LR1110MB1xxS LoRa Shield
18+
=======================================================
19+
20+
+-------------+---------------------+
21+
| Shield Pin | Function |
22+
+=============+=====================+
23+
| A0 | LR1110 NRESET |
24+
+-------------+---------------------+
25+
| A1 | 32kHz Osc out |
26+
+-------------+---------------------+
27+
| A2 | LR111x / LR1110 |
28+
+-------------+---------------------+
29+
| A3 | LNA Control |
30+
+-------------+---------------------+
31+
| A4 | LED TX |
32+
+-------------+---------------------+
33+
| A5 | LED RX |
34+
+-------------+---------------------+
35+
| D2 | To Display Shield |
36+
+-------------+---------------------+
37+
| D3 | LR1110 DIO0 (BUSY) |
38+
+-------------+---------------------+
39+
| D4 | LED Sniffing |
40+
+-------------+---------------------+
41+
| D5 | LR1110 DIO9 |
42+
+-------------+---------------------+
43+
| D7 | LR1110 SPI NSS |
44+
+-------------+---------------------+
45+
| D8 | MEMS Accel INT1 |
46+
+-------------+---------------------+
47+
| D9 | Display D/C |
48+
+-------------+---------------------+
49+
| D10 | Display CS |
50+
+-------------+---------------------+
51+
| D11 | LR1110 SPI MOSI |
52+
+-------------+---------------------+
53+
| D12 | LR1110 SPI MISO |
54+
+-------------+---------------------+
55+
| D13 | LR1110 SPI SCK |
56+
+-------------+---------------------+
57+
| D14 | MEMS+EEPROM i2c SDA |
58+
+-------------+---------------------+
59+
| D15 | MEMS+EEPROM i2c SCL |
60+
+-------------+---------------------+
61+
62+
LR1110 and LR1120 based shields use a TCXO and LR1121 based shields use a crystal.
63+
64+
Requirements
65+
************
66+
67+
This shield can only be used with a board which provides a configuration for
68+
Arduino connectors and defines node aliases for SPI and GPIO interfaces (see
69+
:ref:`shields` for more details).
70+
71+
Programming
72+
***********
73+
74+
Set ``-DSHIELD=semtech_lr1110mb1xxs`` when you invoke ``west build``. For
75+
example:
76+
77+
.. zephyr-app-commands::
78+
:zephyr-app: samples/subsys/lorawan/class_a
79+
:board: nucleo_l073rz
80+
:shield: semtech_lr1110mb1xxs
81+
:goals: build
82+
83+
References
84+
**********
85+
86+
.. target-notes::
87+
88+
.. _mbed LR1110MB1xxS website:
89+
https://os.mbed.com/components/LR1110MB1xxS/
90+
91+
92+
License
93+
*******
94+
95+
This document Copyright (c) 2024 Semtech Corporation
96+
97+
SPDX-License-Identifier: Apache-2.0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2024 Semtech Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "semtech_lr11xxmb1xxs_common.dtsi"
8+
9+
lora_semtech_lr1110mb1xxs: &lora_semtech_lr11xxmb1xxs {
10+
compatible = "semtech,lr1110";
11+
12+
tcxo-wakeup-time = <8>;
13+
};
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/*
2+
* Copyright (c) 2024 Semtech Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/lora_lbm/lr11xx.h>
8+
9+
/ {
10+
chosen {
11+
zephyr,lora-transceiver = &lora_semtech_lr11xxmb1xxs;
12+
};
13+
aliases {
14+
lora-transceiver = &lora_semtech_lr11xxmb1xxs;
15+
};
16+
};
17+
18+
// FIXME: Is there a way to reassign the node label arduino_spi from spi2 to spi3 ?
19+
// spi2 draws way less current than spi3.
20+
&arduino_spi {
21+
status = "okay";
22+
23+
cs-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>;
24+
25+
lora_semtech_lr11xxmb1xxs: lora@0 {
26+
reg = <0>;
27+
spi-max-frequency = <DT_FREQ_M(8)>;
28+
29+
reset-gpios = <&arduino_header 0 GPIO_ACTIVE_LOW>;
30+
31+
busy-gpios = <&arduino_header 9 GPIO_ACTIVE_HIGH>;
32+
33+
event-gpios = <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
34+
35+
lf-tx-path = <LR11XX_TX_PATH_LF_LP_HP>;
36+
37+
lf-clk = <LR11XX_LFCLK_XTAL>;
38+
reg-mode = <LR11XX_REG_MODE_DCDC>;
39+
40+
rf-sw-enable = <(LR11XX_DIO5 | LR11XX_DIO6 | LR11XX_DIO7)>;
41+
rf-sw-rx-mode = <LR11XX_DIO5>;
42+
rf-sw-tx-mode = <(LR11XX_DIO5 | LR11XX_DIO6)>;
43+
rf-sw-tx-hp-mode = <LR11XX_DIO6>;
44+
rf-sw-gnss-mode = <LR11XX_DIO7>;
45+
46+
tcxo-voltage = <LR11XX_TCXO_SUPPLY_1_8V>;
47+
/* Default to XTAL board */
48+
tcxo-wakeup-time = <0>;
49+
50+
tx-power-cfg-lf-lp =
51+
// power, pa_duty_cycle, pa_hp_sel
52+
< (-15) 0x00 0x00>, // Expected output power = -17dBm
53+
< (-14) 0x00 0x00>, // Expected output power = -16dBm
54+
< (-13) 0x00 0x00>, // Expected output power = -15dBm
55+
< (-12) 0x00 0x00>, // Expected output power = -14dBm
56+
< (-11) 0x00 0x00>, // Expected output power = -13dBm
57+
< (-9) 0x00 0x00>, // Expected output power = -12dBm
58+
< (-8) 0x00 0x00>, // Expected output power = -11dBm
59+
< (-7) 0x00 0x00>, // Expected output power = -10dBm
60+
< (-6) 0x00 0x00>, // Expected output power = -9dBm
61+
< (-5) 0x00 0x00>, // Expected output power = -8dBm
62+
< (-4) 0x00 0x00>, // Expected output power = -7dBm
63+
< (-3) 0x00 0x00>, // Expected output power = -6dBm
64+
< (-2) 0x00 0x00>, // Expected output power = -5dBm
65+
< (-1) 0x00 0x00>, // Expected output power = -4dBm
66+
< ( 0) 0x00 0x00>, // Expected output power = -3dBm
67+
< ( 1) 0x00 0x00>, // Expected output power = -2dBm
68+
< ( 2) 0x00 0x00>, // Expected output power = -1dBm
69+
< ( 3) 0x00 0x00>, // Expected output power = 0dBm
70+
< ( 3) 0x01 0x00>, // Expected output power = 1dBm
71+
< ( 4) 0x01 0x00>, // Expected output power = 2dBm
72+
< ( 7) 0x00 0x00>, // Expected output power = 3dBm
73+
< ( 8) 0x00 0x00>, // Expected output power = 4dBm
74+
< ( 9) 0x00 0x00>, // Expected output power = 5dBm
75+
< ( 10) 0x00 0x00>, // Expected output power = 6dBm
76+
< ( 12) 0x00 0x00>, // Expected output power = 7dBm
77+
< ( 13) 0x00 0x00>, // Expected output power = 8dBm
78+
< ( 14) 0x00 0x00>, // Expected output power = 9dBm
79+
< ( 13) 0x01 0x00>, // Expected output power = 10dBm
80+
< ( 13) 0x02 0x00>, // Expected output power = 11dBm
81+
< ( 14) 0x02 0x00>, // Expected output power = 12dBm
82+
< ( 14) 0x03 0x00>, // Expected output power = 13dBm
83+
< ( 14) 0x04 0x00>, // Expected output power = 14dBm
84+
< ( 14) 0x07 0x00>; // Expected output power = 15dBm
85+
86+
tx-power-cfg-lf-hp =
87+
// power, pa_duty_cycle, pa_hp_sel
88+
< ( 9) 0x00 0x00>, // Expected output power = -9dBm
89+
< ( 10) 0x00 0x00>, // Expected output power = -8dBm
90+
< ( 11) 0x00 0x00>, // Expected output power = -7dBm
91+
< ( 12) 0x00 0x00>, // Expected output power = -6dBm
92+
< ( 13) 0x00 0x00>, // Expected output power = -5dBm
93+
< ( 13) 0x01 0x00>, // Expected output power = -4dBm
94+
< ( 13) 0x02 0x00>, // Expected output power = -3dBm
95+
< ( 17) 0x02 0x00>, // Expected output power = -2dBm
96+
< ( 14) 0x04 0x00>, // Expected output power = -1dBm
97+
< ( 12) 0x00 0x01>, // Expected output power = 0dBm
98+
< ( 13) 0x00 0x01>, // Expected output power = 1dBm
99+
< ( 13) 0x01 0x01>, // Expected output power = 2dBm
100+
< ( 13) 0x02 0x01>, // Expected output power = 3dBm
101+
< ( 15) 0x00 0x02>, // Expected output power = 4dBm
102+
< ( 15) 0x04 0x01>, // Expected output power = 5dBm
103+
< ( 14) 0x02 0x02>, // Expected output power = 6dBm
104+
< ( 14) 0x01 0x03>, // Expected output power = 7dBm
105+
< ( 17) 0x04 0x02>, // Expected output power = 8dBm
106+
< ( 22) 0x00 0x01>, // Expected output power = 9dBm
107+
< ( 22) 0x01 0x01>, // Expected output power = 10dBm
108+
< ( 22) 0x02 0x01>, // Expected output power = 11dBm
109+
< ( 22) 0x03 0x01>, // Expected output power = 12dBm
110+
< ( 22) 0x00 0x03>, // Expected output power = 13dBm
111+
< ( 22) 0x01 0x03>, // Expected output power = 14dBm
112+
< ( 22) 0x04 0x02>, // Expected output power = 15dBm
113+
< ( 22) 0x01 0x04>, // Expected output power = 16dBm
114+
< ( 22) 0x02 0x04>, // Expected output power = 17dBm
115+
< ( 22) 0x01 0x06>, // Expected output power = 18dBm
116+
< ( 22) 0x03 0x05>, // Expected output power = 19dBm
117+
< ( 22) 0x03 0x07>, // Expected output power = 20dBm
118+
< ( 22) 0x04 0x06>, // Expected output power = 21dBm
119+
< ( 22) 0x04 0x07>; // Expected output power = 22dBm
120+
121+
tx-power-cfg-hf =
122+
// power, pa_duty_cycle, pa_hp_sel
123+
< (-18) 0x04 0x00>, //Expected output power = -18dBm
124+
< (-18) 0x04 0x00>, // Expected output power = -17dBm
125+
< (-17) 0x04 0x00>, // Expected output power = -16dBm
126+
< (-16) 0x04 0x00>, // Expected output power = -15dBm
127+
< (-15) 0x04 0x00>, // Expected output power = -14dBm
128+
< (-14) 0x04 0x00>, // Expected output power = -13dBm
129+
< (-14) 0x04 0x00>, // Expected output power = -12dBm
130+
< (-12) 0x04 0x00>, // Expected output power = -11dBm
131+
< (-10) 0x04 0x00>, // Expected output power = -10dBm
132+
< ( -9) 0x04 0x00>, // Expected output power = -9dBm
133+
< ( -8) 0x04 0x00>, // Expected output power = -8dBm
134+
< ( -7) 0x04 0x00>, // Expected output power = -7dBm
135+
< ( -6) 0x04 0x00>, // Expected output power = -6dBm
136+
< ( -5) 0x04 0x00>, // Expected output power = -5dBm
137+
< ( -4) 0x04 0x00>, // Expected output power = -4dBm
138+
< ( -3) 0x04 0x00>, // Expected output power = -3dBm
139+
< ( -2) 0x03 0x00>, // Expected output power = -2dBm
140+
< ( -1) 0x04 0x00>, // Expected output power = -1dBm
141+
< ( 0) 0x04 0x00>, // Expected output power = 0dBm
142+
< ( 1) 0x00 0x00>, // Expected output power = 1dBm
143+
< ( 2) 0x00 0x00>, // Expected output power = 2dBm
144+
< ( 4) 0x04 0x00>, // Expected output power = 3dBm
145+
< ( 5) 0x04 0x00>, // Expected output power = 4dBm
146+
< ( 6) 0x04 0x00>, // Expected output power = 5dBm
147+
< ( 7) 0x04 0x00>, // Expected output power = 6dBm
148+
< ( 8) 0x04 0x00>, // Expected output power = 7dBm
149+
< ( 9) 0x04 0x00>, // Expected output power = 8dBm
150+
< ( 10) 0x04 0x00>, // Expected output power = 9dBm
151+
< ( 11) 0x04 0x00>, // Expected output power = 10dBm
152+
< ( 12) 0x03 0x00>, // Expected output power = 11dBm
153+
< ( 13) 0x04 0x00>, // Expected output power = 12dBm
154+
< ( 13) 0x00 0x00>; // Expected output power = 13dBm
155+
156+
157+
/* Tune is G4 G5 G6 G7 G8 G9 G10 G11 G12 G13 G13hp1 G13hp2 G13hp3 G13hp4 G13hp5 G13hp6 G13hp7 */
158+
rssi-calibration-lf-offset = <0>;
159+
rssi-calibration-lf-tune = <12 12 14 0 1 3 4 4 3 6 6 6 6 6 6 6 6>;
160+
161+
rssi-calibration-mf-offset = <0>;
162+
rssi-calibration-mf-tune = <2 2 2 3 3 4 5 4 4 6 5 5 6 6 6 7 6>;
163+
164+
rssi-calibration-hf-offset = <2030>;
165+
rssi-calibration-hf-tune = <6 7 6 4 3 4 14 12 14 12 12 12 12 8 8 9 9>;
166+
167+
};
168+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Semtech Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Semtech LR1110 LoRa radio module
5+
6+
compatible: "semtech,lr1110"
7+
8+
include: semtech,lr11xx-common.yaml

0 commit comments

Comments
 (0)