1c3626d58b
Add an explicit rf-switch-mode devicetree property for LLCC68 instances, covering no switch handling, TXEN/RXEN complementary GPIO control, and DIO2 single-pin control for PE4259-style RF switches. Preserve the existing default behavior with an auto Kconfig default that only enables complementary GPIO handling when both TXEN and RXEN GPIOs are present. Resolve the RF switch mode into llcc68_config at build time and validate incompatible devicetree combinations with BUILD_ASSERT checks. Configure optional RXEN GPIO handling for DIO2 single-pin mode and keep DIO2 RF switch control disabled unless that mode is selected. Replace the old fire-and-forget TX/RX GPIO helper with a result-returning mode-aware RF switch state helper, and apply it across standby, sleep, CAD, TX, RX, continuous wave, infinite preamble, and modem init paths. Add SetRxDutyCycle support with explicit raw 24-bit LLCC68 period units, plus helpers and a millisecond wrapper for callers that work in time units. Select the RX RF path before issuing the duty-cycle command so RXEN stays valid for duty-cycle listen windows.
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
# Copyright (c) 2019 Manivannan Sadhasivam
|
|
# Copyright (c) 2020 Andreas Sandberg
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
description: |
|
|
Semtech LLCC68 radio transceiver used with the Weihua application driver.
|
|
|
|
This compatible intentionally differs from Zephyr's upstream
|
|
semtech,llcc68 binding so the application-owned driver can coexist
|
|
with Zephyr releases that ship a native LLCC68 binding and driver.
|
|
|
|
compatible: "semtech,llcc68-weihua"
|
|
|
|
include: spi-device.yaml
|
|
|
|
properties:
|
|
reset-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
description: |
|
|
GPIO connected to the modem's NRESET signal.
|
|
|
|
This signal is open-drain, active-low as interpreted by the
|
|
modem.
|
|
|
|
busy-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
description: |
|
|
GPIO connected to the modem's BUSY signal.
|
|
|
|
dio1-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
description: |
|
|
GPIO connected to DIO1. This GPIO will be used as a generic
|
|
IRQ line from the chip.
|
|
|
|
tx-enable-gpios:
|
|
type: phandle-array
|
|
description: |
|
|
Antenna switch TX enable GPIO. If set, the driver tracks the
|
|
state of the radio and controls the RF switch.
|
|
|
|
rx-enable-gpios:
|
|
type: phandle-array
|
|
description: |
|
|
Antenna switch RX enable GPIO. If set, the driver tracks the
|
|
state of the radio and controls the RF switch.
|
|
|
|
rf-switch-mode:
|
|
type: string
|
|
enum:
|
|
- "none"
|
|
- "gpio-complementary"
|
|
- "dio2-single"
|
|
description: |
|
|
Optional RF switch control mode.
|
|
|
|
"none" disables RF switch handling.
|
|
|
|
"gpio-complementary" controls TXEN/RXEN from MCU GPIOs using the
|
|
complementary table:
|
|
idle: TXEN=0, RXEN=0
|
|
RX: TXEN=0, RXEN=1
|
|
TX: TXEN=1, RXEN=0
|
|
This mode requires tx-enable-gpios and rx-enable-gpios.
|
|
|
|
"dio2-single" enables LLCC68 DIO2-as-RF-switch control for TXEN.
|
|
RXEN must be externally pulled active or supplied as rx-enable-gpios,
|
|
which the driver holds active. This mode must not use tx-enable-gpios.
|
|
|
|
spi-cs-setup-delay-ns:
|
|
default: 100000
|
|
|
|
spi-cs-hold-delay-ns:
|
|
default: 100000
|