I am using the nrf5340 with the nrf7002 as the companion Wi-Fi IC. The supply voltage to all my peripherals (3V4) is enabled when my device exits sleep (System On + Idle). All the drivers can be initialized after I enable 3V4 to the peripherals, except the Wi-Fi driver (using zephyr,deferred-init; see flash driver dts below). Is it a config that I need to enable? Alternatively, would I be able to restart the Wi-Fi driver/stack after I enable the 3V4?
Below Is the dts fragment concerning Wi-Fi and flash:
flash_spi: &spi4 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
//zephyr,deferred-init;
extflash: gd25q128e@0{
compatible = "jedec,spi-nor";
reg = <0>;
//label = "External Flash";
spi-max-frequency = <80000000>; // Actual Max is 133Mhz
size = <0x8000000>; // 0x8000000 == 134217728 bits == 16777216 Bytes == 16MB flash
has-dpd;
t-enter-dpd = <1000>;
t-exit-dpd = <1000>;
zephyr,deferred-init;//Is enabled in code after 3v4 is enabled
};
};
&qspi {
status = "okay";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
//WiFi companion IC
nrf70: nrf7002@1 {
compatible = "nordic,nrf7002-qspi";
status = "okay";
reg = <1>;
qspi-frequency = <24000000>;
qspi-quad-mode;
//Interface Pins Configs
iovdd-ctrl-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
bucken-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
host-irq-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
srrf-switch-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
//2.4G Power configs
wifi-max-tx-pwr-2g-dsss = <21>;
wifi-max-tx-pwr-2g-mcs0 = <16>;
wifi-max-tx-pwr-2g-mcs7 = <16>;
//5G Power configs
wifi-max-tx-pwr-5g-low-mcs0 = <9>;
wifi-max-tx-pwr-5g-low-mcs7 = <9>;
wifi-max-tx-pwr-5g-mid-mcs0 = <11>;
wifi-max-tx-pwr-5g-mid-mcs7 = <11>;
wifi-max-tx-pwr-5g-high-mcs0 = <13>;
wifi-max-tx-pwr-5g-high-mcs7 = <13>;
wlan0: wlan {
compatible = "nordic,wlan";
// zephyr,deferred-init;
};
// zephyr,deferred-init;
};
};