* [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration
@ 2025-06-27 3:51 Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8 Ping-Ke Shih
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:51 UTC (permalink / raw)
To: linux-wireless
Certain hardware could be not good enough with old RF calibration. Update
the calibration to align performance with normal hardware.
Ping-Ke Shih (6):
wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8
wifi: rtw89: 8851b: set ADC bandwidth select according to calibration
value
wifi: rtw89: 8851b: adjust ADC setting for RF calibration
wifi: rtw89: 8851b: update NCTL 0xB
wifi: rtw89: 8851b: rfk: update DPK to 0x11
wifi: rtw89: 8851b: rfk: update IQK to 0x14
drivers/net/wireless/realtek/rtw89/core.h | 3 +-
drivers/net/wireless/realtek/rtw89/reg.h | 3 +
drivers/net/wireless/realtek/rtw89/rtw8851b.c | 53 +-
.../net/wireless/realtek/rtw89/rtw8851b_rfk.c | 156 +++++-
.../realtek/rtw89/rtw8851b_rfk_table.c | 77 +--
.../realtek/rtw89/rtw8851b_rfk_table.h | 2 +-
.../wireless/realtek/rtw89/rtw8851b_table.c | 501 +++++++++---------
7 files changed, 464 insertions(+), 331 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
@ 2025-06-27 3:51 ` Ping-Ke Shih
2025-07-04 2:37 ` Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 2/6] wifi: rtw89: 8851b: set ADC bandwidth select according to calibration value Ping-Ke Shih
` (4 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:51 UTC (permalink / raw)
To: linux-wireless
Originally the type of path_ok is bool to denote that DPK is ready on
certain path and can be enabled. For RTL8851B, hardware design can support
more than one calibration set, so use type u8 instead to record the
hardware set in current use.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
index cdacf100a59a..06ceb77a1cc6 100644
--- a/drivers/net/wireless/realtek/rtw89/core.h
+++ b/drivers/net/wireless/realtek/rtw89/core.h
@@ -5146,7 +5146,7 @@ struct rtw89_dpk_bkup_para {
enum rtw89_band band;
enum rtw89_bandwidth bw;
u8 ch;
- bool path_ok;
+ u8 path_ok;
u8 mdpd_en;
u8 txagc_dpk;
u8 ther_dpk;
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 2/6] wifi: rtw89: 8851b: set ADC bandwidth select according to calibration value
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8 Ping-Ke Shih
@ 2025-06-27 3:51 ` Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 3/6] wifi: rtw89: 8851b: adjust ADC setting for RF calibration Ping-Ke Shih
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:51 UTC (permalink / raw)
To: linux-wireless
To handle hardware characteristic of ADC, calibrate the function and add
a efuse field to record result, which driver uses it to set proper value
accordingly.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/core.h | 1 +
drivers/net/wireless/realtek/rtw89/rtw8851b.c | 28 ++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
index 06ceb77a1cc6..a72cd6e13de2 100644
--- a/drivers/net/wireless/realtek/rtw89/core.h
+++ b/drivers/net/wireless/realtek/rtw89/core.h
@@ -3480,6 +3480,7 @@ struct rtw89_efuse {
u8 addr[ETH_ALEN];
u8 rfe_type;
char country_code[2];
+ u8 adc_td;
};
struct rtw89_phy_rate_pattern {
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b.c b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
index c55833f259de..287d53203b38 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
@@ -712,12 +712,22 @@ static void rtw8851b_phycap_parsing_gain_comp(struct rtw89_dev *rtwdev, u8 *phyc
gain->comp_valid = valid;
}
+static void rtw8851b_phycap_parsing_adc_td(struct rtw89_dev *rtwdev, u8 *phycap_map)
+{
+ u32 phycap_addr = rtwdev->chip->phycap_addr;
+ struct rtw89_efuse *efuse = &rtwdev->efuse;
+ const u32 addr_adc_td = 0x5AF;
+
+ efuse->adc_td = phycap_map[addr_adc_td - phycap_addr] & GENMASK(4, 0);
+}
+
static int rtw8851b_read_phycap(struct rtw89_dev *rtwdev, u8 *phycap_map)
{
rtw8851b_phycap_parsing_tssi(rtwdev, phycap_map);
rtw8851b_phycap_parsing_thermal_trim(rtwdev, phycap_map);
rtw8851b_phycap_parsing_pa_bias_trim(rtwdev, phycap_map);
rtw8851b_phycap_parsing_gain_comp(rtwdev, phycap_map);
+ rtw8851b_phycap_parsing_adc_td(rtwdev, phycap_map);
return 0;
}
@@ -1083,10 +1093,26 @@ static void rtw8851b_ctrl_ch(struct rtw89_dev *rtwdev,
static void rtw8851b_bw_setting(struct rtw89_dev *rtwdev, u8 bw)
{
+ struct rtw89_efuse *efuse = &rtwdev->efuse;
+ u8 adc_bw_sel;
+
+ switch (efuse->adc_td) {
+ default:
+ case 0x19:
+ adc_bw_sel = 0x4;
+ break;
+ case 0x11:
+ adc_bw_sel = 0x5;
+ break;
+ case 0x9:
+ adc_bw_sel = 0x3;
+ break;
+ }
+
rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
- rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW1, B_P0_CFCH_BW1, 0x4);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW1, B_P0_CFCH_BW1, adc_bw_sel);
rtw89_phy_write32_mask(rtwdev, R_DRCK, B_DRCK_MUL, 0xf);
rtw89_phy_write32_mask(rtwdev, R_ADCMOD, B_ADCMOD_LP, 0xa);
rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 3/6] wifi: rtw89: 8851b: adjust ADC setting for RF calibration
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8 Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 2/6] wifi: rtw89: 8851b: set ADC bandwidth select according to calibration value Ping-Ke Shih
@ 2025-06-27 3:51 ` Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 4/6] wifi: rtw89: 8851b: update NCTL 0xB Ping-Ke Shih
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:51 UTC (permalink / raw)
To: linux-wireless
To get expected result of RF calibration at runtime, adjust ADC setting
ahead for coming changes of RF calibration.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/rtw8851b.c | 25 ++++++++++++++++---
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b.c b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
index 287d53203b38..7801732d5b8b 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
@@ -1109,39 +1109,56 @@ static void rtw8851b_bw_setting(struct rtw89_dev *rtwdev, u8 bw)
break;
}
- rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
- rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
- rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW1, B_P0_CFCH_BW1, adc_bw_sel);
rtw89_phy_write32_mask(rtwdev, R_DRCK, B_DRCK_MUL, 0xf);
rtw89_phy_write32_mask(rtwdev, R_ADCMOD, B_ADCMOD_LP, 0xa);
- rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
+ rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_RC, 0x3);
switch (bw) {
case RTW89_CHANNEL_WIDTH_5:
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_FR, 0x1);
rtw89_phy_write32_mask(rtwdev, R_WDADC, B_WDADC_SEL, 0x0);
rtw89_phy_write32_mask(rtwdev, R_ADDCK0D, B_ADDCK_DS, 0x1);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
break;
case RTW89_CHANNEL_WIDTH_10:
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_FR, 0x1);
rtw89_phy_write32_mask(rtwdev, R_WDADC, B_WDADC_SEL, 0x1);
rtw89_phy_write32_mask(rtwdev, R_ADDCK0D, B_ADDCK_DS, 0x0);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
break;
case RTW89_CHANNEL_WIDTH_20:
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_FR, 0x2);
rtw89_phy_write32_mask(rtwdev, R_WDADC, B_WDADC_SEL, 0x2);
rtw89_phy_write32_mask(rtwdev, R_ADDCK0D, B_ADDCK_DS, 0x0);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
break;
case RTW89_CHANNEL_WIDTH_40:
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_FR, 0x2);
rtw89_phy_write32_mask(rtwdev, R_WDADC, B_WDADC_SEL, 0x2);
rtw89_phy_write32_mask(rtwdev, R_ADDCK0D, B_ADDCK_DS, 0x0);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
break;
case RTW89_CHANNEL_WIDTH_80:
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_CTL, 0x8);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_EN, 0x2);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0, B_P0_CFCH_BW0, 0x2);
rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_FR, 0x0);
rtw89_phy_write32_mask(rtwdev, R_WDADC, B_WDADC_SEL, 0x2);
rtw89_phy_write32_mask(rtwdev, R_ADDCK0D, B_ADDCK_DS, 0x0);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK, B_P0_RXCK_ADJ, 0x92);
break;
default:
rtw89_warn(rtwdev, "Fail to set ADC\n");
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 4/6] wifi: rtw89: 8851b: update NCTL 0xB
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
` (2 preceding siblings ...)
2025-06-27 3:51 ` [PATCH rtw-next 3/6] wifi: rtw89: 8851b: adjust ADC setting for RF calibration Ping-Ke Shih
@ 2025-06-27 3:51 ` Ping-Ke Shih
2025-06-27 3:53 ` [PATCH rtw-next 5/6] wifi: rtw89: 8851b: rfk: update DPK to 0x11 Ping-Ke Shih
2025-06-27 3:53 ` [PATCH rtw-next 6/6] wifi: rtw89: 8851b: rfk: update IQK to 0x14 Ping-Ke Shih
5 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:51 UTC (permalink / raw)
To: linux-wireless
To support new commands in DPK 0x11, update NCTL to version 0xB.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
.../wireless/realtek/rtw89/rtw8851b_table.c | 501 +++++++++---------
1 file changed, 250 insertions(+), 251 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_table.c b/drivers/net/wireless/realtek/rtw89/rtw8851b_table.c
index 522883c8dfb9..a9c309c245c3 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_table.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_table.c
@@ -2320,9 +2320,9 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x813c, 0x40000000},
{0x8140, 0x00000000},
{0x8144, 0x0b040b03},
- {0x8148, 0x07020b04},
- {0x814c, 0x07020b04},
- {0x8150, 0xa0a00000},
+ {0x8148, 0x07020a04},
+ {0x814c, 0x07020a04},
+ {0x8150, 0xe4e40000},
{0x8158, 0xffffffff},
{0x815c, 0xffffffff},
{0x8160, 0xffffffff},
@@ -2577,14 +2577,14 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8534, 0x400042fe},
{0x8538, 0x50554200},
{0x853c, 0xb4183000},
- {0x8540, 0xe537a50f},
+ {0x8540, 0xe535a50f},
{0x8544, 0xf12bf02b},
{0x8548, 0xf32bf22b},
{0x854c, 0xf62bf42b},
{0x8550, 0xf82bf72b},
{0x8554, 0xfa2bf92b},
{0x8558, 0xfd2bfc2b},
- {0x855c, 0xe537fe2b},
+ {0x855c, 0xe535fe2b},
{0x8560, 0xf12af02a},
{0x8564, 0xf32af22a},
{0x8568, 0xf52af42a},
@@ -2653,7 +2653,7 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8664, 0x9700140f},
{0x8668, 0x00017430},
{0x866c, 0xe39ce35e},
- {0x8670, 0xe52a0bbd},
+ {0x8670, 0xe5280bbd},
{0x8674, 0xe36a0001},
{0x8678, 0x0001e3c4},
{0x867c, 0x55005b30},
@@ -2664,93 +2664,93 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8690, 0x46100005},
{0x8694, 0x00010004},
{0x8698, 0x30f8e35e},
- {0x869c, 0xe52a0023},
+ {0x869c, 0xe5280023},
{0x86a0, 0x54ed0002},
{0x86a4, 0x00230baa},
- {0x86a8, 0x0002e52a},
+ {0x86a8, 0x0002e528},
{0x86ac, 0xe356e3e4},
{0x86b0, 0xe35e0001},
{0x86b4, 0x002230f3},
- {0x86b8, 0x0002e52a},
+ {0x86b8, 0x0002e528},
{0x86bc, 0x0baa54ec},
- {0x86c0, 0xe52a0022},
+ {0x86c0, 0xe5280022},
{0x86c4, 0xe3e40002},
{0x86c8, 0x0001e356},
{0x86cc, 0x0baae35e},
{0x86d0, 0xe3e430ec},
{0x86d4, 0x0001e356},
{0x86d8, 0x6d0f6c67},
- {0x86dc, 0xe52ae39c},
+ {0x86dc, 0xe528e39c},
{0x86e0, 0xe39c6c8b},
- {0x86e4, 0x0bace52a},
+ {0x86e4, 0x0bace528},
{0x86e8, 0x6d0f6cb3},
- {0x86ec, 0xe52ae39c},
+ {0x86ec, 0xe528e39c},
{0x86f0, 0x6cdb0bad},
{0x86f4, 0xe39c6d0f},
- {0x86f8, 0x6cf5e52a},
+ {0x86f8, 0x6cf5e528},
{0x86fc, 0xe39c6d0f},
- {0x8700, 0x6c0be52a},
+ {0x8700, 0x6c0be528},
{0x8704, 0xe39c6d00},
- {0x8708, 0x6c25e52a},
- {0x870c, 0xe52ae39c},
+ {0x8708, 0x6c25e528},
+ {0x870c, 0xe528e39c},
{0x8710, 0x6c4df8c6},
- {0x8714, 0xe52ae39c},
+ {0x8714, 0xe528e39c},
{0x8718, 0x6c75f9cf},
- {0x871c, 0xe52ae39c},
+ {0x871c, 0xe528e39c},
{0x8720, 0xe39c6c99},
- {0x8724, 0xfad6e52a},
+ {0x8724, 0xfad6e528},
{0x8728, 0x21e87410},
{0x872c, 0x6e670009},
{0x8730, 0xe3c46f0f},
- {0x8734, 0x7410e52f},
+ {0x8734, 0x7410e52d},
{0x8738, 0x000b21e8},
{0x873c, 0xe3c46e8b},
- {0x8740, 0x7410e52f},
+ {0x8740, 0x7410e52d},
{0x8744, 0x000d21e8},
{0x8748, 0x6f0f6eb3},
- {0x874c, 0xe52fe3c4},
+ {0x874c, 0xe52de3c4},
{0x8750, 0xfe07ff08},
{0x8754, 0x21e87410},
{0x8758, 0x6ec7000e},
- {0x875c, 0xe52fe3c4},
+ {0x875c, 0xe52de3c4},
{0x8760, 0x21e87410},
{0x8764, 0x6edb000f},
{0x8768, 0xe3c46f0f},
- {0x876c, 0x7410e52f},
+ {0x876c, 0x7410e52d},
{0x8770, 0x001021e8},
{0x8774, 0xe3c46eef},
- {0x8778, 0xff03e52f},
- {0x877c, 0xe52ffe02},
+ {0x8778, 0xff03e52d},
+ {0x877c, 0xe52dfe02},
{0x8780, 0x21e87410},
{0x8784, 0x6e110013},
{0x8788, 0xe3c46f00},
- {0x878c, 0xff03e52f},
- {0x8790, 0xe52ffe02},
+ {0x878c, 0xff03e52d},
+ {0x8790, 0xe52dfe02},
{0x8794, 0x21e87410},
{0x8798, 0x6e250014},
- {0x879c, 0xe52fe3c4},
+ {0x879c, 0xe52de3c4},
{0x87a0, 0xff08fc24},
{0x87a4, 0x7410fe07},
{0x87a8, 0x001521e8},
{0x87ac, 0xe3c46e39},
- {0x87b0, 0x7410e52f},
+ {0x87b0, 0x7410e52d},
{0x87b4, 0x001621e8},
{0x87b8, 0xe3c46e4d},
- {0x87bc, 0xfd27e52f},
+ {0x87bc, 0xfd27e52d},
{0x87c0, 0x21e87410},
{0x87c4, 0x6e750018},
- {0x87c8, 0xe52fe3c4},
+ {0x87c8, 0xe52de3c4},
{0x87cc, 0x21e87410},
{0x87d0, 0x6e99001a},
- {0x87d4, 0xe52fe3c4},
+ {0x87d4, 0xe52de3c4},
{0x87d8, 0xe36afe24},
{0x87dc, 0x63404380},
{0x87e0, 0x43006880},
{0x87e4, 0x31300bac},
- {0x87e8, 0xe52f0022},
+ {0x87e8, 0xe52d0022},
{0x87ec, 0x54ec0002},
{0x87f0, 0x00220baa},
- {0x87f4, 0x0002e52f},
+ {0x87f4, 0x0002e52d},
{0x87f8, 0xe362e3e4},
{0x87fc, 0xe36a0001},
{0x8800, 0x63404380},
@@ -2770,7 +2770,7 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8838, 0x55010004},
{0x883c, 0x66055b40},
{0x8840, 0x62000007},
- {0x8844, 0xe40e6300},
+ {0x8844, 0xe40c6300},
{0x8848, 0x09000004},
{0x884c, 0x0b400a01},
{0x8850, 0x0e010d00},
@@ -2782,13 +2782,13 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8868, 0x00044d01},
{0x886c, 0x00074300},
{0x8870, 0x05a30562},
- {0x8874, 0xe40e961f},
+ {0x8874, 0xe40c961f},
{0x8878, 0xe37e0004},
{0x887c, 0x06a20007},
- {0x8880, 0xe40e07a3},
+ {0x8880, 0xe40c07a3},
{0x8884, 0xe37e0004},
- {0x8888, 0x0002e3fe},
- {0x888c, 0x4380e406},
+ {0x8888, 0x0002e3fc},
+ {0x888c, 0x4380e404},
{0x8890, 0x4d000007},
{0x8894, 0x43000004},
{0x8898, 0x000742fe},
@@ -2815,13 +2815,13 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x88ec, 0x42000004},
{0x88f0, 0x00070001},
{0x88f4, 0x62006220},
- {0x88f8, 0x0001e406},
+ {0x88f8, 0x0001e404},
{0x88fc, 0x63000007},
{0x8900, 0x09000004},
{0x8904, 0x0e010a00},
{0x8908, 0x00070032},
- {0x890c, 0xe40e06a2},
- {0x8910, 0x0002e41a},
+ {0x890c, 0xe40c06a2},
+ {0x8910, 0x0002e418},
{0x8914, 0x000742fe},
{0x8918, 0x00044d00},
{0x891c, 0x00014200},
@@ -2839,50 +2839,50 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x894c, 0x00014300},
{0x8950, 0x6c060005},
{0x8954, 0xe2aae298},
- {0x8958, 0xe42ae285},
- {0x895c, 0xe432e2f3},
+ {0x8958, 0xe428e285},
+ {0x895c, 0xe430e2f3},
{0x8960, 0x0001e30c},
{0x8964, 0x0005e285},
{0x8968, 0xe2986c06},
- {0x896c, 0xe42ae4a9},
- {0x8970, 0xe432e2f3},
+ {0x896c, 0xe428e4a7},
+ {0x8970, 0xe430e2f3},
{0x8974, 0x0001e30c},
{0x8978, 0x6c000005},
{0x897c, 0xe2aae298},
- {0x8980, 0xe445e285},
- {0x8984, 0xe44de2f3},
+ {0x8980, 0xe443e285},
+ {0x8984, 0xe44be2f3},
{0x8988, 0x0001e30c},
{0x898c, 0x0005e285},
{0x8990, 0xe2986c00},
- {0x8994, 0xe445e4a9},
- {0x8998, 0xe44de2f3},
+ {0x8994, 0xe443e4a7},
+ {0x8998, 0xe44be2f3},
{0x899c, 0x0001e30c},
{0x89a0, 0x6c040005},
{0x89a4, 0xe2aae298},
- {0x89a8, 0xe460e285},
- {0x89ac, 0xe468e2f3},
+ {0x89a8, 0xe45ee285},
+ {0x89ac, 0xe466e2f3},
{0x89b0, 0x0001e30c},
{0x89b4, 0x0005e285},
{0x89b8, 0xe2986c04},
- {0x89bc, 0xe460e4a9},
- {0x89c0, 0xe468e2f3},
+ {0x89bc, 0xe45ee4a7},
+ {0x89c0, 0xe466e2f3},
{0x89c4, 0x0001e30c},
{0x89c8, 0x6c020005},
{0x89cc, 0xe2aae298},
- {0x89d0, 0xe47be285},
- {0x89d4, 0xe483e2f3},
+ {0x89d0, 0xe479e285},
+ {0x89d4, 0xe481e2f3},
{0x89d8, 0x0001e30c},
{0x89dc, 0x0005e285},
{0x89e0, 0xe2986c02},
- {0x89e4, 0xe47be4a9},
- {0x89e8, 0xe483e2f3},
+ {0x89e4, 0xe479e4a7},
+ {0x89e8, 0xe481e2f3},
{0x89ec, 0x0001e30c},
{0x89f0, 0x43800004},
{0x89f4, 0x610a6008},
{0x89f8, 0x63ce6200},
{0x89fc, 0x60800006},
{0x8a00, 0x00047f00},
- {0x8a04, 0xe4e04300},
+ {0x8a04, 0xe4de4300},
{0x8a08, 0x00070001},
{0x8a0c, 0x4d015500},
{0x8a10, 0x74200004},
@@ -2895,22 +2895,22 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8a2c, 0x00014300},
{0x8a30, 0x74200004},
{0x8a34, 0x77000005},
- {0x8a38, 0x73887e07},
+ {0x8a38, 0x73887e06},
{0x8a3c, 0x8f007380},
{0x8a40, 0x0004140f},
{0x8a44, 0x00057430},
{0x8a48, 0x00017300},
- {0x8a4c, 0x0005e496},
+ {0x8a4c, 0x0005e494},
{0x8a50, 0x00017300},
{0x8a54, 0x43800004},
{0x8a58, 0x0006b103},
{0x8a5c, 0x91037cdb},
{0x8a60, 0x40db0007},
{0x8a64, 0x43000004},
- {0x8a68, 0x0005e496},
+ {0x8a68, 0x0005e494},
{0x8a6c, 0x00067380},
{0x8a70, 0x60025d01},
- {0x8a74, 0xe4ba6200},
+ {0x8a74, 0xe4b86200},
{0x8a78, 0x73000005},
{0x8a7c, 0x76080007},
{0x8a80, 0x00047578},
@@ -2943,8 +2943,8 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8aec, 0x7cdb0006},
{0x8af0, 0x00079103},
{0x8af4, 0x000440db},
- {0x8af8, 0xe4964300},
- {0x8afc, 0xe4ba7e03},
+ {0x8af8, 0xe4944300},
+ {0x8afc, 0xe4b87e03},
{0x8b00, 0x43800004},
{0x8b04, 0x0006b103},
{0x8b08, 0x91037c5b},
@@ -2976,14 +2976,14 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8b70, 0x43000004},
{0x8b74, 0x73000005},
{0x8b78, 0x76000007},
- {0x8b7c, 0xe4c30001},
+ {0x8b7c, 0xe4c10001},
{0x8b80, 0x00040001},
{0x8b84, 0x60004380},
{0x8b88, 0x62016100},
{0x8b8c, 0x00066310},
{0x8b90, 0x00046000},
{0x8b94, 0x00014300},
- {0x8b98, 0x0001e4e0},
+ {0x8b98, 0x0001e4de},
{0x8b9c, 0x4e004f02},
{0x8ba0, 0x52015302},
{0x8ba4, 0x140f0001},
@@ -3030,7 +3030,7 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8c48, 0xbf1ae3ac},
{0x8c4c, 0xe36e300b},
{0x8c50, 0xe390e377},
- {0x8c54, 0x0001e523},
+ {0x8c54, 0x0001e521},
{0x8c58, 0x54c054bf},
{0x8c5c, 0x54c154a3},
{0x8c60, 0x4c1854a4},
@@ -3039,7 +3039,7 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8c6c, 0xbf051402},
{0x8c70, 0x54a354c1},
{0x8c74, 0xbf011402},
- {0x8c78, 0x54dfe534},
+ {0x8c78, 0x54dfe532},
{0x8c7c, 0x54bf0001},
{0x8c80, 0x050a54e5},
{0x8c84, 0x000154df},
@@ -3060,186 +3060,185 @@ static const struct rtw89_reg2_def rtw89_8851b_phy_nctl_regs[] = {
{0x8cc0, 0x56005610},
{0x8cc4, 0x00018c00},
{0x8cc8, 0x57005704},
- {0x8ccc, 0xa7038e00},
- {0x8cd0, 0x33f0aff7},
- {0x8cd4, 0xaf034019},
- {0x8cd8, 0x33f0402b},
- {0x8cdc, 0x33df402b},
- {0x8ce0, 0x57005708},
- {0x8ce4, 0x57818e00},
- {0x8ce8, 0x8e005780},
- {0x8cec, 0x00074380},
- {0x8cf0, 0x5c005c01},
- {0x8cf4, 0x00041403},
- {0x8cf8, 0x00014300},
- {0x8cfc, 0x0007427f},
- {0x8d00, 0x62006280},
- {0x8d04, 0x00049200},
- {0x8d08, 0x00014200},
- {0x8d0c, 0x0007427f},
- {0x8d10, 0x63146394},
- {0x8d14, 0x00049200},
- {0x8d18, 0x00014200},
- {0x8d1c, 0x42fe0004},
- {0x8d20, 0x4d010007},
- {0x8d24, 0x42000004},
- {0x8d28, 0x140f7420},
- {0x8d2c, 0x57005710},
- {0x8d30, 0x0001141f},
- {0x8d34, 0x42fe0004},
- {0x8d38, 0x4d010007},
- {0x8d3c, 0x42000004},
- {0x8d40, 0x140f7420},
- {0x8d44, 0x000742bf},
- {0x8d48, 0x62006240},
- {0x8d4c, 0x0004141f},
- {0x8d50, 0x00014200},
- {0x8d54, 0x5d060006},
- {0x8d58, 0x61046003},
- {0x8d5c, 0x00056201},
- {0x8d60, 0x00017310},
- {0x8d64, 0x43800004},
- {0x8d68, 0x5e010007},
- {0x8d6c, 0x140a5e00},
- {0x8d70, 0x0006b103},
- {0x8d74, 0x91037f07},
- {0x8d78, 0x43070007},
- {0x8d7c, 0x5c000006},
- {0x8d80, 0x5e035d02},
- {0x8d84, 0x43000004},
- {0x8d88, 0x00060001},
- {0x8d8c, 0x60005d04},
- {0x8d90, 0x62016104},
- {0x8d94, 0x73100005},
- {0x8d98, 0x00040001},
- {0x8d9c, 0x00074380},
- {0x8da0, 0x5e005e01},
- {0x8da4, 0xb103140a},
- {0x8da8, 0x7fc60006},
- {0x8dac, 0x00079103},
- {0x8db0, 0x000643c6},
- {0x8db4, 0x5d025c00},
- {0x8db8, 0x00045e03},
- {0x8dbc, 0x00014300},
- {0x8dc0, 0x5d040006},
- {0x8dc4, 0x61046000},
- {0x8dc8, 0x00056201},
- {0x8dcc, 0x00017310},
- {0x8dd0, 0x43800004},
- {0x8dd4, 0x5e010007},
- {0x8dd8, 0x140a5e00},
- {0x8ddc, 0x0006b103},
- {0x8de0, 0x91037fc6},
- {0x8de4, 0x43c60007},
- {0x8de8, 0x5c000006},
- {0x8dec, 0x5e035d02},
- {0x8df0, 0x43000004},
- {0x8df4, 0x00060001},
- {0x8df8, 0x60025d00},
- {0x8dfc, 0x62016100},
- {0x8e00, 0x73000005},
- {0x8e04, 0x00040001},
- {0x8e08, 0x00074380},
- {0x8e0c, 0x5e005e01},
- {0x8e10, 0xb103140a},
- {0x8e14, 0x7fc00006},
- {0x8e18, 0x00079103},
- {0x8e1c, 0x000643c0},
- {0x8e20, 0x5d025c00},
- {0x8e24, 0x00045e03},
- {0x8e28, 0x00014300},
- {0x8e2c, 0x7e020005},
- {0x8e30, 0x42f70004},
- {0x8e34, 0x6c080005},
- {0x8e38, 0x42700004},
- {0x8e3c, 0x73810005},
- {0x8e40, 0x93007380},
- {0x8e44, 0x42f70004},
- {0x8e48, 0x6c000005},
- {0x8e4c, 0x42000004},
- {0x8e50, 0x00040001},
- {0x8e54, 0x00074380},
- {0x8e58, 0x73007304},
- {0x8e5c, 0x72401405},
- {0x8e60, 0x43000004},
- {0x8e64, 0x74040006},
- {0x8e68, 0x40010007},
- {0x8e6c, 0xab004000},
- {0x8e70, 0x0001140f},
- {0x8e74, 0x140ae517},
- {0x8e78, 0x140ae4c3},
- {0x8e7c, 0x0001e51e},
- {0x8e80, 0xe4c3e517},
- {0x8e84, 0x00040001},
- {0x8e88, 0x00047410},
- {0x8e8c, 0x42f04380},
- {0x8e90, 0x62080007},
- {0x8e94, 0x24206301},
- {0x8e98, 0x14c80000},
- {0x8e9c, 0x00002428},
- {0x8ea0, 0x1a4215f4},
- {0x8ea4, 0x6300000b},
- {0x8ea8, 0x42000004},
- {0x8eac, 0x74304300},
- {0x8eb0, 0x4380140f},
- {0x8eb4, 0x73080007},
- {0x8eb8, 0x00047300},
- {0x8ebc, 0x00014300},
- {0x8ec0, 0x4bf00007},
- {0x8ec4, 0x490b4a8f},
- {0x8ec8, 0x4a8e48f1},
- {0x8ecc, 0x48a5490a},
- {0x8ed0, 0x49094a8d},
- {0x8ed4, 0x4a8c487d},
- {0x8ed8, 0x48754908},
- {0x8edc, 0x49074a8b},
- {0x8ee0, 0x4a8a4889},
- {0x8ee4, 0x48b74906},
- {0x8ee8, 0x49054a89},
- {0x8eec, 0x4a8848fc},
- {0x8ef0, 0x48564905},
- {0x8ef4, 0x49044a87},
- {0x8ef8, 0x4a8648c1},
- {0x8efc, 0x483d4904},
- {0x8f00, 0x49034a85},
- {0x8f04, 0x4a8448c7},
- {0x8f08, 0x485e4903},
- {0x8f0c, 0x49024a83},
- {0x8f10, 0x4a8248ac},
- {0x8f14, 0x48624902},
- {0x8f18, 0x49024a81},
- {0x8f1c, 0x4a804820},
- {0x8f20, 0x48004900},
- {0x8f24, 0x49014a90},
- {0x8f28, 0x4a10481f},
- {0x8f2c, 0x00060001},
- {0x8f30, 0x5f005f80},
- {0x8f34, 0x00059900},
- {0x8f38, 0x00017300},
- {0x8f3c, 0x63800006},
- {0x8f40, 0x98006300},
- {0x8f44, 0x549f0001},
- {0x8f48, 0x5c015400},
- {0x8f4c, 0x540054df},
- {0x8f50, 0x00015c02},
- {0x8f54, 0x07145c01},
- {0x8f58, 0x5c025400},
- {0x8f5c, 0x5c020001},
- {0x8f60, 0x54000714},
- {0x8f64, 0x00015c01},
- {0x8f68, 0x4c184c98},
- {0x8f6c, 0x00080001},
- {0x8f70, 0x5c020004},
- {0x8f74, 0x09017430},
- {0x8f78, 0x0ba60c01},
- {0x8f7c, 0x77800005},
- {0x8f80, 0x52200007},
- {0x8f84, 0x43800004},
- {0x8f88, 0x610a6008},
- {0x8f8c, 0x63c26200},
- {0x8f90, 0x5c000007},
- {0x8f94, 0x43000004},
- {0x8f98, 0x00000001},
+ {0x8ccc, 0x33ee8e00},
+ {0x8cd0, 0xaf034019},
+ {0x8cd4, 0x33ee402b},
+ {0x8cd8, 0x33df402b},
+ {0x8cdc, 0x57005708},
+ {0x8ce0, 0x57818e00},
+ {0x8ce4, 0x8e005780},
+ {0x8ce8, 0x00074380},
+ {0x8cec, 0x5c005c01},
+ {0x8cf0, 0x00041403},
+ {0x8cf4, 0x00014300},
+ {0x8cf8, 0x0007427f},
+ {0x8cfc, 0x62006280},
+ {0x8d00, 0x00049200},
+ {0x8d04, 0x00014200},
+ {0x8d08, 0x0007427f},
+ {0x8d0c, 0x63146394},
+ {0x8d10, 0x00049200},
+ {0x8d14, 0x00014200},
+ {0x8d18, 0x42fe0004},
+ {0x8d1c, 0x4d010007},
+ {0x8d20, 0x42000004},
+ {0x8d24, 0x140f7420},
+ {0x8d28, 0x57005710},
+ {0x8d2c, 0x0001141f},
+ {0x8d30, 0x42fe0004},
+ {0x8d34, 0x4d010007},
+ {0x8d38, 0x42000004},
+ {0x8d3c, 0x140f7420},
+ {0x8d40, 0x000742bf},
+ {0x8d44, 0x62006240},
+ {0x8d48, 0x0004141f},
+ {0x8d4c, 0x00014200},
+ {0x8d50, 0x5d060006},
+ {0x8d54, 0x61046003},
+ {0x8d58, 0x00056200},
+ {0x8d5c, 0x00017310},
+ {0x8d60, 0x43800004},
+ {0x8d64, 0x5e010007},
+ {0x8d68, 0x140a5e00},
+ {0x8d6c, 0x0006b103},
+ {0x8d70, 0x91037f07},
+ {0x8d74, 0x43070007},
+ {0x8d78, 0x5c000006},
+ {0x8d7c, 0x5e035d02},
+ {0x8d80, 0x43000004},
+ {0x8d84, 0x00060001},
+ {0x8d88, 0x60005d04},
+ {0x8d8c, 0x62006104},
+ {0x8d90, 0x73100005},
+ {0x8d94, 0x00040001},
+ {0x8d98, 0x00074380},
+ {0x8d9c, 0x5e005e01},
+ {0x8da0, 0xb103140a},
+ {0x8da4, 0x7fc60006},
+ {0x8da8, 0x00079103},
+ {0x8dac, 0x000643c6},
+ {0x8db0, 0x5d025c00},
+ {0x8db4, 0x00045e03},
+ {0x8db8, 0x00014300},
+ {0x8dbc, 0x5d040006},
+ {0x8dc0, 0x61046000},
+ {0x8dc4, 0x00056200},
+ {0x8dc8, 0x00017310},
+ {0x8dcc, 0x43800004},
+ {0x8dd0, 0x5e010007},
+ {0x8dd4, 0x140a5e00},
+ {0x8dd8, 0x0006b103},
+ {0x8ddc, 0x91037fc6},
+ {0x8de0, 0x43c60007},
+ {0x8de4, 0x5c000006},
+ {0x8de8, 0x5e035d02},
+ {0x8dec, 0x43000004},
+ {0x8df0, 0x00060001},
+ {0x8df4, 0x60025d00},
+ {0x8df8, 0x62006100},
+ {0x8dfc, 0x73000005},
+ {0x8e00, 0x00040001},
+ {0x8e04, 0x00074380},
+ {0x8e08, 0x5e005e01},
+ {0x8e0c, 0xb103140a},
+ {0x8e10, 0x7fc00006},
+ {0x8e14, 0x00079103},
+ {0x8e18, 0x000643c0},
+ {0x8e1c, 0x5d025c00},
+ {0x8e20, 0x00045e03},
+ {0x8e24, 0x00014300},
+ {0x8e28, 0x7e020005},
+ {0x8e2c, 0x42f70004},
+ {0x8e30, 0x6c080005},
+ {0x8e34, 0x42700004},
+ {0x8e38, 0x73810005},
+ {0x8e3c, 0x93007380},
+ {0x8e40, 0x42f70004},
+ {0x8e44, 0x6c000005},
+ {0x8e48, 0x42000004},
+ {0x8e4c, 0x00040001},
+ {0x8e50, 0x00074380},
+ {0x8e54, 0x73007304},
+ {0x8e58, 0x72401405},
+ {0x8e5c, 0x43000004},
+ {0x8e60, 0x74040006},
+ {0x8e64, 0x40010007},
+ {0x8e68, 0xab004000},
+ {0x8e6c, 0x0001140f},
+ {0x8e70, 0x140ae515},
+ {0x8e74, 0x140ae4c1},
+ {0x8e78, 0x0001e51c},
+ {0x8e7c, 0xe4c1e515},
+ {0x8e80, 0x00040001},
+ {0x8e84, 0x00047410},
+ {0x8e88, 0x42f04380},
+ {0x8e8c, 0x62080007},
+ {0x8e90, 0x24206301},
+ {0x8e94, 0x14c80000},
+ {0x8e98, 0x00002428},
+ {0x8e9c, 0x1a4215f4},
+ {0x8ea0, 0x6300000b},
+ {0x8ea4, 0x42000004},
+ {0x8ea8, 0x74304300},
+ {0x8eac, 0x4380140f},
+ {0x8eb0, 0x73080007},
+ {0x8eb4, 0x00047300},
+ {0x8eb8, 0x00014300},
+ {0x8ebc, 0x4bf00007},
+ {0x8ec0, 0x490b4a8f},
+ {0x8ec4, 0x4a8e48f1},
+ {0x8ec8, 0x48a5490a},
+ {0x8ecc, 0x49094a8d},
+ {0x8ed0, 0x4a8c487d},
+ {0x8ed4, 0x48754908},
+ {0x8ed8, 0x49074a8b},
+ {0x8edc, 0x4a8a4889},
+ {0x8ee0, 0x48b74906},
+ {0x8ee4, 0x49054a89},
+ {0x8ee8, 0x4a8848fc},
+ {0x8eec, 0x48564905},
+ {0x8ef0, 0x49044a87},
+ {0x8ef4, 0x4a8648c1},
+ {0x8ef8, 0x483d4904},
+ {0x8efc, 0x49034a85},
+ {0x8f00, 0x4a8448c7},
+ {0x8f04, 0x485e4903},
+ {0x8f08, 0x49024a83},
+ {0x8f0c, 0x4a8248ac},
+ {0x8f10, 0x48624902},
+ {0x8f14, 0x49024a81},
+ {0x8f18, 0x4a804820},
+ {0x8f1c, 0x48004900},
+ {0x8f20, 0x49014a90},
+ {0x8f24, 0x4a10481f},
+ {0x8f28, 0x00060001},
+ {0x8f2c, 0x5f005f80},
+ {0x8f30, 0x00059900},
+ {0x8f34, 0x00017300},
+ {0x8f38, 0x63800006},
+ {0x8f3c, 0x98006300},
+ {0x8f40, 0x549f0001},
+ {0x8f44, 0x5c015400},
+ {0x8f48, 0x540054df},
+ {0x8f4c, 0x00015c02},
+ {0x8f50, 0x07145c01},
+ {0x8f54, 0x5c025400},
+ {0x8f58, 0x5c020001},
+ {0x8f5c, 0x54000714},
+ {0x8f60, 0x00015c01},
+ {0x8f64, 0x4c184c98},
+ {0x8f68, 0x00080001},
+ {0x8f6c, 0x5c020004},
+ {0x8f70, 0x09017430},
+ {0x8f74, 0x0ba60c01},
+ {0x8f78, 0x77800005},
+ {0x8f7c, 0x52200007},
+ {0x8f80, 0x43800004},
+ {0x8f84, 0x610a6008},
+ {0x8f88, 0x63c26200},
+ {0x8f8c, 0x5c000007},
+ {0x8f90, 0x43000004},
+ {0x8f94, 0x00000001},
{0x8080, 0x00000004},
{0x8080, 0x00000000},
{0x8088, 0x00000000},
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 5/6] wifi: rtw89: 8851b: rfk: update DPK to 0x11
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
` (3 preceding siblings ...)
2025-06-27 3:51 ` [PATCH rtw-next 4/6] wifi: rtw89: 8851b: update NCTL 0xB Ping-Ke Shih
@ 2025-06-27 3:53 ` Ping-Ke Shih
2025-06-27 3:53 ` [PATCH rtw-next 6/6] wifi: rtw89: 8851b: rfk: update IQK to 0x14 Ping-Ke Shih
5 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:53 UTC (permalink / raw)
To: linux-wireless
Update DPK with TX/RX clock to 960MHz and 1920MHz, which improve
performance on certain chips.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/reg.h | 3 +
.../net/wireless/realtek/rtw89/rtw8851b_rfk.c | 109 +++++++++++++++---
.../realtek/rtw89/rtw8851b_rfk_table.c | 25 ----
.../realtek/rtw89/rtw8851b_rfk_table.h | 1 -
4 files changed, 98 insertions(+), 40 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h
index 4a65b0c9c2d1..90625d692b4d 100644
--- a/drivers/net/wireless/realtek/rtw89/reg.h
+++ b/drivers/net/wireless/realtek/rtw89/reg.h
@@ -8775,6 +8775,8 @@
#define B_P0_TSSI_RFC GENMASK(28, 27)
#define B_P0_TSSI_OFT_EN BIT(28)
#define B_P0_TSSI_OFT GENMASK(7, 0)
+#define R_P0_TSSI_SLOPE_CAL 0x581c
+#define B_P0_TSSI_SLOPE_CAL_EN BIT(20)
#define R_P0_TSSI_AVG 0x5820
#define B_P0_TSSI_EN BIT(31)
#define B_P0_TSSI_AVG GENMASK(15, 12)
@@ -9268,6 +9270,7 @@
#define B_WDADC_SEL GENMASK(5, 4)
#define R_ADCMOD 0xC0E8
#define B_ADCMOD_LP GENMASK(31, 16)
+#define B_ADCMOD_AUTO_RST BIT(6)
#define R_DCIM 0xC0EC
#define B_DCIM_RC GENMASK(23, 16)
#define B_DCIM_FR GENMASK(14, 13)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
index f72b3ac6f149..907ce6d3c1b1 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
@@ -12,8 +12,8 @@
#include "rtw8851b_rfk_table.h"
#include "rtw8851b_table.h"
-#define DPK_VER_8851B 0x5
-#define DPK_KIP_REG_NUM_8851B 7
+#define DPK_VER_8851B 0x11
+#define DPK_KIP_REG_NUM_8851B 8
#define DPK_RF_REG_NUM_8851B 4
#define DPK_KSET_NUM 4
#define RTW8851B_RXK_GROUP_NR 4
@@ -85,6 +85,24 @@ enum rf_mode {
RF_RXK2 = 0x7,
};
+enum adc_ck {
+ ADC_NA = 0,
+ ADC_480M = 1,
+ ADC_960M = 2,
+ ADC_1920M = 3,
+};
+
+enum dac_ck {
+ DAC_40M = 0,
+ DAC_80M = 1,
+ DAC_120M = 2,
+ DAC_160M = 3,
+ DAC_240M = 4,
+ DAC_320M = 5,
+ DAC_480M = 6,
+ DAC_960M = 7,
+};
+
static const u32 _tssi_de_cck_long[RF_PATH_NUM_8851B] = {0x5858};
static const u32 _tssi_de_cck_short[RF_PATH_NUM_8851B] = {0x5860};
static const u32 _tssi_de_mcs_20m[RF_PATH_NUM_8851B] = {0x5838};
@@ -116,7 +134,7 @@ static const u32 rtw8851b_backup_rf_regs[] = {
#define BACKUP_RF_REGS_NR ARRAY_SIZE(rtw8851b_backup_rf_regs)
static const u32 dpk_kip_reg[DPK_KIP_REG_NUM_8851B] = {
- 0x813c, 0x8124, 0xc0ec, 0xc0e8, 0xc0c4, 0xc0d4, 0xc0d8};
+ 0x813c, 0x8124, 0xc0ec, 0xc0e8, 0xc0c4, 0xc0d4, 0xc0d8, 0x12a0};
static const u32 dpk_rf_reg[DPK_RF_REG_NUM_8851B] = {0xde, 0x8f, 0x5, 0x10005};
static void _set_ch(struct rtw89_dev *rtwdev, u32 val);
@@ -163,6 +181,51 @@ static void _rfk_drf_direct_cntrl(struct rtw89_dev *rtwdev,
rtw89_write_rf(rtwdev, path, RR_BBDC, RR_BBDC_SEL, 0x0);
}
+static void _txck_force(struct rtw89_dev *rtwdev, enum rtw89_rf_path path,
+ bool force, enum dac_ck ck)
+{
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 13), B_P0_TXCK_ON, 0x0);
+
+ if (!force)
+ return;
+
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 13), B_P0_TXCK_VAL, ck);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 13), B_P0_TXCK_ON, 0x1);
+}
+
+static void _rxck_force(struct rtw89_dev *rtwdev, enum rtw89_rf_path path,
+ bool force, enum adc_ck ck)
+{
+ static const u32 ck960_8851b[] = {0x8, 0x2, 0x2, 0x4, 0xf, 0xa, 0x93};
+ static const u32 ck1920_8851b[] = {0x9, 0x0, 0x0, 0x3, 0xf, 0xa, 0x49};
+ const u32 *data;
+
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 13), B_P0_RXCK_ON, 0x0);
+ if (!force)
+ return;
+
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 13), B_P0_RXCK_VAL, ck);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 13), B_P0_RXCK_ON, 0x1);
+
+ switch (ck) {
+ case ADC_960M:
+ data = ck960_8851b;
+ break;
+ case ADC_1920M:
+ default:
+ data = ck1920_8851b;
+ break;
+ }
+
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0 | (path << 8), B_P0_CFCH_CTL, data[0]);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0 | (path << 8), B_P0_CFCH_EN, data[1]);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW0 | (path << 8), B_P0_CFCH_BW0, data[2]);
+ rtw89_phy_write32_mask(rtwdev, R_P0_CFCH_BW1 | (path << 8), B_P0_CFCH_BW1, data[3]);
+ rtw89_phy_write32_mask(rtwdev, R_DRCK | (path << 8), B_DRCK_MUL, data[4]);
+ rtw89_phy_write32_mask(rtwdev, R_ADCMOD | (path << 8), B_ADCMOD_LP, data[5]);
+ rtw89_phy_write32_mask(rtwdev, R_P0_RXCK | (path << 8), B_P0_RXCK_ADJ, data[6]);
+}
+
static void _wait_rx_mode(struct rtw89_dev *rtwdev, u8 kpath)
{
u32 rf_mode;
@@ -1794,7 +1857,21 @@ static void _dpk_bb_afe_setting(struct rtw89_dev *rtwdev, enum rtw89_rf_path pat
rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, BIT(28 + path), 0x0);
rtw89_phy_write32_mask(rtwdev, R_UPD_CLK + (path << 13), MASKDWORD, 0xd801dffd);
- rtw89_rfk_parser(rtwdev, &rtw8851b_iqk_bb_afe_defs_tbl);
+ _txck_force(rtwdev, path, true, DAC_960M);
+ _rxck_force(rtwdev, path, true, ADC_1920M);
+
+ rtw89_phy_write32_mask(rtwdev, R_DCIM, B_DCIM_FR, 0x0);
+ rtw89_phy_write32_mask(rtwdev, R_ADCMOD, B_ADCMOD_AUTO_RST, 0x1);
+ rtw89_phy_write32_mask(rtwdev, R_P0_NRBW, B_P0_NRBW_DBG, 0x1);
+ udelay(1);
+ rtw89_phy_write32_mask(rtwdev, R_ANAPAR_PW15, B_ANAPAR_PW15, 0x1f);
+ udelay(10);
+ rtw89_phy_write32_mask(rtwdev, R_ANAPAR_PW15, B_ANAPAR_PW15, 0x13);
+ udelay(2);
+ rtw89_phy_write32_mask(rtwdev, R_ANAPAR, B_ANAPAR_15, 0x0001);
+ udelay(2);
+ rtw89_phy_write32_mask(rtwdev, R_ANAPAR, B_ANAPAR_15, 0x0041);
+ udelay(10);
rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, BIT(20 + path), 0x1);
rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, BIT(28 + path), 0x1);
@@ -1827,6 +1904,17 @@ static void _dpk_tssi_pause(struct rtw89_dev *rtwdev, enum rtw89_rf_path path,
is_pause ? "pause" : "resume");
}
+static
+void _dpk_tssi_slope_k_onoff(struct rtw89_dev *rtwdev, enum rtw89_rf_path path,
+ bool is_on)
+{
+ rtw89_phy_write32_mask(rtwdev, R_P0_TSSI_SLOPE_CAL + (path << 13),
+ B_P0_TSSI_SLOPE_CAL_EN, is_on);
+
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[DPK] S%d TSSI slpoe_k %s\n", path,
+ str_on_off(is_on));
+}
+
static void _dpk_tpg_sel(struct rtw89_dev *rtwdev, enum rtw89_rf_path path, u8 kidx)
{
struct rtw89_dpk_info *dpk = &rtwdev->dpk;
@@ -1874,9 +1962,6 @@ static void _dpk_kip_control_rfc(struct rtw89_dev *rtwdev,
{
rtw89_phy_write32_mask(rtwdev, R_UPD_CLK + (path << 13),
B_IQK_RFC_ON, ctrl_by_kip);
-
- rtw89_debug(rtwdev, RTW89_DBG_RFK, "[DPK] RFC is controlled by %s\n",
- ctrl_by_kip ? "KIP" : "BB");
}
static void _dpk_kip_preset(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
@@ -2279,7 +2364,7 @@ static void _dpk_set_mdpd_para(struct rtw89_dev *rtwdev, u8 order)
case 0: /* (5,3,1) */
rtw89_phy_write32_mask(rtwdev, R_LDL_NORM, B_LDL_NORM_OP, 0x0);
rtw89_phy_write32_mask(rtwdev, R_DPK_IDL, B_DPK_IDL_SEL, 0x2);
- rtw89_phy_write32_mask(rtwdev, R_LDL_NORM, B_LDL_NORM_PN, 0x4);
+ rtw89_phy_write32_mask(rtwdev, R_LDL_NORM, B_LDL_NORM_PN, 0x3);
rtw89_phy_write32_mask(rtwdev, R_MDPK_SYNC, B_MDPK_SYNC_DMAN, 0x1);
break;
case 1: /* (5,3,0) */
@@ -2315,8 +2400,6 @@ static void _dpk_set_mdpd_para(struct rtw89_dev *rtwdev, u8 order)
static void _dpk_idl_mpa(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
enum rtw89_rf_path path, u8 kidx)
{
- rtw89_phy_write32_mask(rtwdev, R_LDL_NORM, B_LDL_NORM_MA, 0x1);
-
if (rtw89_phy_read32_mask(rtwdev, R_IDL_MPA, B_IDL_MD500) == 0x1)
_dpk_set_mdpd_para(rtwdev, 0x2);
else if (rtw89_phy_read32_mask(rtwdev, R_IDL_MPA, B_IDL_MD530) == 0x1)
@@ -2419,9 +2502,6 @@ static bool _dpk_main(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
u8 init_xdbm = 17;
bool is_fail;
- if (dpk->bp[path][kidx].band != RTW89_BAND_2G)
- init_xdbm = 15;
-
_dpk_kip_control_rfc(rtwdev, path, false);
_rfk_rf_direct_cntrl(rtwdev, path, false);
rtw89_write_rf(rtwdev, path, RR_BBDC, RFREG_MASK, 0x03ffd);
@@ -2485,6 +2565,7 @@ static void _dpk_cal_select(struct rtw89_dev *rtwdev, bool force,
"[DPK] ========= S%d[%d] DPK Start =========\n",
path, dpk->cur_idx[path]);
+ _dpk_tssi_slope_k_onoff(rtwdev, path, false);
_dpk_rxagc_onoff(rtwdev, path, false);
_rfk_drf_direct_cntrl(rtwdev, path, false);
_dpk_bb_afe_setting(rtwdev, path);
@@ -2502,7 +2583,7 @@ static void _dpk_cal_select(struct rtw89_dev *rtwdev, bool force,
_dpk_reload_rf(rtwdev, dpk_rf_reg, rf_bkup, path);
_dpk_bb_afe_restore(rtwdev, path);
_dpk_rxagc_onoff(rtwdev, path, true);
-
+ _dpk_tssi_slope_k_onoff(rtwdev, path, true);
if (rtwdev->is_tssi_mode[path])
_dpk_tssi_pause(rtwdev, path, false);
}
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c
index 0abf7978ccab..38ce03331069 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c
@@ -182,31 +182,6 @@ static const struct rtw89_reg5_def rtw8851b_iqk_macbb_defs[] = {
RTW89_DECLARE_RFK_TBL(rtw8851b_iqk_macbb_defs);
-static const struct rtw89_reg5_def rtw8851b_iqk_bb_afe_defs[] = {
- RTW89_DECL_RFK_WM(0x5670, 0x00004000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00008000, 0x1),
- RTW89_DECL_RFK_WM(0x5670, 0x80000000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00007000, 0x7),
- RTW89_DECL_RFK_WM(0x5670, 0x00002000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00080000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00070000, 0x3),
- RTW89_DECL_RFK_WM(0x5670, 0x60000000, 0x2),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00000780, 0x9),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00007800, 0x1),
- RTW89_DECL_RFK_WM(0xc0d4, 0x0c000000, 0x0),
- RTW89_DECL_RFK_WM(0xc0d8, 0x000001e0, 0x3),
- RTW89_DECL_RFK_WM(0xc0c4, 0x003e0000, 0xa),
- RTW89_DECL_RFK_WM(0xc0ec, 0x00006000, 0x0),
- RTW89_DECL_RFK_WM(0xc0e8, 0x00000040, 0x1),
- RTW89_DECL_RFK_WM(0x12b8, 0x40000000, 0x1),
- RTW89_DECL_RFK_WM(0x030c, MASKBYTE3, 0x1f),
- RTW89_DECL_RFK_WM(0x030c, MASKBYTE3, 0x13),
- RTW89_DECL_RFK_WM(0x032c, MASKHWORD, 0x0001),
- RTW89_DECL_RFK_WM(0x032c, MASKHWORD, 0x0041),
-};
-
-RTW89_DECLARE_RFK_TBL(rtw8851b_iqk_bb_afe_defs);
-
static const struct rtw89_reg5_def rtw8851b_tssi_sys_defs[] = {
RTW89_DECL_RFK_WM(0x12bc, 0x000ffff0, 0xb5b5),
RTW89_DECL_RFK_WM(0x32bc, 0x000ffff0, 0xb5b5),
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h
index febfbecb691c..4fd81456109b 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h
@@ -17,7 +17,6 @@ extern const struct rtw89_rfk_tbl rtw8851b_iqk_rxclk_others_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_txk_2ghz_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_txk_5ghz_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_afebb_restore_defs_tbl;
-extern const struct rtw89_rfk_tbl rtw8851b_iqk_bb_afe_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_macbb_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_tssi_sys_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_tssi_sys_a_defs_2g_tbl;
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rtw-next 6/6] wifi: rtw89: 8851b: rfk: update IQK to 0x14
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
` (4 preceding siblings ...)
2025-06-27 3:53 ` [PATCH rtw-next 5/6] wifi: rtw89: 8851b: rfk: update DPK to 0x11 Ping-Ke Shih
@ 2025-06-27 3:53 ` Ping-Ke Shih
5 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-06-27 3:53 UTC (permalink / raw)
To: linux-wireless
Update IQK along with TX/RX clock to 960MHz and 1920MHz to improve
performance.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
.../net/wireless/realtek/rtw89/rtw8851b_rfk.c | 47 +++++++++++++++--
.../realtek/rtw89/rtw8851b_rfk_table.c | 52 ++++++++-----------
.../realtek/rtw89/rtw8851b_rfk_table.h | 1 +
3 files changed, 66 insertions(+), 34 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
index 907ce6d3c1b1..7a319a6c838a 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
@@ -19,7 +19,7 @@
#define RTW8851B_RXK_GROUP_NR 4
#define RTW8851B_RXK_GROUP_IDX_NR 2
#define RTW8851B_TXK_GROUP_NR 1
-#define RTW8851B_IQK_VER 0x2a
+#define RTW8851B_IQK_VER 0x14
#define RTW8851B_IQK_SS 1
#define RTW8851B_LOK_GRAM 10
#define RTW8851B_TSSI_PATH_NR 1
@@ -1107,10 +1107,43 @@ static void _iqk_rxclk_setting(struct rtw89_dev *rtwdev, u8 path)
rtw89_write_rf(rtwdev, path, RR_RXBB2, RR_RXBB2_CKT, 0x1);
- if (iqk_info->iqk_bw[path] == RTW89_CHANNEL_WIDTH_80)
+ if (iqk_info->iqk_bw[path] == RTW89_CHANNEL_WIDTH_80) {
+ rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, B_ADC_FIFO_RXK, 0x0101);
+ rtw89_phy_write32_mask(rtwdev, R_UPD_CLK, B_DPD_GDIS, 0x1);
+
+ _rxck_force(rtwdev, path, true, ADC_960M);
+
rtw89_rfk_parser(rtwdev, &rtw8851b_iqk_rxclk_80_defs_tbl);
- else
+ } else {
+ rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, B_ADC_FIFO_RXK, 0x0101);
+ rtw89_phy_write32_mask(rtwdev, R_UPD_CLK, B_DPD_GDIS, 0x1);
+
+ _rxck_force(rtwdev, path, true, ADC_960M);
+
rtw89_rfk_parser(rtwdev, &rtw8851b_iqk_rxclk_others_defs_tbl);
+ }
+
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, (2)before RXK IQK\n", path);
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[07:10] = 0x%x\n", path,
+ 0xc0d4, rtw89_phy_read32_mask(rtwdev, 0xc0d4, GENMASK(10, 7)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[11:14] = 0x%x\n", path,
+ 0xc0d4, rtw89_phy_read32_mask(rtwdev, 0xc0d4, GENMASK(14, 11)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[26:27] = 0x%x\n", path,
+ 0xc0d4, rtw89_phy_read32_mask(rtwdev, 0xc0d4, GENMASK(27, 26)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[05:08] = 0x%x\n", path,
+ 0xc0d8, rtw89_phy_read32_mask(rtwdev, 0xc0d8, GENMASK(8, 5)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[17:21] = 0x%x\n", path,
+ 0xc0c4, rtw89_phy_read32_mask(rtwdev, 0xc0c4, GENMASK(21, 17)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[16:31] = 0x%x\n", path,
+ 0xc0e8, rtw89_phy_read32_mask(rtwdev, 0xc0e8, GENMASK(31, 16)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[04:05] = 0x%x\n", path,
+ 0xc0e4, rtw89_phy_read32_mask(rtwdev, 0xc0e4, GENMASK(5, 4)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[23:31] = 0x%x\n", path,
+ 0x12a0, rtw89_phy_read32_mask(rtwdev, 0x12a0, GENMASK(31, 23)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[13:14] = 0x%x\n", path,
+ 0xc0ec, rtw89_phy_read32_mask(rtwdev, 0xc0ec, GENMASK(14, 13)));
+ rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%x, 0x%x[16:23] = 0x%x\n", path,
+ 0xc0ec, rtw89_phy_read32_mask(rtwdev, 0xc0ec, GENMASK(23, 16)));
}
static bool _txk_5g_group_sel(struct rtw89_dev *rtwdev,
@@ -1616,6 +1649,14 @@ static void _iqk_macbb_setting(struct rtw89_dev *rtwdev,
rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]===>%s\n", __func__);
rtw89_rfk_parser(rtwdev, &rtw8851b_iqk_macbb_defs_tbl);
+
+ _txck_force(rtwdev, path, true, DAC_960M);
+
+ rtw89_phy_write32_mask(rtwdev, R_UPD_CLK, B_DPD_GDIS, 0x1);
+
+ _rxck_force(rtwdev, path, true, ADC_1920M);
+
+ rtw89_rfk_parser(rtwdev, &rtw8851b_iqk_macbb_bh_defs_tbl);
}
static void _iqk_init(struct rtw89_dev *rtwdev)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c
index 38ce03331069..c5f70c045692 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.c
@@ -63,16 +63,7 @@ static const struct rtw89_reg5_def rtw8851b_dack_manual_off_defs[] = {
RTW89_DECLARE_RFK_TBL(rtw8851b_dack_manual_off_defs);
static const struct rtw89_reg5_def rtw8851b_iqk_rxclk_80_defs[] = {
- RTW89_DECL_RFK_WM(0x20fc, 0xffff0000, 0x0101),
- RTW89_DECL_RFK_WM(0x5670, 0x00002000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00080000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00070000, 0x2),
RTW89_DECL_RFK_WM(0x5670, 0x60000000, 0x1),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00000780, 0x8),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00007800, 0x2),
- RTW89_DECL_RFK_WM(0xc0d4, 0x0c000000, 0x2),
- RTW89_DECL_RFK_WM(0xc0d8, 0x000001e0, 0x5),
- RTW89_DECL_RFK_WM(0xc0c4, 0x003e0000, 0xf),
RTW89_DECL_RFK_WM(0xc0ec, 0x00006000, 0x0),
RTW89_DECL_RFK_WM(0x12b8, 0x40000000, 0x1),
RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x0f),
@@ -85,16 +76,7 @@ static const struct rtw89_reg5_def rtw8851b_iqk_rxclk_80_defs[] = {
RTW89_DECLARE_RFK_TBL(rtw8851b_iqk_rxclk_80_defs);
static const struct rtw89_reg5_def rtw8851b_iqk_rxclk_others_defs[] = {
- RTW89_DECL_RFK_WM(0x20fc, 0xffff0000, 0x0101),
- RTW89_DECL_RFK_WM(0x5670, 0x00002000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00080000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00070000, 0x2),
RTW89_DECL_RFK_WM(0x5670, 0x60000000, 0x0),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00000780, 0x8),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00007800, 0x2),
- RTW89_DECL_RFK_WM(0xc0d4, 0x0c000000, 0x2),
- RTW89_DECL_RFK_WM(0xc0d8, 0x000001e0, 0x5),
- RTW89_DECL_RFK_WM(0xc0c4, 0x003e0000, 0xf),
RTW89_DECL_RFK_WM(0xc0ec, 0x00006000, 0x2),
RTW89_DECL_RFK_WM(0x12b8, 0x40000000, 0x1),
RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x0f),
@@ -157,30 +139,38 @@ static const struct rtw89_reg5_def rtw8851b_iqk_macbb_defs[] = {
RTW89_DECL_RFK_WM(0x20fc, 0x10000000, 0x0),
RTW89_DECL_RFK_WM(0x5670, MASKDWORD, 0xf801fffd),
RTW89_DECL_RFK_WM(0x5670, 0x00004000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00008000, 0x1),
RTW89_DECL_RFK_WM(0x5670, 0x80000000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00007000, 0x7),
- RTW89_DECL_RFK_WM(0x5670, 0x00002000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00080000, 0x1),
- RTW89_DECL_RFK_WM(0x12a0, 0x00070000, 0x3),
+};
+
+RTW89_DECLARE_RFK_TBL(rtw8851b_iqk_macbb_defs);
+
+static const struct rtw89_reg5_def rtw8851b_iqk_macbb_bh_defs[] = {
RTW89_DECL_RFK_WM(0x5670, 0x60000000, 0x2),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00000780, 0x9),
- RTW89_DECL_RFK_WM(0xc0d4, 0x00007800, 0x1),
- RTW89_DECL_RFK_WM(0xc0d4, 0x0c000000, 0x0),
- RTW89_DECL_RFK_WM(0xc0d8, 0x000001e0, 0x3),
- RTW89_DECL_RFK_WM(0xc0c4, 0x003e0000, 0xa),
- RTW89_DECL_RFK_WM(0xc0ec, 0x00006000, 0x0),
- RTW89_DECL_RFK_WM(0xc0e8, 0x00000040, 0x1),
RTW89_DECL_RFK_WM(0x12b8, 0x40000000, 0x1),
+ RTW89_DECL_RFK_DELAY(2),
RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x1f),
+ RTW89_DECL_RFK_DELAY(10),
RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x13),
+ RTW89_DECL_RFK_DELAY(2),
RTW89_DECL_RFK_WM(0x032c, 0xffff0000, 0x0001),
+ RTW89_DECL_RFK_DELAY(2),
RTW89_DECL_RFK_WM(0x032c, 0xffff0000, 0x0041),
+ RTW89_DECL_RFK_DELAY(10),
+ RTW89_DECL_RFK_WM(0x12b8, 0x40000000, 0x1),
+ RTW89_DECL_RFK_DELAY(2),
+ RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x1f),
+ RTW89_DECL_RFK_DELAY(10),
+ RTW89_DECL_RFK_WM(0x030c, 0xff000000, 0x13),
+ RTW89_DECL_RFK_DELAY(2),
+ RTW89_DECL_RFK_WM(0x032c, 0xffff0000, 0x0001),
+ RTW89_DECL_RFK_DELAY(2),
+ RTW89_DECL_RFK_WM(0x032c, 0xffff0000, 0x0041),
+ RTW89_DECL_RFK_DELAY(10),
RTW89_DECL_RFK_WM(0x20fc, 0x00100000, 0x1),
RTW89_DECL_RFK_WM(0x20fc, 0x10000000, 0x1),
};
-RTW89_DECLARE_RFK_TBL(rtw8851b_iqk_macbb_defs);
+RTW89_DECLARE_RFK_TBL(rtw8851b_iqk_macbb_bh_defs);
static const struct rtw89_reg5_def rtw8851b_tssi_sys_defs[] = {
RTW89_DECL_RFK_WM(0x12bc, 0x000ffff0, 0xb5b5),
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h
index 4fd81456109b..3f1547f57505 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk_table.h
@@ -18,6 +18,7 @@ extern const struct rtw89_rfk_tbl rtw8851b_iqk_txk_2ghz_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_txk_5ghz_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_afebb_restore_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_iqk_macbb_defs_tbl;
+extern const struct rtw89_rfk_tbl rtw8851b_iqk_macbb_bh_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_tssi_sys_defs_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_tssi_sys_a_defs_2g_tbl;
extern const struct rtw89_rfk_tbl rtw8851b_tssi_sys_a_defs_5g_tbl;
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8
2025-06-27 3:51 ` [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8 Ping-Ke Shih
@ 2025-07-04 2:37 ` Ping-Ke Shih
0 siblings, 0 replies; 8+ messages in thread
From: Ping-Ke Shih @ 2025-07-04 2:37 UTC (permalink / raw)
To: Ping-Ke Shih, linux-wireless
Ping-Ke Shih <pkshih@realtek.com> wrote:
> Originally the type of path_ok is bool to denote that DPK is ready on
> certain path and can be enabled. For RTL8851B, hardware design can support
> more than one calibration set, so use type u8 instead to record the
> hardware set in current use.
>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
6 patch(es) applied to rtw-next branch of rtw.git, thanks.
626afc6cd536 wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8
64d0633f1c47 wifi: rtw89: 8851b: set ADC bandwidth select according to calibration value
408d55331f96 wifi: rtw89: 8851b: adjust ADC setting for RF calibration
de2a9b283760 wifi: rtw89: 8851b: update NCTL 0xB
56624544c8a6 wifi: rtw89: 8851b: rfk: update DPK to 0x11
58f1510a8b6d wifi: rtw89: 8851b: rfk: update IQK to 0x14
---
https://github.com/pkshih/rtw.git
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-04 2:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27 3:51 [PATCH rtw-next 0/6] wifi: rtw89: 8851b: update RF calibration Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 1/6] wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8 Ping-Ke Shih
2025-07-04 2:37 ` Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 2/6] wifi: rtw89: 8851b: set ADC bandwidth select according to calibration value Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 3/6] wifi: rtw89: 8851b: adjust ADC setting for RF calibration Ping-Ke Shih
2025-06-27 3:51 ` [PATCH rtw-next 4/6] wifi: rtw89: 8851b: update NCTL 0xB Ping-Ke Shih
2025-06-27 3:53 ` [PATCH rtw-next 5/6] wifi: rtw89: 8851b: rfk: update DPK to 0x11 Ping-Ke Shih
2025-06-27 3:53 ` [PATCH rtw-next 6/6] wifi: rtw89: 8851b: rfk: update IQK to 0x14 Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).