From d8db9e1eb0a581d500b0ef213d782002b8e07cfb Mon Sep 17 00:00:00 2001 From: crosstyan Date: Mon, 25 May 2026 10:12:53 +0800 Subject: [PATCH] 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. --- drivers/llcc68/llcc68_raw.c | 2 +- dts/bindings/semtech,llcc68-weihua.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/llcc68/llcc68_raw.c b/drivers/llcc68/llcc68_raw.c index 7500a44..4980391 100644 --- a/drivers/llcc68/llcc68_raw.c +++ b/drivers/llcc68/llcc68_raw.c @@ -46,7 +46,7 @@ int llcc68_init(const struct device *dev) { static struct llcc68_data llcc68_data_##inst; \ static const struct llcc68_config llcc68_config_##inst = \ { \ - .spi = SPI_DT_SPEC_INST_GET(inst, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 100), \ + .spi = SPI_DT_SPEC_INST_GET(inst, SPI_WORD_SET(8) | SPI_TRANSFER_MSB), \ .reset_gpio = GPIO_DT_SPEC_INST_GET(inst, reset_gpios), \ .busy_gpio = GPIO_DT_SPEC_INST_GET(inst, busy_gpios), \ .dio1_gpio = GPIO_DT_SPEC_INST_GET(inst, dio1_gpios), \ diff --git a/dts/bindings/semtech,llcc68-weihua.yaml b/dts/bindings/semtech,llcc68-weihua.yaml index c307b38..b7905d6 100644 --- a/dts/bindings/semtech,llcc68-weihua.yaml +++ b/dts/bindings/semtech,llcc68-weihua.yaml @@ -47,3 +47,9 @@ properties: description: | Antenna switch RX enable GPIO. If set, the driver tracks the state of the radio and controls the RF switch. + + spi-cs-setup-delay-ns: + default: 100000 + + spi-cs-hold-delay-ns: + default: 100000