Linux wireless drivers development
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Luka Gejak <luka.gejak@linux.dev>,
	Ping-Ke Shih <pkshih@realtek.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH rtw-next] wifi: rtw88: 8723b: Read the package type from efuse
Date: Tue, 20 Oct 2026 19:35:41 +0300	[thread overview]
Message-ID: <8e7ecf8e-5757-4162-bc23-e22d0623ec76@gmail.com> (raw)
In-Reply-To: <a7791242312c71dfaa96c25aff7be7fb147dea8a@linux.dev>

On 20/10/2026 00:05, Luka Gejak wrote:
> Hi Bitterblue,
> 
> October 19, 2026 at 10:37 PM, "Bitterblue Smith" <rtl8821cerfe2@gmail.com> wrote:
> 
>>
>> On 19/10/2026 05:39, Ping-Ke Shih wrote:
>>
>>>
>>> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>>  
>>>  [...]
>>>  
>>>
>>>>
>>>> +static void rtw8723b_read_package_type(struct rtw_dev *rtwdev)
>>>>  +{
>>>>  + struct rtw_hal *hal = &rtwdev->hal;
>>>>  + u8 val_1fb;
>>>>  +
>>>>  + rtw8723b_efuse_grant(rtwdev, true);
>>>>  + rtw_read8_physical_efuse(rtwdev, 0x1fb, &val_1fb);
>>>>  + rtw8723b_efuse_grant(rtwdev, false);
>>>>
>>>  
>>>  In rtw_parse_efuse_map(), we can pass 'phy_map' to read_efuse()?
>>>  -chip->ops->read_efuse(rtwdev, log_map);
>>>  +chip->ops->read_efuse(rtwdev, log_map, phy_map);
>>>  
>>>  As .phy_efuse_size = 512 for RTL7823B, I think it will work.
>>>
>> Yes, that should work.
>>
>>>
>>>>
>>>> +
>>>>  + switch (u8_get_bits(val_1fb, GENMASK(2, 0))) {
>>>>
>>>  
>>>  Bit 2~0 seems like PKG_TYPE. Define an enum?
>>>  
>>>
>>>>
>>>> + case 0x4:
>>>>  + hal->pkg_type = RTW8723B_PACKAGE_TFBGA79;
>>>>  + break;
>>>>  + case 0x5:
>>>>  + hal->pkg_type = RTW8723B_PACKAGE_TFBGA90;
>>>>  + break;
>>>>  + case 0x6:
>>>>  + hal->pkg_type = RTW8723B_PACKAGE_QFN68;
>>>>  + break;
>>>>  + case 0x7:
>>>>  + hal->pkg_type = RTW8723B_PACKAGE_TFBGA80;
>>>>  + break;
>>>>  + default:
>>>>  + hal->pkg_type = RTW8723B_PACKAGE_DEFAULT;
>>>>  + break;
>>>>  + }
>>>>  +
>>>>  + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO &&
>>>>  + u8_get_bits(val_1fb, GENMASK(5, 4)) == 0x2)
>>>>
>>>  
>>>  Can you define enums for bit 5-4 and value 0x2?
>>>  I'm not sure if vendor driver has some comments pointing out this or not.
>>>
>> I guess bits 5-4 identify the chip variant:
>>
>>  /* RTL8703AS: 0x1FB[5:4] 2b'10 */
>>  /* RTL8723BS: 0x1FB[5:4] 2b'11 */
>>  if ((efuseContent & 0x30) == 0x20) {
>>  pAdapter->registrypriv.bw_mode &= 0xF0;
>>  RTW_INFO("This is the case of 8703AS\n");
>>  }
>>
>> RTL8703AS appears to be a (cheaper?) version of RTL8723BS. Ten years ago
>> Hans de Goede was saying:
>>
>>  The rtl8703as in reality is a rtl8723bs in a different package.
>>  (it has the same sdio-id).
>>
>>  In android the rtl8703as uses the rtl8723bs-vq0 driver instead of the
>>  regular rtl8732bs driver. Looking at a diff between the 2 the only
>>  difference is that the vq0 driver forces the antenna-path to
>>  ODM_RF_PATH_B.
>>
>>  It seems that we can identify the rtl8703as by its package, as it comes
>>  in a QNF68 package, where as the rtl8723bs comes in a TFBGA79 package,
>>  so we can simply support both in the same driver.
>>
>> https://github.com/hadess/rtl8723bs/pull/93/changes/ebec0ae8ccedc05a945478926d52c99277f500ee
> 
> So 8703AS should work just fine with rtw8723b. The one thing I'm not
> sure about is antenna path. The vq0 driver hardcodes path B, but the
> normal driver reads it from efuse, same as rtw88. If some 8703AS boards
> have it wrong in efuse we might need a quirk. Have you come across such?
> 

No, I only have RTL8723BU.

> Best regards,
> Luka Gejak


      reply	other threads:[~2026-10-20 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 15:42 [PATCH rtw-next] wifi: rtw88: 8723b: Read the package type from efuse Bitterblue Smith
2026-10-18 10:49 ` Luka Gejak
2026-10-19  2:39 ` Ping-Ke Shih
2026-10-19 20:37   ` Bitterblue Smith
2026-10-19 21:05     ` Luka Gejak
2026-10-20 16:35       ` Bitterblue Smith [this message]

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=8e7ecf8e-5757-4162-bc23-e22d0623ec76@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=pkshih@realtek.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