Commit Graph

6 Commits

Author SHA1 Message Date
Ping-Ke Shih
5a72e198a6 wifi: rtw89: 8852bx: move common code from 8852b to 8852b_common
New upcoming chip is RTL8852BE-VT (or RTL8852BTE; 8852BT PCIE interface),
which is a variant of 8852B, and many codes excepting to RF calibration
can be shared, so move common code to an new kernel module named
rtw89_8852b_common.ko.

No logic change.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240607070659.80263-2-pkshih@realtek.com
2024-06-17 10:12:26 +08:00
Ping-Ke Shih
572fd2ab37 wifi: rtw89: 8852b: add functions to control BB to assist RF calibrations
When we are going to do RF calibrations, they need BB helpers to control
TX PLCP, power, path and mode. Also, it they need helpers to backup and
restore some registers before and after RF calibrations. Then, use flow of
RF calibrations will be like backup registers, configure calibration,
configure TX parameters, measure calibration result, and finally restore
registers.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221009125403.19662-9-pkshih@realtek.com
2022-10-12 07:34:57 +03:00
Ping-Ke Shih
8915a25653 wifi: rtw89: 8852b: add chip_ops to configure TX/RX path
To support variant models, such as 1x1 or 1T2R, we need this chip_ops to
change the path accordingly.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221009125403.19662-8-pkshih@realtek.com
2022-10-12 07:34:57 +03:00
Ping-Ke Shih
9695dc2e4b wifi: rtw89: 8852be: add 8852BE PCI entry
8852BE has two variants with different ID. One is 10ec:b852 that is a main
model with 2x2 antenna, and the other is 10ec:b85b that is a 1x1 model.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220928084336.34981-10-pkshih@realtek.com
2022-10-04 10:17:38 +03:00
Ping-Ke Shih
132dc4fe5b wifi: rtw89: 8852b: add chip_ops to read efuse
efuse stores individual data about a chip itself, such as MAC address,
country code, RF and crystal calibration data, and so on. Define a struct
to help access efuse content, and copy them into a common struct.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220928084336.34981-8-pkshih@realtek.com
2022-10-04 10:17:38 +03:00
Ping-Ke Shih
08484e1f6e wifi: rtw89: 8852b: add chip_ops::set_txpwr
This chip_ops is to set TX power according to country, channel, rate and
so on.  Since shared code is used to configure TX power, we only implement
specific part in this patch.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220928084336.34981-7-pkshih@realtek.com
2022-10-04 10:17:37 +03:00