Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Luka Gejak <luka.gejak@linux.dev>
Subject: RE: [PATCH rtw-next] wifi: rtw88: 8723b: Read the package type from efuse
Date: Mon, 19 Oct 2026 02:39:08 +0000	[thread overview]
Message-ID: <425c1552139b4f09a5db42459fa74a08@realtek.com> (raw)
In-Reply-To: <d22c9202-d019-4ca1-8534-c23244d612d4@gmail.com>

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. 

> +
> +       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.

> +               rtwdev->efuse.hw_cap.bw &= ~BIT(RTW_CHANNEL_WIDTH_40);
> +}
> +
>  static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
>  {
>         struct rtw_efuse *efuse = &rtwdev->efuse;



      parent reply	other threads:[~2026-10-19  2:39 UTC|newest]

Thread overview: 3+ 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 [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=425c1552139b4f09a5db42459fa74a08@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=rtl8821cerfe2@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