Commit Graph

3 Commits

Author SHA1 Message Date
crosstyan 1c3626d58b feat(llcc68): add configurable RF switch modes
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.
2026-06-01 18:05:31 +08:00
crosstyan d8db9e1eb0 fix(llcc68): move SPI CS delay to devicetree
Zephyr deprecates passing the chip-select delay as the variadic delay argument to SPI_DT_SPEC_INST_GET. Remove that deprecated macro argument from the raw LLCC68 device initializer.

Add spi-cs-setup-delay-ns and spi-cs-hold-delay-ns defaults to the custom LLCC68 devicetree binding. Both defaults are 100000 ns, preserving the previous 100 us delay behavior while using the current Zephyr SPI devicetree properties.

Verified with cmake -S . -B build and cmake --build build from the parent application.
2026-05-25 10:12:53 +08:00
crosstyan 2ab5617cf0 fix(dts): avoid upstream LLCC68 binding collision
Rename the application-owned LLCC68 devicetree compatible to semtech,llcc68-weihua so Zephyr releases with a native semtech,llcc68 binding can coexist with this custom driver module.

Use the registered semtech vendor prefix and a project-specific device suffix; DT_DRV_COMPAT maps to semtech_llcc68_weihua.
2026-05-19 15:54:51 +08:00