mbox series

[v4,0/9] rtw88: Add support for RTL8723CS/RTL8703B

Message ID 20240311103735.615541-1-fiona.klute@gmx.de (mailing list archive)
Headers show
Series rtw88: Add support for RTL8723CS/RTL8703B | expand

Message

Fiona Klute March 11, 2024, 10:37 a.m. UTC
This patch set adds a driver for RTL8723CS, which is used in the
Pinephone and a few other devices. It is a combined wifi/bluetooth
device, the wifi part is called RTL8703B. There is already a mainline
driver for the bluetooth part. RTL8703B is similar to the RTL8723D
chip already supported by rtw88. I've been using the out-of-tree
rtl8723cs driver as reference.

Station and monitor mode work well enough for daily use on my
Pinephone, I have not tested other modes yet. WOW firmware is
declared, but WOW isn't implemented yet. RX rates stay fairly low
still.

Ping-Ke Shih kindly offered to add the required s-o-b for the firmware
and help get it into linux-firmware when it's time, for testing now
please see the code I used to extract firmware from the out-of-tree
driver [1].

Thanks to Ping-Ke Shih for advice, and Ondřej Jirman for debug logs!

[1] https://github.com/airtower-luna/rtw8703b-fw-extractor

v2:
  * Parse PHY status using struct instead of macros
  * Prefer MAC from EFUSE if available, move retrieving MAC from DT to
    a separate function
  * Tidy up wait for IQK to be done, replace mdelay loop with
    read_poll_timeout
  * Set dual author for rtw88_8723x
  * Add missing "static" to rtw8723x function declarations, fixes
    build failure when not built as a module
  * Various style fixes

v3 has only minor changes requested in review, so I hope it's good to
merge now:
  * rtw8703b.h: #include rtw8723x.h instead of linux/types.h and
    linux/compiler_attributes.h
  * rtw8703b_tables.c: #include rtw8703b_tables.h
  * rtw8703b.c: define TRANS_SEQ_END without braces (checkpatch.pl
    doesn't like this, but I assume maintainer request overrides it)

v4:
  * Move definition of GET_RX_DESC_BW from rtw8703b.c to rx.h (now in
    patch 3/9 "wifi: rtw88: Add definitions for 8703b chip")

Fiona Klute (9):
  wifi: rtw88: Shared module for rtw8723x devices
  wifi: rtw88: Debug output for rtw8723x EFUSE
  wifi: rtw88: Add definitions for 8703b chip
  wifi: rtw88: Add rtw8703b.h
  wifi: rtw88: Add rtw8703b.c
  wifi: rtw88: Add rtw8703b_tables.h
  wifi: rtw88: Add rtw8703b_tables.c
  wifi: rtw88: Reset 8703b firmware before download
  wifi: rtw88: SDIO device driver for RTL8723CS

 drivers/net/wireless/realtek/rtw88/Kconfig    |   22 +
 drivers/net/wireless/realtek/rtw88/Makefile   |    9 +
 drivers/net/wireless/realtek/rtw88/mac.c      |    6 +
 drivers/net/wireless/realtek/rtw88/main.h     |    3 +
 drivers/net/wireless/realtek/rtw88/rtw8703b.c | 2109 +++++++++++++++++
 drivers/net/wireless/realtek/rtw88/rtw8703b.h |  102 +
 .../wireless/realtek/rtw88/rtw8703b_tables.c  |  902 +++++++
 .../wireless/realtek/rtw88/rtw8703b_tables.h  |   14 +
 .../net/wireless/realtek/rtw88/rtw8723cs.c    |   34 +
 drivers/net/wireless/realtek/rtw88/rtw8723d.c |  673 +-----
 drivers/net/wireless/realtek/rtw88/rtw8723d.h |  269 +--
 drivers/net/wireless/realtek/rtw88/rtw8723x.c |  721 ++++++
 drivers/net/wireless/realtek/rtw88/rtw8723x.h |  518 ++++
 drivers/net/wireless/realtek/rtw88/rx.h       |    2 +
 include/linux/mmc/sdio_ids.h                  |    1 +
 15 files changed, 4485 insertions(+), 900 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b_tables.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b_tables.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723cs.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723x.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723x.h

--
2.43.0

Comments

Ping-Ke Shih March 12, 2024, 2:58 a.m. UTC | #1
> v4:
>   * Move definition of GET_RX_DESC_BW from rtw8703b.c to rx.h (now in
>     patch 3/9 "wifi: rtw88: Add definitions for 8703b chip")

v4 looks good to me. Thanks for the great work! 

I also have run sparse/smatch with v4, no warning/error.

Ping-Ke
Pavel Machek March 12, 2024, 8:43 a.m. UTC | #2
Hi!

> > v4:
> >   * Move definition of GET_RX_DESC_BW from rtw8703b.c to rx.h (now in
> >     patch 3/9 "wifi: rtw88: Add definitions for 8703b chip")
> 
> v4 looks good to me. Thanks for the great work! 
> 
> I also have run sparse/smatch with v4, no warning/error.

Does it mean you queued the patch, or is someone else expected to do
that?

Best regards,
								Pavel
Ping-Ke Shih March 12, 2024, 9 a.m. UTC | #3
On Tue, 2024-03-12 at 09:43 +0100, Pavel Machek wrote:
> Hi!
> 
> > > v4:
> > >   * Move definition of GET_RX_DESC_BW from rtw8703b.c to rx.h (now in
> > >     patch 3/9 "wifi: rtw88: Add definitions for 8703b chip")
> > 
> > v4 looks good to me. Thanks for the great work! 
> > 
> > I also have run sparse/smatch with v4, no warning/error.
> 
> Does it mean you queued the patch, or is someone else expected to do
> that?
> 

I mean this patchset is okay to me, and Kalle will help to apply this
patchset to wireless-next tree. I suppose next next kernel v6.10 will
have this. 

Ping-Ke
Larry Finger March 12, 2024, 4:09 p.m. UTC | #4
Those patches have been merged with
https://github.com/lwfinger/rtw88.git. If you have an rtw8723ds, you
can access the new driver now.

On Tue, Mar 12, 2024 at 4:01 AM Ping-Ke Shih <pkshih@realtek.com> wrote:
>
> On Tue, 2024-03-12 at 09:43 +0100, Pavel Machek wrote:
> > Hi!
> >
> > > > v4:
> > > >   * Move definition of GET_RX_DESC_BW from rtw8703b.c to rx.h (now in
> > > >     patch 3/9 "wifi: rtw88: Add definitions for 8703b chip")
> > >
> > > v4 looks good to me. Thanks for the great work!
> > >
> > > I also have run sparse/smatch with v4, no warning/error.
> >
> > Does it mean you queued the patch, or is someone else expected to do
> > that?
> >
>
> I mean this patchset is okay to me, and Kalle will help to apply this
> patchset to wireless-next tree. I suppose next next kernel v6.10 will
> have this.
>
> Ping-Ke
>
>
>
>
Fiona Klute March 13, 2024, 1:15 p.m. UTC | #5
Am 12.03.24 um 10:00 schrieb Ping-Ke Shih:
> On Tue, 2024-03-12 at 09:43 +0100, Pavel Machek wrote:
>> Hi!
>>
>>>> v4:
>>>>    * Move definition of GET_RX_DESC_BW from rtw8703b.c to rx.h (now in
>>>>      patch 3/9 "wifi: rtw88: Add definitions for 8703b chip")
>>>
>>> v4 looks good to me. Thanks for the great work!
>>>
>>> I also have run sparse/smatch with v4, no warning/error.
>>
>> Does it mean you queued the patch, or is someone else expected to do
>> that?
>>
>
> I mean this patchset is okay to me, and Kalle will help to apply this
> patchset to wireless-next tree. I suppose next next kernel v6.10 will
> have this.

Thanks, you two asked and answered the question I would've asked
already. :-)

Is there anything I still need to do to get the firmware into
linux-firmware?

Best regards,
Fiona
Ping-Ke Shih March 14, 2024, 12:18 a.m. UTC | #6
> 
> Is there anything I still need to do to get the firmware into
> linux-firmware?
> 

Please send me a firmware patch again. In case I send wrong firmware to
liunx-firmware. 

Ping-Ke
Fiona Klute March 14, 2024, 9:02 a.m. UTC | #7
Am 14.03.24 um 01:18 schrieb Ping-Ke Shih:
>
>>
>> Is there anything I still need to do to get the firmware into
>> linux-firmware?
>>
>
> Please send me a firmware patch again. In case I send wrong firmware to
> liunx-firmware.

I've just sent it. Thanks for taking care of this!

Fiona