1 /******************************************************************************
3 * Copyright(c) 2016 Realtek Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
22 * Larry Finger <Larry.Finger@lwfinger.net>
24 *****************************************************************************/
25 #include "halbt_precomp.h"
27 void ex_hal8822b_wifi_only_hw_config(struct wifi_only_cfg *wifionlycfg)
30 halwifionly_phy_set_bb_reg(wifionlycfg, 0x4c, 0x01800000, 0x2);
32 halwifionly_phy_set_bb_reg(wifionlycfg, 0xcb4, 0xff, 0x77);
33 /*antenna mux switch */
34 halwifionly_phy_set_bb_reg(wifionlycfg, 0x974, 0x300, 0x3);
36 halwifionly_phy_set_bb_reg(wifionlycfg, 0x1990, 0x300, 0x0);
38 halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x80000, 0x0);
39 /*switch to WL side controller and gnt_wl gnt_bt debug signal */
40 halwifionly_phy_set_bb_reg(wifionlycfg, 0x70, 0xff000000, 0x0e);
41 /*gnt_wl=1 , gnt_bt=0*/
42 halwifionly_phy_set_bb_reg(wifionlycfg, 0x1704, 0xffffffff, 0x7700);
43 halwifionly_phy_set_bb_reg(wifionlycfg, 0x1700, 0xffffffff, 0xc00f0038);
46 void ex_hal8822b_wifi_only_scannotify(struct wifi_only_cfg *wifionlycfg,
49 hal8822b_wifi_only_switch_antenna(wifionlycfg, is_5g);
52 void ex_hal8822b_wifi_only_switchbandnotify(struct wifi_only_cfg *wifionlycfg,
55 hal8822b_wifi_only_switch_antenna(wifionlycfg, is_5g);
58 void hal8822b_wifi_only_switch_antenna(struct wifi_only_cfg *wifionlycfg,
62 halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x300, 0x1);
64 halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x300, 0x2);