/linux/drivers/net/wireless/mediatek/mt76/mt76x0/ |
H A D | initvals_init.h | 87 { MT_BBP(CORE, 1), 0x00000002 }, 88 { MT_BBP(CORE, 4), 0x00000000 }, 89 { MT_BBP(CORE, 24), 0x00000000 }, 90 { MT_BBP(CORE, 32), 0x4003000a }, 91 { MT_BBP(CORE, 42), 0x00000000 }, 92 { MT_BBP(CORE, 44), 0x00000000 }, 93 { MT_BBP(IBI, 11), 0x0FDE8081 }, 94 { MT_BBP(AGC, 0), 0x00021400 }, 95 { MT_BBP(AGC, 1), 0x00000003 }, 96 { MT_BBP(AGC, 2), 0x003A6464 }, [all …]
|
H A D | initvals.h | 15 { RF_G_BAND | RF_BW_20 | RF_BW_40, { MT_BBP(AGC, 4), 0x1FEDA049 } }, 16 { RF_A_BAND | RF_BW_20 | RF_BW_40 | RF_BW_80, { MT_BBP(AGC, 4), 0x1FECA054 } }, 18 { RF_G_BAND | RF_BW_20 | RF_BW_40, { MT_BBP(AGC, 6), 0x00000045 } }, 19 { RF_A_BAND | RF_BW_20 | RF_BW_40 | RF_BW_80, { MT_BBP(AGC, 6), 0x0000000A } }, 21 { RF_G_BAND | RF_BW_20 | RF_BW_40, { MT_BBP(AGC, 8), 0x16344EF0 } }, 22 { RF_A_BAND | RF_BW_20 | RF_BW_40 | RF_BW_80, { MT_BBP(AGC, 8), 0x122C54F2 } }, 24 { RF_G_BAND | RF_BW_20, { MT_BBP(AGC, 12), 0x05052879 } }, 25 { RF_G_BAND | RF_BW_40, { MT_BBP(AGC, 12), 0x050528F9 } }, 26 { RF_A_BAND | RF_BW_20 | RF_BW_40 | RF_BW_80, { MT_BBP(AGC, 12), 0x050528F9 } }, 28 { RF_G_BAND | RF_BW_20 | RF_BW_40, { MT_BBP(AGC, 13), 0x35050004 } }, [all …]
|
H A D | phy.c | 191 val = mt76_rr(dev, MT_BBP(CORE, 0)); in mt76x0_phy_wait_bbp_ready() 411 if (pair->reg == MT_BBP(AGC, 8)) { in mt76x0_phy_set_chan_bbp_params() 516 mt76_set(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x0_phy_tssi_dc_calibrate() 518 mt76_clear(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x0_phy_tssi_dc_calibrate() 521 mt76_wr(dev, MT_BBP(CORE, 34), val); in mt76x0_phy_tssi_dc_calibrate() 524 mt76_wr(dev, MT_BBP(TXBE, 6), BIT(31)); in mt76x0_phy_tssi_dc_calibrate() 526 mt76_poll_msec(dev, MT_BBP(CORE, 34), BIT(4), 0, 200); in mt76x0_phy_tssi_dc_calibrate() 527 dev->cal.tssi_dc = mt76_rr(dev, MT_BBP(CORE, 35)) & 0xff; in mt76x0_phy_tssi_dc_calibrate() 532 mt76_wr(dev, MT_BBP(TXBE, 6), 0); in mt76x0_phy_tssi_dc_calibrate() 534 mt76_set(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x0_phy_tssi_dc_calibrate() [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/mt76x2/ |
H A D | pci_phy.c | 75 val = mt76_rr(dev, MT_BBP(AGC, 0)); in mt76x2_phy_set_antenna() 80 mt76_clear(dev, MT_BBP(IBI, 9), BIT(11)); in mt76x2_phy_set_antenna() 81 mt76_clear(dev, MT_BBP(TXBE, 5), 3); in mt76x2_phy_set_antenna() 83 mt76_rmw_field(dev, MT_BBP(CORE, 32), GENMASK(21, 20), 2); in mt76x2_phy_set_antenna() 85 mt76_rmw_field(dev, MT_BBP(CORE, 33), GENMASK(12, 9), 4); in mt76x2_phy_set_antenna() 91 mt76_clear(dev, MT_BBP(IBI, 9), BIT(11)); in mt76x2_phy_set_antenna() 92 mt76_rmw_field(dev, MT_BBP(TXBE, 5), 3, 1); in mt76x2_phy_set_antenna() 94 mt76_rmw_field(dev, MT_BBP(CORE, 32), GENMASK(21, 20), 1); in mt76x2_phy_set_antenna() 96 mt76_rmw_field(dev, MT_BBP(CORE, 33), GENMASK(12, 9), 1); in mt76x2_phy_set_antenna() 104 mt76_set(dev, MT_BBP(IBI, 9), BIT(11)); in mt76x2_phy_set_antenna() [all …]
|
H A D | phy.c | 18 mt76_rr(dev, MT_BBP(AGC, reg))); in mt76x2_adjust_high_lna_gain() 20 mt76_rmw_field(dev, MT_BBP(AGC, reg), MT_BBP_AGC_LNA_HIGH_GAIN, gain); in mt76x2_adjust_high_lna_gain() 28 gain = FIELD_GET(MT_BBP_AGC_GAIN, mt76_rr(dev, MT_BBP(AGC, reg))); in mt76x2_adjust_agc_gain() 30 mt76_rmw_field(dev, MT_BBP(AGC, reg), MT_BBP_AGC_GAIN, gain); in mt76x2_adjust_agc_gain() 218 if (mt76_rr(dev, MT_BBP(CORE, 34)) & BIT(4)) in mt76x2_phy_tssi_compensate() 265 mt76_wr(dev, MT_BBP(AGC, 8), in mt76x2_phy_set_gain_val() 267 mt76_wr(dev, MT_BBP(AGC, 9), in mt76x2_phy_set_gain_val() 301 mt76_wr(dev, MT_BBP(RXO, 14), 0x00560211); in mt76x2_phy_update_channel_gain() 302 val = mt76_rr(dev, MT_BBP(AGC, 26)) & ~0xf; in mt76x2_phy_update_channel_gain() 307 mt76_wr(dev, MT_BBP(AGC, 26), val); in mt76x2_phy_update_channel_gain() [all …]
|
H A D | mac.c | 27 mt76_rr(dev, MT_BBP(IBI, 12))) { in mt76x2_mac_stop() 37 mt76_set(dev, MT_BBP(CORE, 4), BIT(1)); in mt76x2_mac_stop() 38 mt76_clear(dev, MT_BBP(CORE, 4), BIT(1)); in mt76x2_mac_stop() 40 mt76_set(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x2_mac_stop() 41 mt76_clear(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x2_mac_stop()
|
H A D | usb_phy.c | 145 mt76_set(dev, MT_BBP(RXO, 13), BIT(10)); in mt76x2u_phy_set_channel() 161 mt76_wr(dev, MT_BBP(AGC, 61), 0xff64a4e2); in mt76x2u_phy_set_channel() 162 mt76_wr(dev, MT_BBP(AGC, 7), 0x08081010); in mt76x2u_phy_set_channel() 163 mt76_wr(dev, MT_BBP(AGC, 11), 0x00000404); in mt76x2u_phy_set_channel() 164 mt76_wr(dev, MT_BBP(AGC, 2), 0x00007070); in mt76x2u_phy_set_channel() 167 mt76_set(dev, MT_BBP(TXO, 4), BIT(25)); in mt76x2u_phy_set_channel() 168 mt76_set(dev, MT_BBP(RXO, 13), BIT(8)); in mt76x2u_phy_set_channel()
|
H A D | usb_mac.c | 135 !mt76_rr(dev, MT_BBP(IBI, 12))) { in mt76x2u_mac_stop() 143 mt76_set(dev, MT_BBP(CORE, 4), BIT(1)); in mt76x2u_mac_stop() 144 mt76_clear(dev, MT_BBP(CORE, 4), BIT(1)); in mt76x2u_mac_stop() 146 mt76_set(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x2u_mac_stop() 147 mt76_clear(dev, MT_BBP(CORE, 4), BIT(0)); in mt76x2u_mac_stop()
|
/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | mt76x02_dfs.c | 148 mt76_wr(dev, MT_BBP(DFS, 36), data); in mt76x02_dfs_set_capture_mode_ctrl() 212 mt76_wr(dev, MT_BBP(DFS, 1), 0xf); in mt76x02_dfs_detector_reset() 254 mt76_wr(dev, MT_BBP(DFS, 0), data); in mt76x02_dfs_get_hw_pulse() 257 pulse->period = mt76_rr(dev, MT_BBP(DFS, 19)); in mt76x02_dfs_get_hw_pulse() 260 pulse->w1 = mt76_rr(dev, MT_BBP(DFS, 20)); in mt76x02_dfs_get_hw_pulse() 261 pulse->w2 = mt76_rr(dev, MT_BBP(DFS, 23)); in mt76x02_dfs_get_hw_pulse() 264 pulse->burst = mt76_rr(dev, MT_BBP(DFS, 22)); in mt76x02_dfs_get_hw_pulse() 376 data = mt76_rr(dev, MT_BBP(DFS, 37)); in mt76x02_dfs_fetch_event() 381 data = mt76_rr(dev, MT_BBP(DFS, 37)); in mt76x02_dfs_fetch_event() 383 data = mt76_rr(dev, MT_BBP(DFS, 37)); in mt76x02_dfs_fetch_event() [all …]
|
H A D | mt76x02_phy.c | 16 val = mt76_rr(dev, MT_BBP(AGC, 0)); in mt76x02_phy_set_rxpath() 28 mt76_wr(dev, MT_BBP(AGC, 0), val); in mt76x02_phy_set_rxpath() 30 val = mt76_rr(dev, MT_BBP(AGC, 0)); in mt76x02_phy_set_rxpath() 41 mt76_set(dev, MT_BBP(TXBE, 5), 0x3); in mt76x02_phy_set_txdac() 44 mt76_clear(dev, MT_BBP(TXBE, 5), 0x3); in mt76x02_phy_set_txdac() 143 mt76_rmw_field(dev, MT_BBP(CORE, 1), MT_BBP_CORE_R1_BW, core_val); in mt76x02_phy_set_bw() 144 mt76_rmw_field(dev, MT_BBP(AGC, 0), MT_BBP_AGC_R0_BW, agc_val); in mt76x02_phy_set_bw() 145 mt76_rmw_field(dev, MT_BBP(AGC, 0), MT_BBP_AGC_R0_CTRL_CHAN, ctrl); in mt76x02_phy_set_bw() 146 mt76_rmw_field(dev, MT_BBP(TXBE, 0), MT_BBP_TXBE_R0_CTRL_CHAN, ctrl); in mt76x02_phy_set_bw() 195 dev->cal.agc_gain_init[0] = mt76_get_field(dev, MT_BBP(AGC, 8), in mt76x02_init_agc_gain() [all …]
|
H A D | mt76x02_mac.c | 1113 mt76_rmw(dev, MT_BBP(AGC, 2), GENMASK(15, 0), in mt76x02_edcca_init() 1120 mt76_wr(dev, MT_BBP(AGC, 2), 0x00007070); in mt76x02_edcca_init() 1124 mt76_wr(dev, MT_BBP(AGC, 2), 0x003a6464); in mt76x02_edcca_init()
|
H A D | mt76x02_regs.h | 619 #define MT_BBP(_type, _n) (MT_BBP_##_type##_BASE + ((_n) << 2)) macro
|
/linux/drivers/net/wireless/mediatek/mt7601u/ |
H A D | regs.h | 549 #define MT_BBP(_type, _n) (MT_BBP_##_type##_BASE + ((_n) << 2)) macro
|