Skip to content
Closed
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
16 changes: 4 additions & 12 deletions drivers/wifi/nrfwifi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ zephyr_include_directories(
${OS_AGNOSTIC_BASE}/fw_if/umac_if/inc
${OS_AGNOSTIC_BASE}/fw_load/mips/fw/inc
${OS_AGNOSTIC_BASE}/hw_if/hal/inc
src/qspi/inc
# for net_sprint_ll_addr
${ZEPHYR_BASE}/subsys/net/ip
${OS_AGNOSTIC_BASE}/hw_if/hal/inc/fw
Expand Down Expand Up @@ -62,9 +61,7 @@ zephyr_library_sources(
src/shim.c
src/work.c
src/timer.c
src/qspi/src/device.c
src/qspi/src/rpu_hw_if.c
src/qspi/src/ficr_prog.c
src/ficr_prog.c
)

zephyr_library_sources_ifndef(CONFIG_NRF70_OFFLOADED_RAW_TX
Expand Down Expand Up @@ -132,14 +129,6 @@ zephyr_library_sources_ifdef(CONFIG_NRF70_PROMISC_DATA_RX
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_promisc.c
)

zephyr_library_sources_ifdef(CONFIG_NRF70_ON_QSPI
src/qspi/src/qspi_if.c
)

zephyr_library_sources_ifdef(CONFIG_NRF70_ON_SPI
src/qspi/src/spi_if.c
)

zephyr_library_sources_ifdef(CONFIG_NRF70_UTIL
src/wifi_util.c
)
Expand Down Expand Up @@ -349,3 +338,6 @@ zephyr_compile_definitions(
-DNRF_WIFI_PS_INT_PS=${CONFIG_NRF_WIFI_PS_INT_PS}
-DNRF_WIFI_RPU_RECOVERY_PS_ACTIVE_TIMEOUT_MS=${CONFIG_NRF_WIFI_RPU_RECOVERY_PS_ACTIVE_TIMEOUT_MS}
)

target_link_libraries(nrfwifi PRIVATE nrf70-buslib)

23 changes: 0 additions & 23 deletions drivers/wifi/nrfwifi/Kconfig.nrfwifi
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,6 @@ menuconfig WIFI_NRF70
Nordic Wi-Fi Driver

if WIFI_NRF70
# Hidden symbols for internal use
config WIFI_NRF7002
bool
default y if DT_HAS_NORDIC_NRF7002_SPI_ENABLED || DT_HAS_NORDIC_NRF7002_QSPI_ENABLED

config WIFI_NRF7001
bool
default y if DT_HAS_NORDIC_NRF7001_SPI_ENABLED || DT_HAS_NORDIC_NRF7001_QSPI_ENABLED

config WIFI_NRF7000
bool
default y if DT_HAS_NORDIC_NRF7000_SPI_ENABLED || DT_HAS_NORDIC_NRF7000_QSPI_ENABLED


module = WIFI_NRF70_BUS
module-dep = LOG
module-str = Log level for Wi-Fi nRF70 bus layers
module-help = Sets log level for Wi-Fi nRF70 bus layers
source "subsys/net/Kconfig.template.log_config.net"

config WIFI_NRF70_BUS_LOG_LEVEL
# Enable error by default
default 1

choice NRF70_OPER_MODES
bool "nRF70 operating modes"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "ficr_prog.h"


LOG_MODULE_DECLARE(otp_prog, CONFIG_WIFI_NRF70_BUS_LOG_LEVEL);
LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL);

Check notice on line 18 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:18 -

static void write_word(unsigned int addr, unsigned int data)
{
Expand Down Expand Up @@ -49,7 +49,7 @@
return OTP_INVALID;
}


Check notice on line 52 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:52 - unsigned int off3, unsigned int off4) -{ - if ((buff[off1] == OTP_PROGRAMMED) && - (buff[off2] == OTP_PROGRAMMED) && - (buff[off3] == OTP_PROGRAMMED) && - (buff[off4] == OTP_PROGRAMMED)) + unsigned int off3, unsigned int off4) +{ + if ((buff[off1] == OTP_PROGRAMMED) && (buff[off2] == OTP_PROGRAMMED) && + (buff[off3] == OTP_PROGRAMMED) && (buff[off4] == OTP_PROGRAMMED)) { return OTP_PROGRAMMED; - else if ((buff[off1] == OTP_FRESH_FROM_FAB) && - (buff[off2] == OTP_FRESH_FROM_FAB) && - (buff[off3] == OTP_FRESH_FROM_FAB) && - (buff[off4] == OTP_FRESH_FROM_FAB)) + } else if ((buff[off1] == OTP_FRESH_FROM_FAB) && (buff[off2] == OTP_FRESH_FROM_FAB) && + (buff[off3] == OTP_FRESH_FROM_FAB) && (buff[off4] == OTP_FRESH_FROM_FAB)) { return OTP_FRESH_FROM_FAB; - else if ((buff[off1] == OTP_ENABLE_PATTERN) && - (buff[off2] == OTP_ENABLE_PATTERN) && - (buff[off3] == OTP_ENABLE_PATTERN) && - (buff[off4] == OTP_ENABLE_PATTERN)) + } else if ((buff[off1] == OTP_ENABLE_PATTERN) && (buff[off2] == OTP_ENABLE_PATTERN) && + (buff[off3] == OTP_ENABLE_PATTERN) && (buff[off4] == OTP_ENABLE_PATTERN)) { return OTP_ENABLE_PATTERN; - else + } else { return OTP_INVALID; -} - + } +}
static void set_otp_timing_reg_40mhz(void)
{
write_word(OTP_TIMING_REG1_ADDR, OTP_TIMING_REG1_VAL);
Expand Down Expand Up @@ -81,7 +81,7 @@
}


static int otp_wr_voltage_2V5(void)

Check notice on line 84 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:84 - static int req_otp_standby_mode(void) { write_word(OTP_RWSBMODE_ADDR, 0x0); return poll_otp_ready(); } -
{
int err;

Expand Down Expand Up @@ -136,7 +136,7 @@
}


static int req_otp_byte_write_mode(void)

Check notice on line 139 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:139 -
{
write_word(OTP_RWSBMODE_ADDR, OTP_BYTE_WRITE_MODE);
return poll_otp_ready();
Expand All @@ -147,7 +147,7 @@
int err;

write_word(OTP_RDENABLE_ADDR, offset);
err = poll_otp_read_valid();

Check notice on line 150 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:150 - write_word(OTP_RDENABLE_ADDR, offset); + write_word(OTP_RDENABLE_ADDR, offset);
if (err) {
LOG_ERR("OTP read failed");
return err;
Expand All @@ -165,7 +165,7 @@
return poll_otp_wrdone();
}


Check notice on line 168 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:168 -static int write_otp_location(unsigned int otp_location_offset, unsigned int otp_data) -{ - write_word(OTP_WRENABLE_ADDR, otp_location_offset); - write_word(OTP_WRITEREG_ADDR, otp_data); +static int write_otp_location(unsigned int otp_location_offset, unsigned int otp_data) +{ + write_word(OTP_WRENABLE_ADDR, otp_location_offset); + write_word(OTP_WRITEREG_ADDR, otp_data); return poll_otp_wrdone(); } -
static int otp_rd_voltage_1V8(void)
{
int err;
Expand All @@ -192,7 +192,7 @@
}
LOG_INF("mac addr %d : Reg%d (0x%x) = 0x%04x",
index, (i+1), (MAC0_ADDR + i) << 2, write_val[i]);
}

Check notice on line 195 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:195 - LOG_INF("mac addr %d : Reg%d (0x%x) = 0x%04x", - index, (i+1), (MAC0_ADDR + i) << 2, write_val[i]); + LOG_INF("mac addr %d : Reg%d (0x%x) = 0x%04x", index, (i + 1), (MAC0_ADDR + i) << 2, + write_val[i]);
return ret;
}

Expand All @@ -200,7 +200,7 @@
{
int err = 0;
int mask_val;
int ret = 0;

Check notice on line 203 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:203 - int mask_val; + int mask_val;
int retrim_loc = 0;

err = poll_otp_ready();
Expand Down Expand Up @@ -238,7 +238,7 @@
(REGION_PROTECT+2) << 2, write_val[0]);
LOG_INF("Written REGION_PROTECT3 (0x%x) : 0x%04x",
(REGION_PROTECT+3) << 2, write_val[0]);
break;

Check notice on line 241 in drivers/wifi/nrfwifi/src/ficr_prog.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/ficr_prog.c:241 - write_otp_location(REGION_PROTECT+1, write_val[0]); - write_otp_location(REGION_PROTECT+2, write_val[0]); - write_otp_location(REGION_PROTECT+3, write_val[0]); - - LOG_INF("Written REGION_PROTECT0 (0x%x) : 0x%04x", - (REGION_PROTECT << 2), write_val[0]); - LOG_INF("Written REGION_PROTECT1 (0x%x) : 0x%04x", - (REGION_PROTECT+1) << 2, write_val[0]); - LOG_INF("Written REGION_PROTECT2 (0x%x) : 0x%04x", - (REGION_PROTECT+2) << 2, write_val[0]); - LOG_INF("Written REGION_PROTECT3 (0x%x) : 0x%04x", - (REGION_PROTECT+3) << 2, write_val[0]); + write_otp_location(REGION_PROTECT + 1, write_val[0]); + write_otp_location(REGION_PROTECT + 2, write_val[0]); + write_otp_location(REGION_PROTECT + 3, write_val[0]); + + LOG_INF("Written REGION_PROTECT0 (0x%x) : 0x%04x", (REGION_PROTECT << 2), + write_val[0]); + LOG_INF("Written REGION_PROTECT1 (0x%x) : 0x%04x", (REGION_PROTECT + 1) << 2, + write_val[0]); + LOG_INF("Written REGION_PROTECT2 (0x%x) : 0x%04x", (REGION_PROTECT + 2) << 2, + write_val[0]); + LOG_INF("Written REGION_PROTECT3 (0x%x) : 0x%04x", (REGION_PROTECT + 3) << 2, + write_val[0]);
case QSPI_KEY:
mask_val = QSPI_KEY_FLAG_MASK;
for (int i = 0; i < QSPI_KEY_LENGTH_BYTES / 4; i++) {
Expand Down
116 changes: 0 additions & 116 deletions drivers/wifi/nrfwifi/src/qspi/inc/qspi_if.h

This file was deleted.

61 changes: 0 additions & 61 deletions drivers/wifi/nrfwifi/src/qspi/inc/rpu_hw_if.h

This file was deleted.

36 changes: 0 additions & 36 deletions drivers/wifi/nrfwifi/src/qspi/inc/spi_if.h

This file was deleted.

49 changes: 0 additions & 49 deletions drivers/wifi/nrfwifi/src/qspi/inc/spi_nor.h

This file was deleted.

Loading
Loading