Hi Team,
I am trying to add the nRF7000 support, for WIFI location, to our nRF9160 custom board.
This is the lines I add to our device tree:
{
nordic_wlan0: nordic_wlan0 {
compatible = "nordic,wlan0";
status = "okay";
};
chosen {
zephyr,wifi = &nordic_wlan0;
};
nrf70_tx_power_ceiling: nrf70_tx_power_ceiling_node {
status = "okay";
compatible = "nordic,nrf700x-tx-power-ceiling";
max-pwr-2g-dsss = <0x54>;
max-pwr-2g-mcs0 = <0x40>;
max-pwr-2g-mcs7 = <0x40>;
max-pwr-5g-low-mcs0 = <0x34>;
max-pwr-5g-low-mcs7 = <0x34>;
max-pwr-5g-mid-mcs0 = <0x34>;
max-pwr-5g-mid-mcs7 = <0x34>;
max-pwr-5g-high-mcs0 = <0x30>;
max-pwr-5g-high-mcs7 = <0x30>;
};
};
&spi3 {
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
nrf700x: nrf7000@0 {
compatible = "nordic,nrf700x-spi";
status = "okay";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(8)>;
iovdd-ctrl-gpios = <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* D0 */
bucken-gpios = <&gpio0 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* D1 */
host-irq-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; /* D7 */
};
};
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 12)>,
<NRF_PSEL(SPIM_MISO, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 15)>;
nordic,drive-mode = <NRF_DRIVE_H0H1>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 12)>,
<NRF_PSEL(SPIM_MISO, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 15)>;
low-power-enable;
};
};
}prj.conf
# Network CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_NET_IPV6=y CONFIG_NET_IPV4=y # Location related configuration CONFIG_LOCATION=y CONFIG_LOCATION_METHOD_GNSS=n CONFIG_LOCATION_METHOD_CELLULAR=y CONFIG_LOCATION_METHOD_WIFI=y CONFIG_LOCATION_SERVICE_NRF_CLOUD=y CONFIG_LOCATION_REQUEST_DEFAULT_METHOD_FIRST_CELLULAR=y CONFIG_LOCATION_REQUEST_DEFAULT_METHOD_SECOND_WIFI=y CONFIG_LOCATION_DATA_DETAILS=y CONFIG_LOCATION_LOG_LEVEL_DBG=y CONFIG_LOCATION_SERVICE_EXTERNAL=n # Actual configs for the Wi-Fi CONFIG_WIFI=y CONFIG_WIFI_NRF700X=y CONFIG_WIFI_NRF700X_SKIP_LOCAL_ADMIN_MAC=y CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT=30 CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT=30 CONFIG_WPA_SUPP=n
I am using the Location library to get the location data, but during initialization I get an error:
[00:00:00.488,006] <err> location: No Wi-Fi interface found: nordic_wlan0 [00:00:00.488,067] <err> location: Failed to initialize 'Wi-Fi' method
The hardware connection is correct because I test it with sample code for nrf9160DK with the follow overlay file:
&uart1 {
status = "disabled";
};
/* Typically we use GPIO extender to resolve these conflicts but the
* GPIO pin used by extender itself conflicts with Wi-Fi (0.6), so,
* disable LEDs and Button0/1.
*/
&led0 {
status = "disabled";
};
&led1 {
status = "disabled";
};
&led2 {
status = "disabled";
};
&led3 {
status = "disabled";
};
&button0 {
status = "disabled";
};
&button1 {
status = "disabled";
};
&button2 {
status = "disabled";
};
&button3 {
status = "disabled";
};
&arduino_spi {
status = "okay";
cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
nrf700x: nrf7002@0 {
compatible = "nordic,nrf700x-spi";
status = "okay";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(8)>;
iovdd-ctrl-gpios = <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* D0 */
bucken-gpios = <&gpio0 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* D1 */
host-irq-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; /* D7 */
};
};
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 12)>,
<NRF_PSEL(SPIM_MISO, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 15)>;
nordic,drive-mode = <NRF_DRIVE_H0H1>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 12)>,
<NRF_PSEL(SPIM_MISO, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 15)>;
low-power-enable;
};
};
};