On 8/23/24 18:08, Marek Vasut wrote: > From: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx> > > Add support for the WILC3000 chip. The chip is similar to WILC1000, > except that the register layout is slightly different and it does > not support WPA3/SAE. > > Signed-off-by: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx> > Signed-off-by: Marek Vasut <marex@xxxxxxx> > --- > Note: Squashed and updated from the following downstream patches: > wifi: wilc1000: wilc3000 support added > wifi: wilc1000: wilc3000 interrupt handling > wifi: wilc1000: wilc3000 added chip wake and sleep support > wifi: wilc1000: wilc3000 FW file sepecific changes > --- > Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> > Cc: Adham Abozaeid <adham.abozaeid@xxxxxxxxxxxxx> > Cc: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx> > Cc: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx> > Cc: Claudiu Beznea <claudiu.beznea@xxxxxxxxx> > Cc: Conor Dooley <conor+dt@xxxxxxxxxx> > Cc: Eric Dumazet <edumazet@xxxxxxxxxx> > Cc: Jakub Kicinski <kuba@xxxxxxxxxx> > Cc: Kalle Valo <kvalo@xxxxxxxxxx> > Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx> > Cc: Marek Vasut <marex@xxxxxxx> > Cc: Paolo Abeni <pabeni@xxxxxxxxxx> > Cc: Rob Herring <robh@xxxxxxxxxx> > Cc: devicetree@xxxxxxxxxxxxxxx > Cc: linux-wireless@xxxxxxxxxxxxxxx > Cc: netdev@xxxxxxxxxxxxxxx > --- > V2: - Return -EINVAL in wilc_sdio_init() if chip ID is not supported > - Dispose of wilc_chip_type, replace with is_wilc1000()/is_wilc3000() > - Remove wilc3000 DT compatible string handling, match on wilc1000 only, > the device type can be auto-detected based on chipID > --- > .../wireless/microchip/wilc1000/cfg80211.c | 7 + > .../net/wireless/microchip/wilc1000/netdev.c | 29 ++- > .../net/wireless/microchip/wilc1000/sdio.c | 62 ++++- > drivers/net/wireless/microchip/wilc1000/spi.c | 2 +- > .../net/wireless/microchip/wilc1000/wlan.c | 217 +++++++++++++++--- > .../net/wireless/microchip/wilc1000/wlan.h | 43 +++- > 6 files changed, 298 insertions(+), 62 deletions(-) > [...] > @@ -1467,6 +1604,20 @@ static int init_chip(struct net_device *dev) > } > } > > + if (is_wilc3000(wilc->chipid)) { > + ret = wilc->hif_func->hif_read_reg(wilc, 0x207ac, ®); Some defines would be nice here instead of hardcoded addresses. I have asked Ajay about those while working on wilc3000, the meaning is roughly the following: - 0x000207ac: WILC_3000_BOOTROM_STATUS_REGISTER - 0x004f0000: WILC_3000_CORTUS_BOOT_REGISTER_2 - 0x71: WILC_CORTUS_BOOT_FROM_IRAM Thanks, Alexis -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com