From 3ed1b40688bb852557711c24ea0af7187d5ba2f0 Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Mon, 16 Sep 2024 15:42:48 +0200 Subject: [PATCH] drivers: wifi: nrfwifi: determine shared iovdd and bucken from dt Currently a user, or a shield definition, must select a Kconfig to signal that the iovdd_ctrl and bucken GPIOs are connected to the same pin. We can instead check this in the driver by simply checking if the iovdd_ctrl_spec and bucken_spec are the same pin. Update the nrfwifi driver and remove the redundant NRF_WIFI_COMBINED_BUCKEN_IOVDD_GPIO config. Signed-off-by: Bjarki Arge Andreasen --- drivers/wifi/nrfwifi/Kconfig.nrfwifi | 7 ------- drivers/wifi/nrfwifi/src/qspi/src/rpu_hw_if.c | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/wifi/nrfwifi/Kconfig.nrfwifi b/drivers/wifi/nrfwifi/Kconfig.nrfwifi index cf423082b4e..d8cae0f38c8 100644 --- a/drivers/wifi/nrfwifi/Kconfig.nrfwifi +++ b/drivers/wifi/nrfwifi/Kconfig.nrfwifi @@ -664,13 +664,6 @@ config NET_MGMT_EVENT_QUEUE_SIZE default 16 endif # NRF_WIFI_RPU_RECOVERY -config NRF_WIFI_COMBINED_BUCKEN_IOVDD_GPIO - bool - help - Enable this option to use a single GPIO to control both buck enable and IOVDD enable, - there will be a internal hardware switch to add delay between the two operations. This - is typically 4ms delay for nRF70. - config NRF_WIFI_FEAT_WMM bool "WMM/QoS support" default y diff --git a/drivers/wifi/nrfwifi/src/qspi/src/rpu_hw_if.c b/drivers/wifi/nrfwifi/src/qspi/src/rpu_hw_if.c index b8b45d7f811..c5f909b4c3a 100644 --- a/drivers/wifi/nrfwifi/src/qspi/src/rpu_hw_if.c +++ b/drivers/wifi/nrfwifi/src/qspi/src/rpu_hw_if.c @@ -242,7 +242,8 @@ static int rpu_pwron(void) /* Settling time for iovdd nRF7002 DK/EK - switch (TCK106AG): ~600us */ k_msleep(1); - if (IS_ENABLED(CONFIG_NRF_WIFI_COMBINED_BUCKEN_IOVDD_GPIO)) { + if ((bucken_spec.port == iovdd_ctrl_spec.port) && + (bucken_spec.pin == iovdd_ctrl_spec.pin)) { /* When a single GPIO is used, we need a total wait time after bucken assertion * to be 6ms (1ms + 1ms + 4ms). */