rtw88: 8723d: Add DIG parameter
authorPing-Ke Shih <pkshih@realtek.com>
Mon, 4 May 2020 10:50:03 +0000 (18:50 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 6 May 2020 08:34:11 +0000 (11:34 +0300)
To improve user experience in field, we need DIG to adjust RX initial gain
depends on field situation. Since each chip has its own register address,
this commit defines 8723d specific address.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-2-yhchuang@realtek.com
drivers/net/wireless/realtek/rtw88/rtw8723d.c

index 8ca4d57..52afa72 100644 (file)
@@ -706,6 +706,11 @@ static const struct rtw_rqpn rqpn_table_8723d[] = {
         RTW_DMA_MAPPING_EXTRA, RTW_DMA_MAPPING_HIGH},
 };
 
+static const struct rtw_hw_reg rtw8723d_dig[] = {
+       [0] = { .addr = 0xc50, .mask = 0x7f },
+       [1] = { .addr = 0xc50, .mask = 0x7f },
+};
+
 static const struct rtw_rf_sipi_addr rtw8723d_rf_sipi_addr[] = {
        [RF_PATH_A] = { .hssi_1 = 0x820, .lssi_read    = 0x8a0,
                        .hssi_2 = 0x824, .lssi_read_pi = 0x8b8},
@@ -738,6 +743,7 @@ struct rtw_chip_info rtw8723d_hw_spec = {
        .csi_buf_pg_num = 0,
        .band = RTW_BAND_2G,
        .page_size = 128,
+       .dig_min = 0x20,
        .ht_supported = true,
        .vht_supported = false,
        .lps_deep_mode_supported = 0,
@@ -746,6 +752,7 @@ struct rtw_chip_info rtw8723d_hw_spec = {
        .pwr_off_seq = card_disable_flow_8723d,
        .page_table = page_table_8723d,
        .rqpn_table = rqpn_table_8723d,
+       .dig = rtw8723d_dig,
        .rf_sipi_addr = {0x840, 0x844},
        .rf_sipi_read_addr = rtw8723d_rf_sipi_addr,
        .fix_rf_phy_num = 2,