Commit 872834df authored by Gertjan van Wingerde's avatar Gertjan van Wingerde Committed by John W. Linville

rt2x00: Add support for RT3572/RT3592/RT3592+Bluetooth combo card

(based on an earlier patch submitted by Shiang)

Add support for RT3572/RT3592/RT3592+Bluetooth combo card
Signed-off-by: default avatarShiang Tu <shiang_tu@ralinktech.com>
Signed-off-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8f96e91f
...@@ -1740,6 +1740,7 @@ struct mac_iveiv_entry { ...@@ -1740,6 +1740,7 @@ struct mac_iveiv_entry {
/* /*
* BBP 3: RX Antenna * BBP 3: RX Antenna
*/ */
#define BBP3_RX_ADC FIELD8(0x03)
#define BBP3_RX_ANTENNA FIELD8(0x18) #define BBP3_RX_ANTENNA FIELD8(0x18)
#define BBP3_HT40_MINUS FIELD8(0x20) #define BBP3_HT40_MINUS FIELD8(0x20)
...@@ -1783,22 +1784,34 @@ struct mac_iveiv_entry { ...@@ -1783,22 +1784,34 @@ struct mac_iveiv_entry {
#define RFCSR1_TX0_PD FIELD8(0x08) #define RFCSR1_TX0_PD FIELD8(0x08)
#define RFCSR1_RX1_PD FIELD8(0x10) #define RFCSR1_RX1_PD FIELD8(0x10)
#define RFCSR1_TX1_PD FIELD8(0x20) #define RFCSR1_TX1_PD FIELD8(0x20)
#define RFCSR1_RX2_PD FIELD8(0x40)
#define RFCSR1_TX2_PD FIELD8(0x80)
/* /*
* RFCSR 2: * RFCSR 2:
*/ */
#define RFCSR2_RESCAL_EN FIELD8(0x80) #define RFCSR2_RESCAL_EN FIELD8(0x80)
/*
* FRCSR 5:
*/
#define RFCSR5_R1 FIELD8(0x0c)
/* /*
* RFCSR 6: * RFCSR 6:
*/ */
#define RFCSR6_R1 FIELD8(0x03) #define RFCSR6_R1 FIELD8(0x03)
#define RFCSR6_R2 FIELD8(0x40) #define RFCSR6_R2 FIELD8(0x40)
#define RFCSR6_TXDIV FIELD8(0x0c)
/* /*
* RFCSR 7: * RFCSR 7:
*/ */
#define RFCSR7_RF_TUNING FIELD8(0x01) #define RFCSR7_RF_TUNING FIELD8(0x01)
#define RFCSR7_R02 FIELD8(0x07)
#define RFCSR7_R3 FIELD8(0x08)
#define RFCSR7_R45 FIELD8(0x30)
#define RFCSR7_R67 FIELD8(0xc0)
/* /*
* RFCSR 11: * RFCSR 11:
...@@ -1809,11 +1822,13 @@ struct mac_iveiv_entry { ...@@ -1809,11 +1822,13 @@ struct mac_iveiv_entry {
* RFCSR 12: * RFCSR 12:
*/ */
#define RFCSR12_TX_POWER FIELD8(0x1f) #define RFCSR12_TX_POWER FIELD8(0x1f)
#define RFCSR12_DR0 FIELD8(0xe0)
/* /*
* RFCSR 13: * RFCSR 13:
*/ */
#define RFCSR13_TX_POWER FIELD8(0x1f) #define RFCSR13_TX_POWER FIELD8(0x1f)
#define RFCSR13_DR0 FIELD8(0xe0)
/* /*
* RFCSR 15: * RFCSR 15:
...@@ -2256,6 +2271,7 @@ struct mac_iveiv_entry { ...@@ -2256,6 +2271,7 @@ struct mac_iveiv_entry {
#define MCU_ANT_SELECT 0X73 #define MCU_ANT_SELECT 0X73
#define MCU_BBP_SIGNAL 0x80 #define MCU_BBP_SIGNAL 0x80
#define MCU_POWER_SAVE 0x83 #define MCU_POWER_SAVE 0x83
#define MCU_BAND_SELECT 0x91
/* /*
* MCU mailbox tokens * MCU mailbox tokens
......
This diff is collapsed.
...@@ -501,7 +501,9 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -501,7 +501,9 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e1f); rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e1f);
rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e00); rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e00);
if (rt2x00_rt(rt2x00dev, RT5390)) { if (rt2x00_is_pcie(rt2x00dev) &&
(rt2x00_rt(rt2x00dev, RT3572) ||
rt2x00_rt(rt2x00dev, RT5390))) {
rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg); rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1); rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1); rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment