Skip to content

bluetooth: hci: spi: configurable CS delay #93746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion drivers/bluetooth/hci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static K_KERNEL_STACK_DEFINE(spi_rx_stack, CONFIG_BT_DRV_RX_STACK_SIZE);
static struct k_thread spi_rx_thread_data;

static const struct spi_dt_spec bus = SPI_DT_SPEC_INST_GET(
0, SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8), 0);
0, SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8),
DT_INST_PROP(0, controller_cs_delay_us));

static struct spi_buf spi_tx_buf;
static struct spi_buf spi_rx_buf;
Expand Down
7 changes: 7 additions & 0 deletions dts/bindings/bluetooth/zephyr,bt-hci-spi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ properties:
Minimum duration to hold the reset-gpios pin low for.
If not specified no delay beyond the code path execution time is guaranteed.

controller-cs-delay-us:
type: int
default: 0
description:
Delay in microseconds to wait after asserting the CS line before starting the
transmission and before releasing the CS line after the transmission.

controller-data-delay-us:
type: int
default: 20
Expand Down