Commit Graph

9 Commits

Author SHA1 Message Date
Zong-Zhe Yang
21911ad805 wifi: rtw89: 8852bt: implement RFK multi-channel handling and support chanctx up to 2
To support multiple channels, 2 for this case, RFK requires to record each
calibration result for each channel in different RFK tables, and also needs
to notify FW. Then, when FW runs in MCC (multi-channel concurrency), it can
switch to the corresponding calibration result according to the channel.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250710042423.73617-13-pkshih@realtek.com
2025-07-15 09:51:18 +08:00
Zong-Zhe Yang
50b3da25ab wifi: rtw89: 8852bx: use right chanctx whenever possible in RFK flow
No longer access chan with hard-code RTW89_CHANCTX_X whenever possible.
Instead, obtain the right chanctx from somewhere and use it in RTL8852BX
RFK (RF calibration) related code.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240819091724.33730-5-pkshih@realtek.com
2024-08-27 10:55:04 +08:00
Ping-Ke Shih
6bd63e44e9 wifi: rtw89: 8852bt: add set_channel_rf
Add RF part of set_channel() is to configure RF registers, and then
hardware can TX/RX on specified frequency and bandwidth.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240720021340.12102-2-pkshih@realtek.com
2024-07-31 13:48:00 +08:00
Ping-Ke Shih
746f4ae52a wifi: rtw89: 8852bt: rfk: add RCK
RCK is synchronize RC calibration. Driver triggers this calibration and
writes the result to registers.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240627025849.25198-5-pkshih@realtek.com
2024-07-02 19:43:54 +08:00
Ping-Ke Shih
39f0123e03 wifi: rtw89: 8852bt: rfk: add DACK
DACK (digital-to-analog converters calibration) is used to calibrate DAC
to output signals as expected.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240627025849.25198-4-pkshih@realtek.com
2024-07-02 19:42:42 +08:00
Ping-Ke Shih
c3d9705de5 wifi: rtw89: 8852bt: rfk: add RX DCK
RX DCK stands for receiver DC calibration. With this calibration, we have
proper DC offset to reflect correct received signal strength indicator.
Do this calibration when bringing up interface and going to connect.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240627025849.25198-3-pkshih@realtek.com
2024-07-02 19:42:37 +08:00
Ping-Ke Shih
f77c5179bc wifi: rtw89: 8852bt: rfk: add IQK
IQ signal calibration is a very important calibration to yield good RF
performance. We do this calibration once we are going to an AP. During
scanning phase, without this calibration RF performance is still
acceptable because it transmits and receives with low data rate at
this phase.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240627025849.25198-2-pkshih@realtek.com
2024-07-02 19:40:39 +08:00
Ping-Ke Shih
5b8c61b82e wifi: rtw89: 8852bt: rfk: add DPK
DPK is short for digital pre-distortion calibration. It can adjusts digital
waveform according to PA linear characteristics dynamically to enhance
TX EVM for high power.

Do this calibration when we are going to run on AP channel. To prevent
power offset out of boundary, it monitors thermal and set proper boundary
to register.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240621073458.55187-3-pkshih@realtek.com
2024-06-27 09:43:47 +08:00
Ping-Ke Shih
9f8852a92e wifi: rtw89: 8852bt: rfk: add TSSI
TSSI is transmitter signal strength indication, which is a close-loop
hardware circuit to feedback actual transmitting power as a reference for
next transmission.

It does full calibration when we are going to connect an AP. When switching
bands or channels for scanning or some reasons, reset hardware status to
prevent use wrong power value feedback from previous transmission.

It also loads tables of compensation values reflecting current temperature
into registers according to channel and band group to transmit packets
with expected power.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240621073458.55187-2-pkshih@realtek.com
2024-06-27 09:42:11 +08:00