Skip to content

Commit

Permalink
wifi: Fix BUS selection based on board
Browse files Browse the repository at this point in the history
When the nRF7001/nRF7000 variants are introduced automatic BUS selection
based on DTS was broken. So, if a custom shield is defined then it
causes build failure.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 authored and nordicjm committed Aug 16, 2023
1 parent ceaf9f0 commit 5e301f0
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 65 deletions.
9 changes: 0 additions & 9 deletions boards/arm/nrf7002dk_nrf5340/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ endif # BOARD_NRF7002DK_NRF5340_CPUAPP_NS

endif # BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP_NS

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config NRF7001_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))

config NRF7001_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))

config BOARD
default "nrf7002dk_nrf5340_cpunet" if BOARD_NRF7002DK_NRF5340_CPUNET

Expand Down
9 changes: 0 additions & 9 deletions boards/arm/nrf7002dk_nrf7001_nrf5340/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ endif # BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF534
config BOARD
default "nrf7002dk_nrf7001_nrf5340_cpunet" if BOARD_NRF7002DK_NRF7001_NRF5340_CPUNET

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config NRF7001_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))

config NRF7001_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))

config BOARD_NRF7001
bool
default y if BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP_NS || BOARD_NRF7002DK_NRF7001_NRF5340_CPUNET
11 changes: 0 additions & 11 deletions boards/shields/nrf7002eb/Kconfig.shield
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,9 @@
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config SHIELD_NRF7002EB
def_bool $(shields_list_contains,nrf7002eb)

config NRF7002_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))
depends on SHIELD_NRF7002EB

config NRF7002_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))
depends on SHIELD_NRF7002EB

config BOARD_NRF7002
bool
default y if SHIELD_NRF7002EB
11 changes: 0 additions & 11 deletions boards/shields/nrf7002ek/Kconfig.shield
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,5 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config SHIELD_NRF7002EK
def_bool $(shields_list_contains,nrf7002ek)

config NRF7002_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))
depends on SHIELD_NRF7002EK

config NRF7002_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))
depends on SHIELD_NRF7002EK
11 changes: 0 additions & 11 deletions boards/shields/nrf7002ek_nrf7000/Kconfig.shield
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config SHIELD_NRF7002EK_NRF7000
def_bool $(shields_list_contains,nrf7002ek_nrf7000)
depends on !WPA_SUPP

config NRF7000_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))
depends on !WPA_SUPP && SHIELD_NRF7002EK_NRF7000

config NRF7000_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))
depends on !WPA_SUPP && SHIELD_NRF7002EK_NRF7000

config BOARD_NRF7000
bool
default y if SHIELD_NRF7002EK_NRF7000
12 changes: 0 additions & 12 deletions boards/shields/nrf7002ek_nrf7001/Kconfig.shield
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,9 @@
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config SHIELD_NRF7002EK_NRF7001
def_bool $(shields_list_contains,nrf7002ek_nrf7001)

config NRF7001_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))
depends on SHIELD_NRF7002EK_NRF7001

config NRF7001_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))
depends on SHIELD_NRF7002EK_NRF7001

config BOARD_NRF7001
bool
default y if SHIELD_NRF7002EK_NRF7001
7 changes: 5 additions & 2 deletions drivers/wifi/nrf700x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

config WIFI_NRF700X
bool "nRF700x driver"
depends on WIFI
Expand Down Expand Up @@ -68,11 +71,11 @@ config NET_MGMT_EVENT_STACK_SIZE
default 2048 if !WPA_SUPP

config NRF700X_ON_QSPI
def_bool NRF7000_ON_QSPI || NRF7001_ON_QSPI || NRF7002_ON_QSPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))
select NRFX_QSPI

config NRF700X_ON_SPI
def_bool NRF7000_ON_SPI || NRF7001_ON_SPI || NRF7002_ON_SPI
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))
select SPI

# RF switch based coexistence
Expand Down

0 comments on commit 5e301f0

Please sign in to comment.