Skip to content

net: lora: Get SX130x to transmit lora packets

Ben Whitten linux-devicetree lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 1 replyIn review

Changes in v1 from the cover letter

* Split up commits to sensible order and logical block sizes.
* Added DT binding for TX gain LUT.
* Fixed spelling mistakes.
* Converted metadata enums to suggested integers with suitable sizes.
* Fixed out by 1 in test transmission population.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11dt-bindings: net: lora: sx130x: add power lut bindingDocumentation/devicetree/bindings/net/lora/semtech,sx130x.yaml+13 -01 reply
2/11net: lora: sx130x: add loading of tx lut from DTdrivers/net/lora/sx130x.c drivers/net/lora/sx130x.h+31 -00 replies
3/11net: lora: sx130x: add CHRS to volatile register listdrivers/net/lora/sx130x.c+1 -00 replies
4/11net: lora: sx130x: add helper function for writing to the SX130x MCUdrivers/net/lora/sx130x.c drivers/net/lora/sx130x.h+30 -00 replies
5/11net: lora: sx130x: initialise AGCdrivers/net/lora/sx130x.c drivers/net/lora/sx130x.h+117 -00 replies
6/11net: lora: sx130x: add detail to TODO in setupdrivers/net/lora/sx130x.c+11 -10 replies
7/11net: lora: sx130x: add work queue to tx pathdrivers/net/lora/sx130x.c+49 -10 replies
8/11net: lora: sx130x: add test transmissiondrivers/net/lora/sx130x.c drivers/net/lora/sx130x.h+137 -20 replies
9/11net: lora: introduce lora socket addressing for metadatainclude/linux/lora/skb.h include/uapi/linux/lora.h net/lora/dgram.c+68 -00 replies
10/11net: lora: sx130x: make use of lora address metadata in transmissiondrivers/net/lora/sx130x.c+48 -100 replies
11/11net: lora: sx130x: add patch to register fieldsdrivers/net/lora/sx130x.c drivers/net/lora/sx130x.h+205 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH lora-next 00/11] net: lora: Get SX130x to transmit lora packets

Hello,

This series adds setup nessesary to transmit lora packets from the SX1301x, it builds on the comments on the RFC [1] to a point where the card is capable of sending out a LoRa modulated signal using transmission paramaters from the LORA socket address.

As patches have been refactored and split up extensivly to bite sized chunks they do not include individual RFC -> v1, this is covered in this letter.

The setup involves starting the firmware up inside the card by providing a LUT of its internal gain values calibrated against the card output. As this information is hardware specific it is added as a binding in the DT, with documentation to match. Binding patch is based off a commit of the basic documentation under review [2]
Not captured here are commands to set this gain table for use in devices which do not use DT.

As _stat_xmit cannot sleep we spin the tx function to a work queue so we can write to the SPI backed regmaps.

As proposed [3] as one way of getting lora packet metadata to the driver is by using the socket address to encode spreading factor, coding rate, bandwidth etc. The corresponding translation is added on the driver side, populating the test transmission with real values and has been tested to show changing bandwidths. To perform testing a tx_test [4] was used to show changing parameters on a spectrum analyser.

We also add patches to the defaults in the SX130x to fill in a TODO in our initialisation.

Thanks,
Ben Whitten

[1] http://lists.infradead.org/pipermail/linux-lpwan/2018-December/000019.html
[2] http://lists.infradead.org/pipermail/linux-lpwan/2019-January/000150.html
[3] https://events.linuxfoundation.org/wp-content/uploads/2017/12/ELCE2018_LoRa_final_Andreas-Farber.pdf slide 16
[4] https://github.com/BWhitten/lora-modules/blob/master/tx_test.c

RFC -> v1
* Split up commits to sensible order and logical block sizes.
* Added DT binding for TX gain LUT.
* Fixed spelling mistakes.
* Converted metadata enums to suggested integers with suitable sizes.
* Fixed out by 1 in test transmission population.

Ben Whitten (11):
dt-bindings: net: lora: sx130x: add power lut binding
net: lora: sx130x: add loading of tx lut from DT
net: lora: sx130x: add CHRS to volatile register list
net: lora: sx130x: add helper function for writing to the SX130x MCU
net: lora: sx130x: initialise AGC
net: lora: sx130x: add detail to TODO in setup
net: lora: sx130x: add work queue to tx path
net: lora: sx130x: add test transmission
net: lora: introduce lora socket addressing for metadata
net: lora: sx130x: make use of lora address metadata in transmission
net: lora: sx130x: add patch to register fields

 .../bindings/net/lora/semtech,sx130x.yaml     |  13 +
 drivers/net/lora/sx130x.c                     | 521 +++++++++++++++++-
 drivers/net/lora/sx130x.h                     |  97 ++++
 include/linux/lora/skb.h                      |   9 +
 include/uapi/linux/lora.h                     |  14 +
 net/lora/dgram.c                              |  45 ++
 6 files changed, 697 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1