Message ID | 20250326-mwifiex-iw61x-v1-0-ff875ed35efc@pengutronix.de |
---|---|
Headers | show |
Series | wifi: mwifiex: add iw61x support | expand |
On Wed, Mar 26, 2025 at 01:18:34PM +0100, Sascha Hauer wrote: > This adds iw61x aka SD9177 support to the mwifiex driver. It is named > SD9177 in the downstream driver, I deliberately chose the NXP name in > the driver. > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > --- > drivers/net/wireless/marvell/mwifiex/sdio.c | 79 +++++++++++++++++++++++++++++ > drivers/net/wireless/marvell/mwifiex/sdio.h | 3 ++ > include/linux/mmc/sdio_ids.h | 3 ++ > 3 files changed, 85 insertions(+) > > diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c > index cbcb5674b8036..7b4045a40df57 100644 > --- a/drivers/net/wireless/marvell/mwifiex/sdio.c > +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c ... > @@ -3212,3 +3289,5 @@ MODULE_FIRMWARE(SD8978_SDIOUART_FW_NAME); > MODULE_FIRMWARE(SD8987_DEFAULT_FW_NAME); > MODULE_FIRMWARE(SD8997_DEFAULT_FW_NAME); > MODULE_FIRMWARE(SD8997_SDIOUART_FW_NAME); > +MODULE_FIRMWARE(IW612_DEFAULT_FW_NAME); > +MODULE_FIRMWARE(IW612_SDIOUART_FW_NAME); > diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h > index 65d142286c46e..97759456314b0 100644 > --- a/drivers/net/wireless/marvell/mwifiex/sdio.h > +++ b/drivers/net/wireless/marvell/mwifiex/sdio.h > @@ -29,6 +29,9 @@ > #define SD8987_DEFAULT_FW_NAME "mrvl/sd8987_uapsta.bin" > #define SD8997_DEFAULT_FW_NAME "mrvl/sdsd8997_combo_v4.bin" > #define SD8997_SDIOUART_FW_NAME "mrvl/sdiouart8997_combo_v4.bin" > +#define IW612_DEFAULT_FW_NAME "nxp/sdsd_nw61x.bin" > +#define IW612_SDIOUART_FW_NAME "nxp/sd_w61x.bin" Is there a way to have BT over SDIO with iw61x? I was sure only sd-uart was possible. Francesco
On Wed, Mar 26, 2025 at 02:54:35PM +0100, Sascha Hauer wrote: > On Wed, Mar 26, 2025 at 01:23:35PM +0100, Francesco Dolcini wrote: > > On Wed, Mar 26, 2025 at 01:18:34PM +0100, Sascha Hauer wrote: > > > This adds iw61x aka SD9177 support to the mwifiex driver. It is named > > > SD9177 in the downstream driver, I deliberately chose the NXP name in > > > the driver. > > > > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > > --- > > > drivers/net/wireless/marvell/mwifiex/sdio.c | 79 +++++++++++++++++++++++++++++ > > > drivers/net/wireless/marvell/mwifiex/sdio.h | 3 ++ > > > include/linux/mmc/sdio_ids.h | 3 ++ > > > 3 files changed, 85 insertions(+) > > > > > > diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c > > > index cbcb5674b8036..7b4045a40df57 100644 > > > --- a/drivers/net/wireless/marvell/mwifiex/sdio.c > > > +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c > > > > ... > > > > > @@ -3212,3 +3289,5 @@ MODULE_FIRMWARE(SD8978_SDIOUART_FW_NAME); > > > MODULE_FIRMWARE(SD8987_DEFAULT_FW_NAME); > > > MODULE_FIRMWARE(SD8997_DEFAULT_FW_NAME); > > > MODULE_FIRMWARE(SD8997_SDIOUART_FW_NAME); > > > +MODULE_FIRMWARE(IW612_DEFAULT_FW_NAME); > > > +MODULE_FIRMWARE(IW612_SDIOUART_FW_NAME); > > > diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h > > > index 65d142286c46e..97759456314b0 100644 > > > --- a/drivers/net/wireless/marvell/mwifiex/sdio.h > > > +++ b/drivers/net/wireless/marvell/mwifiex/sdio.h > > > @@ -29,6 +29,9 @@ > > > #define SD8987_DEFAULT_FW_NAME "mrvl/sd8987_uapsta.bin" > > > #define SD8997_DEFAULT_FW_NAME "mrvl/sdsd8997_combo_v4.bin" > > > #define SD8997_SDIOUART_FW_NAME "mrvl/sdiouart8997_combo_v4.bin" > > > +#define IW612_DEFAULT_FW_NAME "nxp/sdsd_nw61x.bin" > > > +#define IW612_SDIOUART_FW_NAME "nxp/sd_w61x.bin" > > > > Is there a way to have BT over SDIO with iw61x? I was sure only sd-uart was > > possible. > > The communication to the Bluetooth module indeed is UART only. > > I think nxp/sdsd_nw61x.bin contains firmwares for both the WiFi and > Bluetooth chip. When using this you can use the Bluetooth UART directly > without uploading a separate Bluetooth firmware. > > nxp/sd_w61x.bin only contains the WiFi firmware, so you have to > upload a separate Bluetooth firmware over the UART interface. If that the case what you did here is not correct. The 2 firmware files here are used file depending on the BT host interface used on the Wi-Fi/BT chip, and this is read from some strapping register. See commit 255ca28a659d ("mwifiex: Select firmware based on strapping"). BTW, this name sdsd_nw61x.bin is confusing, I would have expected this to be something like sduart_nw61x.bin. Francesco
On Wed, Mar 26, 2025 at 01:18:34PM +0100, Sascha Hauer wrote: > This adds iw61x aka SD9177 support to the mwifiex driver. It is named > SD9177 in the downstream driver, I deliberately chose the NXP name in > the driver. Hi Sascha, Thanks for sharing these patches. To test, I applied them to our downstream branch based on the NXP BSP 6.6.52-2.2.0 and can confirm that the driver works well on our iMX95-based board which uses a ublox MAYA-W260 (IW611) for WiFi (SDIO) and BT (UART). Both STA and AP mode looked good to me. Kind regards, Ernest
On Thu, Mar 27, 2025 at 10:33:17AM +0100, Francesco Dolcini wrote: > On Wed, Mar 26, 2025 at 02:54:35PM +0100, Sascha Hauer wrote: > > On Wed, Mar 26, 2025 at 01:23:35PM +0100, Francesco Dolcini wrote: > > > On Wed, Mar 26, 2025 at 01:18:34PM +0100, Sascha Hauer wrote: > > > > This adds iw61x aka SD9177 support to the mwifiex driver. It is named > > > > SD9177 in the downstream driver, I deliberately chose the NXP name in > > > > the driver. > > > > > > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > > > --- > > > > drivers/net/wireless/marvell/mwifiex/sdio.c | 79 +++++++++++++++++++++++++++++ > > > > drivers/net/wireless/marvell/mwifiex/sdio.h | 3 ++ > > > > include/linux/mmc/sdio_ids.h | 3 ++ > > > > 3 files changed, 85 insertions(+) > > > > > > > > diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c > > > > index cbcb5674b8036..7b4045a40df57 100644 > > > > --- a/drivers/net/wireless/marvell/mwifiex/sdio.c > > > > +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c > > > > > > ... > > > > > > > @@ -3212,3 +3289,5 @@ MODULE_FIRMWARE(SD8978_SDIOUART_FW_NAME); > > > > MODULE_FIRMWARE(SD8987_DEFAULT_FW_NAME); > > > > MODULE_FIRMWARE(SD8997_DEFAULT_FW_NAME); > > > > MODULE_FIRMWARE(SD8997_SDIOUART_FW_NAME); > > > > +MODULE_FIRMWARE(IW612_DEFAULT_FW_NAME); > > > > +MODULE_FIRMWARE(IW612_SDIOUART_FW_NAME); > > > > diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h > > > > index 65d142286c46e..97759456314b0 100644 > > > > --- a/drivers/net/wireless/marvell/mwifiex/sdio.h > > > > +++ b/drivers/net/wireless/marvell/mwifiex/sdio.h > > > > @@ -29,6 +29,9 @@ > > > > #define SD8987_DEFAULT_FW_NAME "mrvl/sd8987_uapsta.bin" > > > > #define SD8997_DEFAULT_FW_NAME "mrvl/sdsd8997_combo_v4.bin" > > > > #define SD8997_SDIOUART_FW_NAME "mrvl/sdiouart8997_combo_v4.bin" > > > > +#define IW612_DEFAULT_FW_NAME "nxp/sdsd_nw61x.bin" > > > > +#define IW612_SDIOUART_FW_NAME "nxp/sd_w61x.bin" > > > > > > Is there a way to have BT over SDIO with iw61x? I was sure only sd-uart was > > > possible. > > > > The communication to the Bluetooth module indeed is UART only. > > > > I think nxp/sdsd_nw61x.bin contains firmwares for both the WiFi and > > Bluetooth chip. When using this you can use the Bluetooth UART directly > > without uploading a separate Bluetooth firmware. > > > > nxp/sd_w61x.bin only contains the WiFi firmware, so you have to > > upload a separate Bluetooth firmware over the UART interface. > > If that the case what you did here is not correct. > > The 2 firmware files here are used file depending on the BT host interface used > on the Wi-Fi/BT chip, and this is read from some strapping register. See commit > 255ca28a659d ("mwifiex: Select firmware based on strapping"). > > BTW, this name sdsd_nw61x.bin is confusing, I would have expected this to be > something like sduart_nw61x.bin. You are right, there seem to be some things mixed up. I'll have a look into it for the next round. Sascha
This series adds iw61x support to the mwifiex driver. It works for me, but is not yet ready to be merged. Some people showed interest in it, so I am sending it here. All testing and review feedback appreciated. During startup I get these messages: [ 12.078010] mwifiex_sdio mmc1:0001:1: Unknown GET_HW_SPEC TLV type: 0xff [ 12.078018] mwifiex_sdio mmc1:0001:1: Unknown GET_HW_SPEC TLV type: 0xff [ 12.078024] mwifiex_sdio mmc1:0001:1: Unknown GET_HW_SPEC TLV type: 0x23e [ 12.078029] mwifiex_sdio mmc1:0001:1: Unknown GET_HW_SPEC TLV type: 0x25c Not sure what these are about, I can't see these handled in the downstream mwifiex driver as well. Could also be there is some parsing error. Nevertheless the driver seems to work. The series applies to v6.14, but should apply to my mwifiex cleanup series as well. Sascha Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- Sascha Hauer (4): wifi: mwifiex: release firmware at remove time wifi: mwifiex: handle VDLL wifi: mwifiex: wait longer for SDIO card status wifi: mwifiex: add iw61x support drivers/net/wireless/marvell/mwifiex/cmdevt.c | 86 ++++++++++++++++++++++++ drivers/net/wireless/marvell/mwifiex/fw.h | 16 +++++ drivers/net/wireless/marvell/mwifiex/main.c | 9 +-- drivers/net/wireless/marvell/mwifiex/main.h | 4 ++ drivers/net/wireless/marvell/mwifiex/sdio.c | 81 +++++++++++++++++++++- drivers/net/wireless/marvell/mwifiex/sdio.h | 3 + drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++ drivers/net/wireless/marvell/mwifiex/uap_event.c | 4 ++ include/linux/mmc/sdio_ids.h | 3 + 9 files changed, 205 insertions(+), 5 deletions(-) --- base-commit: 1e26c5e28ca5821a824e90dd359556f5e9e7b89f change-id: 20250326-mwifiex-iw61x-b9570bf30735 Best regards,