drivers: wifi: Swctrl1 configuration for coex
Support to configure swctrl1 as input or output for coexistence. Signed-off-by: Murali Thokala <Murali.Thokala@nordicsemi.no>
This commit is contained in:
parent
a934af8f89
commit
03c5f5f083
3 changed files with 32 additions and 1 deletions
|
@ -182,6 +182,18 @@ config NRF70_SR_COEX_RF_SWITCH
|
|||
If this GPIO is asserted (1), the SR side RF switch is connected to the Wi-Fi side (shared antenna).
|
||||
If this GPIO is de-asserted (0), the SR side RF switch is connected to the SR side (separate antenna).
|
||||
|
||||
config NRF70_SR_COEX_SLEEP_CTRL_GPIO_CTRL
|
||||
bool "Configuration of GPIO control for coexistence"
|
||||
default y
|
||||
|
||||
config NRF70_SR_COEX_SWCTRL1_OUTPUT
|
||||
int "Configure SWCTRIL1 as output"
|
||||
default 0
|
||||
|
||||
config NRF70_SR_COEX_BT_GRANT_ACTIVE_LOW
|
||||
int "Configure BT grant active low"
|
||||
default 1
|
||||
|
||||
config NRF70_WORKQ_STACK_SIZE
|
||||
int "Stack size for workqueue"
|
||||
default 4096
|
||||
|
|
|
@ -103,7 +103,7 @@ const uint16_t config_buffer_5G[] = {
|
|||
/* Shared antenna */
|
||||
const uint32_t ch_config_sha[] = {
|
||||
0x00000028, 0x00000000, 0x001e1023, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000021, 0x000002ca, 0x00000050, 0x00000000,
|
||||
0x00000000, 0x00000021, 0x000002ca, 0x0000005A, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000
|
||||
};
|
||||
|
|
|
@ -582,6 +582,13 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_add_zep(struct nrf_wifi_drv_priv_zep *drv
|
|||
|
||||
unsigned int fw_ver = 0;
|
||||
|
||||
#if defined(CONFIG_NRF70_SR_COEX_SLEEP_CTRL_GPIO_CTRL) && \
|
||||
defined(CONFIG_NRF70_SYSTEM_MODE)
|
||||
unsigned int alt_swctrl1_function_bt_coex_status1 =
|
||||
(~CONFIG_NRF70_SR_COEX_SWCTRL1_OUTPUT) & 0x1;
|
||||
unsigned int invert_bt_coex_grant_output = CONFIG_NRF70_SR_COEX_BT_GRANT_ACTIVE_LOW;
|
||||
#endif /* CONFIG_NRF70_SR_COEX_SLEEP_CTRL_GPIO_CTRL && CONFIG_NRF70_SYSTEM_MODE */
|
||||
|
||||
rpu_ctx_zep = &drv_priv_zep->rpu_ctx_zep;
|
||||
|
||||
rpu_ctx_zep->drv_priv_zep = drv_priv_zep;
|
||||
|
@ -625,6 +632,18 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_add_zep(struct nrf_wifi_drv_priv_zep *drv
|
|||
|
||||
configure_board_dep_params(&board_params);
|
||||
|
||||
#if defined(CONFIG_NRF70_SR_COEX_SLEEP_CTRL_GPIO_CTRL) && \
|
||||
defined(CONFIG_NRF70_SYSTEM_MODE)
|
||||
LOG_INF("Configuring SLEEP CTRL GPIO control register\n");
|
||||
status = nrf_wifi_coex_config_sleep_ctrl_gpio_ctrl(rpu_ctx_zep->rpu_ctx,
|
||||
alt_swctrl1_function_bt_coex_status1,
|
||||
invert_bt_coex_grant_output);
|
||||
if (status != NRF_WIFI_STATUS_SUCCESS) {
|
||||
LOG_ERR("%s: Failed to configure GPIO control register", __func__);
|
||||
goto err;
|
||||
}
|
||||
#endif /* CONFIG_NRF70_SR_COEX_SLEEP_CTRL_GPIO_CTRL && CONFIG_NRF70_SYSTEM_MODE */
|
||||
|
||||
#ifdef CONFIG_NRF70_RADIO_TEST
|
||||
status = nrf_wifi_rt_fmac_dev_init(rpu_ctx_zep->rpu_ctx,
|
||||
#ifdef CONFIG_NRF_WIFI_LOW_POWER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue