Add STM32WL-specific sx126x_set_tx_params function based on the
STM32CubeWL modifications to LoRaMac-node.
Add the "power-amplifier-output" DT property to
"st,stm32wl-subghz-radio" for selecting between the RFO_LP and RFO_HP
output configurations provided by the above mentioned function.
Add the "rfo-lp-max-power" and "rfo-hp-max-power" DT properties for
defining the maximum design power of the respective outputs' matching
networks.
closes#48511
Signed-off-by: Kenneth J. Miller <ken@miller.ec>
DTS property attributes are (by default) not required.
Explicitly specifying `required: false` is redundant.
Perhaps a warning to that effect would be useful.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Add a dts node for st,stm32wl-subghz-radio. The device is integrated in
STM32WL series SoCs, and based on the sx1262, but it does not use any
gpio as all the necessary signals are internally connected to various
SoC units.
To account for that, make the redundant gpio optional in the template
files, but mark them as required in the sx1261 and sx1262 definitions,
to match with what's used in the driver.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
The SX126x supports using DIO2 to control an TX switch, but only if
the switch can be operated using a single control signal. Add support
for RF switches that are wired to a GPIO instead of the radio chip
itself. This makes it possible to use RF switches that require two
control signals (one for the RX port and one for the TX port) by
wiring them to two GPIOs on the MCU.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
Add device tree bindings for the Semtech SX1261 and SX1262
radios. These will be used by Zephyr's LoRa drivers.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
RF SPDT switches used for RX/TX selection have often power enable pin
connected to MCU's GPIO, so it is possible to disable it to save power
when not doing any data transfers. Add 'antenna-enable-gpios' property
to support such designs.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Add support for TCXO power control using GPIO pin. Some boards
(including B-L072Z-LRWAN1 already supported in Zephyr) need delay
applied after powering on TCXO, so add device-tree property allowing to
configure that as well. Cache information about TCXO power status, so
subsequent requests to enable it will not result in unnecessary delays.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
There are several antenna path designs on SX1276 compatible boards in
the wild. B-L072Z-LRWAN1 board has dedicated enable pins for RFI, RFO
and PA_BOOST. This is exactly what this patch allows to
configure. Second variant of antenna selection is done with a single
GPIO pin, which controls RF SPDT switches (input or output). This is
also supported, when either 'rfo-enable-gpios' or
'pa-boost-enable-gpios' property is provided alone (RFO/PA_BOOST is
selected only when transmitting, so there is no need for explicit
'rfi-enable-gpios' configuration).
Drop requirement for 'power-amplifier-output' DT property when there is
either 'rfo-enable-gpios' or 'pa-boost-enable-gpios' configured. Fail
using BUILD_ASSERT() when neither is specified.
Make the SX1276SetAntSw() logic similar to loramac-node examples
implementation, so RFO/PA_BOOST is enabled only in
RFLR_OPMODE_TRANSMITTER.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
PA selection mainly depends on board design. So it looks like
device-tree is a better mechanism than Kconfig in this case. Use string
property with two possible values: "rfo" and "pa-boost".
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Update the lora/sx1276 driver to the new GPIO API, using configured
active level and the replacement interrupt and active-sensitive set
APIs.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Not needed. Bindings are never concatenated together.
Makes the https://github.com/zephyrproject-rtos/ci-tools/pull/123 check
clean, though it only looks at changed files in PRs.
Clean up the header too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>