@@ -48,6 +48,16 @@ config BLUETOOTH_H5
48
48
Bluetooth three-wire (H:5) UART driver. Implementation of HCI
49
49
Three-Wire UART Transport Layer.
50
50
51
+ config BLUETOOTH_SPI
52
+ bool "SPI HCI"
53
+ select SPI
54
+ help
55
+ Supports Bluetooth ICs using SPI as the communication protocol.
56
+ HCI packets are sent and received as single Byte transferrs,
57
+ prepended after a known header. Headers may vary per device, so
58
+ additional platform specific knowlege may need to be added as
59
+ devices are. Current driver supports; ST X-NUCLEO BLE series.
60
+
51
61
config BLUETOOTH_NO_DRIVER
52
62
bool "No default HCI driver"
53
63
help
@@ -73,6 +83,17 @@ config BLUETOOTH_UART_ON_DEV_NAME
73
83
This option specifies the name of UART device to be used
74
84
for Bluetooth.
75
85
86
+ config BLUETOOTH_SPI_DEV_NAME
87
+ string "Device Name of SPI Device for Bluetooth"
88
+ default "SPI_0"
89
+ depends on BLUETOOTH_SPI
90
+ help
91
+ This option specifies the name of SPI device to be used for Bluetooth.
92
+ On the controller side, this SPI device is used to encapsulate the
93
+ RAW HCI frames to send further up the stack. On the BLE stack side,
94
+ this device is used to reply back with HCI frames that are sent over
95
+ the air.
96
+
76
97
# Headroom that the driver needs for sending and receiving buffers.
77
98
# Add a new 'default' entry for each new driver.
78
99
@@ -84,6 +105,7 @@ config BLUETOOTH_HCI_SEND_RESERVE
84
105
default 0
85
106
default 0 if BLUETOOTH_H4
86
107
default 1 if BLUETOOTH_H5
108
+ default 1 if BLUETOOTH_SPI
87
109
88
110
# Needed headroom for incoming buffers (from controller)
89
111
config BLUETOOTH_HCI_RECV_RESERVE
@@ -93,3 +115,62 @@ config BLUETOOTH_HCI_RECV_RESERVE
93
115
default 0
94
116
default 0 if BLUETOOTH_H4
95
117
default 0 if BLUETOOTH_H5
118
+
119
+ if BLUETOOTH_SPI
120
+
121
+ config BLUETOOTH_SPI_CHIP_SELECT_DEV_NAME
122
+ string "Chip Select (CS) line driver name"
123
+ help
124
+ This option specifies the name of GPIO driver controlling
125
+ the Chip Select (CS) line.
126
+
127
+ config BLUETOOTH_SPI_IRQ_DEV_NAME
128
+ string "IRQ line driver name"
129
+ help
130
+ This option specifies the name of GPIO driver controlling
131
+ the chip's IRQ line.
132
+
133
+ config BLUETOOTH_SPI_RESET_DEV_NAME
134
+ string "Reset line driver name"
135
+ help
136
+ This option specifies the name of GPIO driver controlling
137
+ the chip's Reset line.
138
+
139
+ config BLUETOOTH_SPI_CHIP_SELECT_PIN
140
+ int "SPI Chip Select (CS) line number"
141
+ help
142
+ This option specifies the Chip Select (CS) line number on the SPI
143
+ device
144
+
145
+ config BLUETOOTH_SPI_IRQ_PIN
146
+ int "SPI IRQ line number"
147
+ help
148
+ This option specifies the Reset line number on the SPI device
149
+
150
+ config BLUETOOTH_SPI_RESET_PIN
151
+ int "SPI Reset line number"
152
+ help
153
+ This option specifies the Reset line number on the SPI device
154
+
155
+ config BLUETOOTH_SPI_RX_BUFFER_SIZE
156
+ int "Receive buffer length"
157
+ default 96
158
+ help
159
+ This option specifies the size of the RX buffer. Try to keep this
160
+ as small as possible, since it's stored on the stack.
161
+
162
+ config BLUETOOTH_SPI_TX_BUFFER_SIZE
163
+ int "Transmit buffer length"
164
+ default 64
165
+ help
166
+ This option specifies the size of the TX buffer. Try to keep this
167
+ as small as possible, since it's stored on the stack.
168
+
169
+ config BLUETOOTH_SPI_MAX_CLK_FREQ
170
+ int "Maximum clock frequency for the HCI SPI interface"
171
+ default 5000000
172
+ help
173
+ This option specifies the maximum clock rate the HCI SPI
174
+ interface is capable of running at.
175
+
176
+ endif # BLUETOOTH_SPI
0 commit comments