Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	"tony0620emma@gmail.com" <tony0620emma@gmail.com>
Subject: Re: wifi: rtw88: questions about adding support for RTL8723DS/RTL8723BS
Date: Thu, 18 May 2023 19:13:43 +0200	[thread overview]
Message-ID: <5673351.DvuYhMxLoT@jernej-laptop> (raw)
In-Reply-To: <CAFBinCD3nPPHUmtoqRch87SOXpLcfrzOT7SDdsJdGe-KGOK9Mg@mail.gmail.com>

Dne četrtek, 18. maj 2023 ob 19:00:14 CEST je Martin Blumenstingl napisal(a):
> Hi Ping-Ke,
> 
> On Wed, May 17, 2023 at 4:06 AM Ping-Ke Shih <pkshih@realtek.com> wrote:
> >
> > Hi Martin,
> >
> > > -----Original Message-----
> > > From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > > Sent: Wednesday, May 17, 2023 12:40 AM
> > > To: Ping-Ke Shih <pkshih@realtek.com>; linux-wireless@vger.kernel.org
> > > Cc: Larry Finger <Larry.Finger@lwfinger.net>; tony0620emma@gmail.com; jernej.skrabec@gmail.com
> > > Subject: wifi: rtw88: questions about adding support for RTL8723DS/RTL8723BS
> > >
> > > Hello Ping-Ke,
> > >
> > > as a next step I want to add support for RTW_WCPU_11N SDIO cards to
> > > the rtw88 driver.
> > > Currently only one RTW_WCPU_11N chip is supported: RTL8723D by the
> > > rtw88 (PCIe and USB HCIs).
> >
> > Originally, we intended to add 8723D to rtlwifi, because it is a 802.11n chip
> > and very similar to 8723BE. However, its PCIe HCI is changed to use circular
> > ring instead of own bit, like other chips implemented in rtw88.
> As far as I can tell such differences are not present in the SDIO HCI
> 
> > >
> > > My first question is very hopefully a simple one:
> > > It seems that RTL8723DS has two SDIO IDs: 0xd723 and 0xd724.
> > > Do these have the same name or is there some kind of "revision" (like
> > > rev 2, revision B, ...) internally?
> >
> > 0xd723 is dual antenna, and 0xd724 is single antenna. Since 8723D is a
> > 1x1 WiFi BT combo chip, 0xd723 can have a dedicated antenna for BT.
> > The main difference will be BT-coex code.
> Awesome, thanks for the explanation. I sent patches to add RTL8723DS
> support to the rtw88 driver.
> 
> > >
> > > My second question is more abstract:
> > > Based on my understanding of the vendor drivers for RTL8723BS and
> > > RTL8723DS both seem very close in terms of registers. initialization
> > > sequence, ...
> > > So I am hoping that it's possible to add RTL8723BS support to the rtw88 driver.
> > > There's two main differences that I found so far:
> > > - rtw_dump_hw_feature() doesn't work because REG_C2HEVT has an
> > > incorrect value (C2H_HW_FEATURE_REPORT is expected but it still
> > > contains C2H_HW_FEATURE_DUMP). It seems that this is a firmware issue.
> >
> > Not an issue. At that moment of developing 8723B, applications are simple, so
> > we don't read feature from firmware, so just ignore this for 8723B.
> Jernej also suggested this as a first step. So I guess it's the way to go.
> 
> [...]
> > > Have you considered adding RTW8723B support to the rtw88 driver?
> > > Do you have some initial suggestions on what would be needed to do so
> > > (is my list from above complete, what do do about these points, ...)?
> >
> > As my comment above, 8723BE use different PCIe design, and rtlwifi
> > has been supported it, so I don't have plan to support 8723BE in rtw88.
> > But, to add 8723BS to rtw88 seems workable.
> >
> > To add 8723B, you can make a copy from 8723D and change settings along
> > with vendor driver. The main things you need to review are:
> > 1. PCI probe when plugging wifi card
> > 2. hardware initialization when interface up
> > 3. RF calibration when starting connection (you may put this work later)
> > 4. connection setting after connected
> > 5. BT-coex you have mentioned
> >
> >
> > To make rtlwifi support SDIO is another way. It seems like add a HCI is
> > easier than an new chip, and we can have a simple support list of rtlwifi
> > and rtw88 eventually, like
> >
> >         rtlwifi       rtw88
> > 8723BE    o
> > 8723BS    o?
> > 8723DE                  o
> > 8723DS                  o
> Per chip support matrix is:
> 8723BE: rtlwifi
> 8723BU: rtl8xxxu
> 8723BS: staging driver which I'd like to replace
> 8723DE/U/S: rtw88
> 
> HCI support matrix:
> rtlwifi: PCIe, USB
> rtl8xxxu: USB
> rtw88: PCIe, USB and SDIO
> 
> So it seems you are right: I should consider whether adding RTL8723BS
> support to rtw88 is the right choice.

While rtw88 might not be best choice by above matrix, it seems to be most
featureful, stable and at least from what I saw, easiest to add new variants.

I'll do a bit of experiment with rtw88 to see how hard it would be...

Best regards,
Jernej





  reply	other threads:[~2023-05-18 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 16:39 wifi: rtw88: questions about adding support for RTL8723DS/RTL8723BS Martin Blumenstingl
2023-05-17  2:05 ` Ping-Ke Shih
2023-05-18 17:00   ` Martin Blumenstingl
2023-05-18 17:13     ` Jernej Škrabec [this message]
2023-05-18 18:48       ` Larry Finger
2023-05-24  9:53         ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5673351.DvuYhMxLoT@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=pkshih@realtek.com \
    --cc=tony0620emma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox