mbox series

[wireless-next,v2,0/4] wifi: rtw88: Add support for the RTL8723DS SDIO wifi chip

Message ID 20230522202425.1827005-1-martin.blumenstingl@googlemail.com
Headers show
Series wifi: rtw88: Add support for the RTL8723DS SDIO wifi chip | expand

Message

Martin Blumenstingl May 22, 2023, 8:24 p.m. UTC
This series adds support for the RTL823DS SDIO wifi chip.
It builds on the SDIO support which was recently merged into the rtw88
driver.

With the initial rtw88 SDIO support code the aim was to support these
older (802.11n) chips as well but we didn't have any way to test that.
Overall we spotted all corner cases in the vendor driver except one:
On these older chips REG_SDIO_RX0_REQ_LEN should only be read when
REG_SDIO_HISR has the REG_SDIO_HISR_RX_REQUEST bit set. Patch 1 adds
support for that.

RTL8723DS comes in two variant and each of them has their own SDIO ID:
- 0xd723 can connect two antennas. The WiFi part is still 1x1 so the
  second antenna can be dedicated to Bluetooth
- 0xd724 can only connect one antenna so it's shared between WiFi and
  Bluetooth
Thanks to Ping-Ke for these insights!

This series adds the missing SDIO ID and renames the existing 0xd723
SDIO ID (which we previously added) with patch 3. The rest is straight
forward: patch 2 adds support for parsing the eFuse and patch 4 wires
everything together by creating a driver for the RTL8723DS.

In my own tests on a MangoPi MQ-Quad I get the following results in
iperf3 (with the device being better placed than my RTL8822CS):
- RX: 48 Mbit/s
- TX: 33 Mbit/s
Also Larry Finger reports [0] that he has a user (with the rtw88
driver changes backported to support older kernels) that has
successfully tested RTL8723DS support.


Changes since v1 at [1]:
- rebased on top of 6.4-rc3 which comes with commit cb0ddaaa5db0
  ("wifi: rtw88: sdio: Always use two consecutive bytes for word
    operations")
- added braces to the new if condition in patch #1 as suggested by
  Ping-Ke (no functional changes but it makes that code block with
  the long comment easier to read/understand)
- collected Ping-Ke's Reviewed-by (thank you!)


[0] https://lore.kernel.org/linux-wireless/88e0c4a3-eec7-e44d-6f95-6f2e7f7cbbb5@lwfinger.net/
[1] https://lore.kernel.org/linux-wireless/20230518161749.1311949-1-martin.blumenstingl@googlemail.com/


Martin Blumenstingl (4):
  wifi: rtw88: sdio: Check the HISR RX_REQUEST bit in rtw_sdio_rx_isr()
  wifi: rtw88: rtw8723d: Implement RTL8723DS (SDIO) efuse parsing
  mmc: sdio: Add/rename SDIO ID of the RTL8723DS SDIO wifi cards
  wifi: rtw88: Add support for the SDIO based RTL8723DS chipset

 drivers/net/wireless/realtek/rtw88/Kconfig    | 11 +++++
 drivers/net/wireless/realtek/rtw88/Makefile   |  3 ++
 drivers/net/wireless/realtek/rtw88/rtw8723d.c |  9 ++++
 drivers/net/wireless/realtek/rtw88/rtw8723d.h |  6 +++
 .../net/wireless/realtek/rtw88/rtw8723ds.c    | 41 +++++++++++++++++++
 drivers/net/wireless/realtek/rtw88/sdio.c     | 24 +++++++++--
 include/linux/mmc/sdio_ids.h                  |  3 +-
 7 files changed, 93 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723ds.c