Linux driver for nRF7002

Hi,

I am evaluating the nRF7002 to be used as a host based WiFi MAC/PHY. My host is TI AM3358. The Linux version we use is 4.1.15. 

1. Is it possible to use the nRF7002 for this purpose?

2. I couldn't find any Linux drivers for this except https://github.com/NordicPlayground/nrf70-linux-driver. I tried building this but west fails.

Cheers,

Kaushalya

Parents
  • Hi,

    I am currently porting the nrf7002 Linux driver from NordicPlayground to work with (NXP iMX6ULL + nRF7002 EK) using normal SPI interface.

    1) The RDSR1, RDSR2 and WRSR2 commands work fine but not FAST READ (0x0B). I am using 16MHz SPI clock and SPI slave latency set to 1. It always returns 0xFFFFFFFF when trying to read data from offset 0x400.

    2) I see from the code that for PP command, the address MSBit is set to 1. Is that any reason to do so? 

    /***************************************************************************************/

    static int _spdev_write(unsigned long addr, unsigned int val, unsigned int len)
    {
          int err;
          struct spi_device *spi_dev = config->dev;
          uint8_t hdr[8] = {
               0x02, /* PP opcode */
              (((addr >> 16) & 0xFF) | 0x80),
              (addr >> 8) & 0xFF,
              (addr & 0xFF),
              (val & 0xFF),
              ((val >> 8) & 0xFF),
              ((val >> 16) & 0xFF),
              ((val >> 24) & 0xFF),
         };
         struct spi_transfer tr = { .tx_buf = hdr, .len = sizeof(hdr) };
         struct spi_message m;

         spi_message_init(&m);
         spi_message_add_tail(&tr, &m);

         err = spi_sync(spi_dev, &m);
         if (err < 0) {
             pr_err("%s: SPI error: %d\n", __func__, err);
         }

         return err;
    }

    /***************************************************************************************/

    Hope I can get some response although I understand that this code is not officially supported by Nordic. Thanks!

Reply
  • Hi,

    I am currently porting the nrf7002 Linux driver from NordicPlayground to work with (NXP iMX6ULL + nRF7002 EK) using normal SPI interface.

    1) The RDSR1, RDSR2 and WRSR2 commands work fine but not FAST READ (0x0B). I am using 16MHz SPI clock and SPI slave latency set to 1. It always returns 0xFFFFFFFF when trying to read data from offset 0x400.

    2) I see from the code that for PP command, the address MSBit is set to 1. Is that any reason to do so? 

    /***************************************************************************************/

    static int _spdev_write(unsigned long addr, unsigned int val, unsigned int len)
    {
          int err;
          struct spi_device *spi_dev = config->dev;
          uint8_t hdr[8] = {
               0x02, /* PP opcode */
              (((addr >> 16) & 0xFF) | 0x80),
              (addr >> 8) & 0xFF,
              (addr & 0xFF),
              (val & 0xFF),
              ((val >> 8) & 0xFF),
              ((val >> 16) & 0xFF),
              ((val >> 24) & 0xFF),
         };
         struct spi_transfer tr = { .tx_buf = hdr, .len = sizeof(hdr) };
         struct spi_message m;

         spi_message_init(&m);
         spi_message_add_tail(&tr, &m);

         err = spi_sync(spi_dev, &m);
         if (err < 0) {
             pr_err("%s: SPI error: %d\n", __func__, err);
         }

         return err;
    }

    /***************************************************************************************/

    Hope I can get some response although I understand that this code is not officially supported by Nordic. Thanks!

Children
No Data
Related