2012-02-16 05:32:44

by John Li

[permalink] [raw]
Subject: [PATCH] rt2x00:Add RT5372 chipset support

From: John Li <[email protected]>

Signed-off-by: John Li <[email protected]>
---
drivers/net/wireless/rt2x00/rt2800.h | 1 +
drivers/net/wireless/rt2x00/rt2800lib.c | 153 ++++++++++++++++++++++++++-----
drivers/net/wireless/rt2x00/rt2800pci.c | 3 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 14 +++
drivers/net/wireless/rt2x00/rt2x00.h | 1 +
5 files changed, 147 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 2571a2f..56b78c8 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -68,6 +68,7 @@
#define RF3322 0x000c
#define RF3053 0x000d
#define RF5370 0x5370
+#define RF5372 0x5372
#define RF5390 0x5390

/*
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 22a1a8f..7c6c1b5 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -402,7 +402,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,

if (rt2x00_is_pci(rt2x00dev)) {
if (rt2x00_rt(rt2x00dev, RT3572) ||
- rt2x00_rt(rt2x00dev, RT5390)) {
+ rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
@@ -1906,7 +1907,8 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
r55_nonbt_rev[idx]);
rt2800_rfcsr_write(rt2x00dev, 59,
r59_nonbt_rev[idx]);
- } else if (rt2x00_rt(rt2x00dev, RT5390)) {
+ } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
static const char r59_non_bt[] = {0x8f, 0x8f,
0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
@@ -1956,6 +1958,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
break;
case RF5370:
+ case RF5372:
case RF5390:
rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
break;
@@ -1972,7 +1975,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
rt2800_bbp_write(rt2x00dev, 86, 0);

if (rf->channel <= 14) {
- if (!rt2x00_rt(rt2x00dev, RT5390)) {
+ if (!rt2x00_rt(rt2x00dev, RT5390) ||
+ !rt2x00_rt(rt2x00dev, RT5392)) {
if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
&rt2x00dev->cap_flags)) {
rt2800_bbp_write(rt2x00dev, 82, 0x62);
@@ -2502,7 +2506,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
rt2x00_rt(rt2x00dev, RT3071) ||
rt2x00_rt(rt2x00dev, RT3090) ||
rt2x00_rt(rt2x00dev, RT3390) ||
- rt2x00_rt(rt2x00dev, RT5390))
+ rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
return 0x1c + (2 * rt2x00dev->lna_gain);
else
return 0x2e + rt2x00dev->lna_gain;
@@ -2637,7 +2642,8 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
} else if (rt2x00_rt(rt2x00dev, RT3572)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
- } else if (rt2x00_rt(rt2x00dev, RT5390)) {
+ } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
@@ -3013,7 +3019,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
rt2800_wait_bbp_ready(rt2x00dev)))
return -EACCES;

- if (rt2x00_rt(rt2x00dev, RT5390)) {
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_bbp_read(rt2x00dev, 4, &value);
rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
rt2800_bbp_write(rt2x00dev, 4, value);
@@ -3021,19 +3028,22 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)

if (rt2800_is_305x_soc(rt2x00dev) ||
rt2x00_rt(rt2x00dev, RT3572) ||
- rt2x00_rt(rt2x00dev, RT5390))
+ rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 31, 0x08);

rt2800_bbp_write(rt2x00dev, 65, 0x2c);
rt2800_bbp_write(rt2x00dev, 66, 0x38);

- if (rt2x00_rt(rt2x00dev, RT5390))
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 68, 0x0b);

if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
rt2800_bbp_write(rt2x00dev, 69, 0x16);
rt2800_bbp_write(rt2x00dev, 73, 0x12);
- } else if (rt2x00_rt(rt2x00dev, RT5390)) {
+ } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_bbp_write(rt2x00dev, 69, 0x12);
rt2800_bbp_write(rt2x00dev, 73, 0x13);
rt2800_bbp_write(rt2x00dev, 75, 0x46);
@@ -3051,7 +3061,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
rt2x00_rt(rt2x00dev, RT3090) ||
rt2x00_rt(rt2x00dev, RT3390) ||
rt2x00_rt(rt2x00dev, RT3572) ||
- rt2x00_rt(rt2x00dev, RT5390)) {
+ rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_bbp_write(rt2x00dev, 79, 0x13);
rt2800_bbp_write(rt2x00dev, 80, 0x05);
rt2800_bbp_write(rt2x00dev, 81, 0x33);
@@ -3063,64 +3074,88 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
}

rt2800_bbp_write(rt2x00dev, 82, 0x62);
- if (rt2x00_rt(rt2x00dev, RT5390))
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 83, 0x7a);
else
rt2800_bbp_write(rt2x00dev, 83, 0x6a);

if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
rt2800_bbp_write(rt2x00dev, 84, 0x19);
- else if (rt2x00_rt(rt2x00dev, RT5390))
+ else if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 84, 0x9a);
else
rt2800_bbp_write(rt2x00dev, 84, 0x99);

- if (rt2x00_rt(rt2x00dev, RT5390))
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 86, 0x38);
else
rt2800_bbp_write(rt2x00dev, 86, 0x00);

+ if (rt2x00_rt(rt2x00dev, RT5392))
+ rt2800_bbp_write(rt2x00dev, 88, 0x90);
+
rt2800_bbp_write(rt2x00dev, 91, 0x04);

- if (rt2x00_rt(rt2x00dev, RT5390))
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 92, 0x02);
else
rt2800_bbp_write(rt2x00dev, 92, 0x00);

+ if (rt2x00_rt(rt2x00dev, RT5392)) {
+ rt2800_bbp_write(rt2x00dev, 95, 0x9a);
+ rt2800_bbp_write(rt2x00dev, 98, 0x12);
+ }
+
if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) ||
rt2x00_rt(rt2x00dev, RT3572) ||
rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392) ||
rt2800_is_305x_soc(rt2x00dev))
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
else
rt2800_bbp_write(rt2x00dev, 103, 0x00);

- if (rt2x00_rt(rt2x00dev, RT5390))
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 104, 0x92);

if (rt2800_is_305x_soc(rt2x00dev))
rt2800_bbp_write(rt2x00dev, 105, 0x01);
- else if (rt2x00_rt(rt2x00dev, RT5390))
+ else if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 105, 0x3c);
else
rt2800_bbp_write(rt2x00dev, 105, 0x05);

if (rt2x00_rt(rt2x00dev, RT5390))
rt2800_bbp_write(rt2x00dev, 106, 0x03);
+ else if (rt2x00_rt(rt2x00dev, RT5392))
+ rt2800_bbp_write(rt2x00dev, 106, 0x12);
else
rt2800_bbp_write(rt2x00dev, 106, 0x35);

- if (rt2x00_rt(rt2x00dev, RT5390))
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))
rt2800_bbp_write(rt2x00dev, 128, 0x12);

+ if (rt2x00_rt(rt2x00dev, RT5392)) {
+ rt2800_bbp_write(rt2x00dev, 134, 0xd0);
+ rt2800_bbp_write(rt2x00dev, 135, 0xf6);
+ }
+
if (rt2x00_rt(rt2x00dev, RT3071) ||
rt2x00_rt(rt2x00dev, RT3090) ||
rt2x00_rt(rt2x00dev, RT3390) ||
rt2x00_rt(rt2x00dev, RT3572) ||
- rt2x00_rt(rt2x00dev, RT5390)) {
+ rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_bbp_read(rt2x00dev, 138, &value);

rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
@@ -3132,7 +3167,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
rt2800_bbp_write(rt2x00dev, 138, value);
}

- if (rt2x00_rt(rt2x00dev, RT5390)) {
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
int ant, div_mode;

rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
@@ -3258,13 +3294,15 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
!rt2x00_rt(rt2x00dev, RT3390) &&
!rt2x00_rt(rt2x00dev, RT3572) &&
!rt2x00_rt(rt2x00dev, RT5390) &&
+ !rt2x00_rt(rt2x00dev, RT5392) &&
!rt2800_is_305x_soc(rt2x00dev))
return 0;

/*
* Init RF calibration.
*/
- if (rt2x00_rt(rt2x00dev, RT5390)) {
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
@@ -3482,6 +3520,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
+ } else if (rt2x00_rt(rt2x00dev, RT5392)) {
+ rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
+ rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
+ rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
+ rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
+ rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
+ rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
+ rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
+ rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
+ rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
+ rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
+ rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
+ rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
+ rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
+ rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
+ rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
+ rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
+ rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
+ rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
+ rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
+ rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
+ rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
+ rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
+ rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
+ rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
+ rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
+ rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
+ rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
+ rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
+ rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
+ rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
+ rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
+ rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
+ rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
+ rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
+ rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
+ rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
+ rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
+ rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
+ rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
+ rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
+ rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
+ rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
+ rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
+ rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
+ rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
+ rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
+ rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
+ rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
+ rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
+ rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
+ rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
}

if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
@@ -3549,7 +3647,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
}

- if (!rt2x00_rt(rt2x00dev, RT5390)) {
+ if (!rt2x00_rt(rt2x00dev, RT5390) ||
+ !rt2x00_rt(rt2x00dev, RT5392)) {
/*
* Set back to initial state
*/
@@ -3577,7 +3676,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);

- if (!rt2x00_rt(rt2x00dev, RT5390)) {
+ if (!rt2x00_rt(rt2x00dev, RT5390) ||
+ !rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
if (rt2x00_rt(rt2x00dev, RT3070) ||
@@ -3645,7 +3745,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
rt2800_rfcsr_write(rt2x00dev, 27, rfcsr);
}

- if (rt2x00_rt(rt2x00dev, RT5390)) {
+ if (rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392)) {
rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
@@ -3929,7 +4030,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
- if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
+ if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
+ rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
else
value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
@@ -3947,6 +4049,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
case RT3390:
case RT3572:
case RT5390:
+ case RT5392:
break;
default:
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
@@ -3965,6 +4068,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
case RF3052:
case RF3320:
case RF5370:
+ case RF5372:
case RF5390:
break;
default:
@@ -4271,6 +4375,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
rt2x00_rf(rt2x00dev, RF3022) ||
rt2x00_rf(rt2x00dev, RF3320) ||
rt2x00_rf(rt2x00dev, RF5370) ||
+ rt2x00_rf(rt2x00dev, RF5372) ||
rt2x00_rf(rt2x00dev, RF5390)) {
spec->num_channels = 14;
spec->channels = rf_vals_3x;
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 837b460..bf0f83c 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -480,7 +480,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)

if (rt2x00_is_pcie(rt2x00dev) &&
(rt2x00_rt(rt2x00dev, RT3572) ||
- rt2x00_rt(rt2x00dev, RT5390))) {
+ rt2x00_rt(rt2x00dev, RT5390) ||
+ rt2x00_rt(rt2x00dev, RT5392))) {
rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 7f21005..6565113 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1101,12 +1101,26 @@ static struct usb_device_id rt2800usb_device_table[] = {
{ USB_DEVICE(0x5a57, 0x0284) },
#endif
#ifdef CONFIG_RT2800USB_RT53XX
+ /* Alpha */
+ { USB_DEVICE(0x2001, 0x3c15) },
+ { USB_DEVICE(0x2001, 0x3c19) },
+ /* Arcadyan */
+ { USB_DEVICE(0x043e, 0x7a12) },
/* Azurewave */
{ USB_DEVICE(0x13d3, 0x3329) },
{ USB_DEVICE(0x13d3, 0x3365) },
+ /* LG innotek */
+ { USB_DEVICE(0x043e, 0x7a22) },
+ /* Panasonic */
+ { USB_DEVICE(0x04da, 0x1801) },
+ { USB_DEVICE(0x04da, 0x1800) },
+ /* Philips */
+ { USB_DEVICE(0x0471, 0x2104) },
/* Ralink */
{ USB_DEVICE(0x148f, 0x5370) },
{ USB_DEVICE(0x148f, 0x5372) },
+ /* Unknown */
+ { USB_DEVICE(0x04da, 0x23f6) },
#endif
#ifdef CONFIG_RT2800USB_UNKNOWN
/*
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index b03b22c..bf743cd 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -192,6 +192,7 @@ struct rt2x00_chip {
#define RT3593 0x3593
#define RT3883 0x3883 /* WSOC */
#define RT5390 0x5390 /* 2.4GHz */
+#define RT5392 0x5392 /* 2.4GHz */

u16 rf;
u16 rev;
--
1.7.6.5



2012-02-20 06:18:22

by Chen-Yang Li (黎振陽)

[permalink] [raw]
Subject: RE: [PATCH] rt2x00:Add RT5372 chipset support

RGVhciBBbGwsDQoNCkkgc2luY2VyZWx5IGFwcHJlY2lhdGUgYWxsIG9mIHlvdSB0byByZXZpZXcg
bXkgcGF0Y2hlcy4NClRoaXMgZXhwZXJpZW5jZSBoYXMgYmVuZWZpdGVkIG1lIGEgZ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ICAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0Mngw
MGRldiwgNTksDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgcjU5X25vbmJ0X3JldltpZHhdKTsNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgfSBl
bHNlIGlmIChydDJ4MDBfcnQocnQyeDAwZGV2LCBSVDUzOTApKSB7DQo+ICsgICAgICAgICAgICAg
ICAgICAgICAgIH0gZWxzZSBpZiAocnQyeDAwX3J0KHJ0MngwMGRldiwgUlQ1MzkwKSB8fA0KPiAr
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnQyeDAwX3J0KHJ0Mngw
MGRldiwNCj4gKyBSVDUzOTIpKSB7DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBz
dGF0aWMgY29uc3QgY2hhciByNTlfbm9uX2J0W10gPSB7MHg4ZiwNCj4gMHg4ZiwNCj4gICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4ZiwgMHg4ZiwgMHg4ZiwgMHg4Ziwg
MHg4ZiwNCj4gMHg4ZCwNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
MHg4YSwgMHg4OCwgMHg4OCwgMHg4NywgMHg4NywNCj4gMHg4Nn07IEBAIC0xOTU2LDYgKzE5NTgs
NyBAQCBzdGF0aWMgdm9pZCBydDI4MDBfY29uZmlnX2NoYW5uZWwoc3RydWN0DQo+IHJ0MngwMF9k
ZXYgKnJ0MngwMGRldiwNCj4gICAgICAgICAgICAgICAgcnQyODAwX2NvbmZpZ19jaGFubmVsX3Jm
MzA1MihydDJ4MDBkZXYsIGNvbmYsIHJmLA0KPiBpbmZvKTsNCj4gICAgICAgICAgICAgICAgYnJl
YWs7DQo+ICAgICAgICBjYXNlIFJGNTM3MDoNCj4gKyAgICAgICBjYXNlIFJGNTM3Mjo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AgICAgICAgICAgICAgICAgICAg
IHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDIsIDB4ODApOw0KPiArICAgICAgICAgICAg
ICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAzLCAweDg4KTsNCj4gKyAg
ICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgNSwgMHgx
MCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBk
ZXYsIDYsIDB4ZTApOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3Jp
dGUocnQyeDAwZGV2LCA3LCAweDAwKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAw
X3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgMTAsIDB4NTMpOw0KPiArICAgICAgICAgICAgICAgICAg
ICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAxMSwgMHg0YSk7DQo+ICsgICAgICAg
ICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDEyLCAweDQ2KTsN
Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwg
MTMsIDB4OWYpOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUo
cnQyeDAwZGV2LCAxNCwgMHgwMCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9y
ZmNzcl93cml0ZShydDJ4MDBkZXYsIDE1LCAweDAwKTsNCj4gKyAgICAgICAgICAgICAgICAgICAg
ICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgMTYsIDB4MDApOw0KPiArICAgICAgICAg
ICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAxOCwgMHgwMyk7DQo+
ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDE5
LCAweDRkKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0
MngwMGRldiwgMjAsIDB4MDApOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZj
c3Jfd3JpdGUocnQyeDAwZGV2LCAyMSwgMHg4ZCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAg
IHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDIyLCAweDIwKTsNCj4gKyAgICAgICAgICAg
ICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgMjMsIDB4MGIpOw0KPiAr
ICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAyNCwg
MHg0NCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4
MDBkZXYsIDI1LCAweDgwKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3Ny
X3dyaXRlKHJ0MngwMGRldiwgMjYsIDB4ODIpOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBy
dDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAyNywgMHgwOSk7DQo+ICsgICAgICAgICAgICAg
ICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDI4LCAweDAwKTsNCj4gKyAg
ICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgMjksIDB4
MTApOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAw
ZGV2LCAzMCwgMHgxMCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93
cml0ZShydDJ4MDBkZXYsIDMxLCAweDgwKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQy
ODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgMzIsIDB4MjApOw0KPiArICAgICAgICAgICAgICAg
ICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAzMywgMHhDMCk7DQo+ICsgICAg
ICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDM0LCAweDA3
KTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRl
diwgMzUsIDB4MTIpOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3Jp
dGUocnQyeDAwZGV2LCAzNiwgMHgwMCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0Mjgw
MF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDM3LCAweDA4KTsNCj4gKyAgICAgICAgICAgICAgICAg
ICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgMzgsIDB4ODkpOw0KPiArICAgICAg
ICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCAzOSwgMHgxYik7
DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYs
IDQwLCAweDBmKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRl
KHJ0MngwMGRldiwgNDEsIDB4YmIpOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBf
cmZjc3Jfd3JpdGUocnQyeDAwZGV2LCA0MiwgMHhkNSk7DQo+ICsgICAgICAgICAgICAgICAgICAg
ICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDQzLCAweDliKTsNCj4gKyAgICAgICAg
ICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgNDQsIDB4MGUpOw0K
PiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCA0
NSwgMHhhMik7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShy
dDJ4MDBkZXYsIDQ2LCAweDczKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3Jm
Y3NyX3dyaXRlKHJ0MngwMGRldiwgNDcsIDB4MGMpOw0KPiArICAgICAgICAgICAgICAgICAgICAg
ICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCA0OCwgMHgxMCk7DQo+ICsgICAgICAgICAg
ICAgICAgICAgICAgIHJ0MjgwMF9yZmNzcl93cml0ZShydDJ4MDBkZXYsIDQ5LCAweDk0KTsNCj4g
KyAgICAgICAgICAgICAgICAgICAgICAgcnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgNTAs
IDB4OTQpOw0KPiArICAgICAgICAgICAgICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQy
eDAwZGV2LCA1MSwgMHgzYSk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF9yZmNz
cl93cml0ZShydDJ4MDBkZXYsIDUyLCAweDQ4KTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAg
cnQyODAwX3JmY3NyX3dyaXRlKHJ0MngwMGRldiwgNTMsIDB4NDQpOw0KPiArICAgICAgICAgICAg
ICAgICAgICAgICBydDI4MDBfcmZjc3Jfd3JpdGUocnQyeDAwZGV2LCA1NCwgMHgzOCk7DQo+ICsg
ICAgICAgICAgICAgICAgICAgICAgIHJ0MjgwMF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T5372 chipset support

Am Freitag, 17. Februar 2012, 08:31:10 schrieb Gertjan van Wingerde:
> 2012/2/16 John Li <[email protected]>:
> > From: John Li <[email protected]>
> >
> > Signed-off-by: John Li <[email protected]>
>
> Acked-by: Gertjan van Wingerde <[email protected]>
>
> > ---
> > drivers/net/wireless/rt2x00/rt2800.h | 1 +
> > drivers/net/wireless/rt2x00/rt2800lib.c | 153 ++++++++++++++++++++++++++-----
> > drivers/net/wireless/rt2x00/rt2800pci.c | 3 +-
> > drivers/net/wireless/rt2x00/rt2800usb.c | 14 +++
> > drivers/net/wireless/rt2x00/rt2x00.h | 1 +
> > 5 files changed, 147 insertions(+), 25 deletions(-)
> >
> > diff --git a/drivers/net/wireless/rt2x00/rt2800.h
> > b/drivers/net/wireless/rt2x00/rt2800.h index 2571a2f..56b78c8 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800.h
> > +++ b/drivers/net/wireless/rt2x00/rt2800.h
> > @@ -68,6 +68,7 @@
> > #define RF3322 0x000c
> > #define RF3053 0x000d
> > #define RF5370 0x5370
> > +#define RF5372 0x5372
> > #define RF5390 0x5390
> >
> > /*
> > diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c
> > b/drivers/net/wireless/rt2x00/rt2800lib.c index 22a1a8f..7c6c1b5 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> > +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> > @@ -402,7 +402,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,
> >
> > if (rt2x00_is_pci(rt2x00dev)) {
> > if (rt2x00_rt(rt2x00dev, RT3572) ||
> > - rt2x00_rt(rt2x00dev, RT5390)) {
> > + rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
> > rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> > rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> > @@ -1906,7 +1907,8 @@ static void rt2800_config_channel_rf53xx(struct
> > rt2x00_dev *rt2x00dev, r55_nonbt_rev[idx]);
> > rt2800_rfcsr_write(rt2x00dev, 59,
> > r59_nonbt_rev[idx]);
> > - } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > static const char r59_non_bt[] = {0x8f, 0x8f,
> > 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
> > 0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
> > @@ -1956,6 +1958,7 @@ static void rt2800_config_channel(struct rt2x00_dev
> > *rt2x00dev, rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info); break;
> > case RF5370:
> > + case RF5372:
> > case RF5390:
> > rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
> > break;
> > @@ -1972,7 +1975,8 @@ static void rt2800_config_channel(struct rt2x00_dev
> > *rt2x00dev, rt2800_bbp_write(rt2x00dev, 86, 0);
> >
> > if (rf->channel <= 14) {
> > - if (!rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (!rt2x00_rt(rt2x00dev, RT5390) ||
> > + !rt2x00_rt(rt2x00dev, RT5392)) {

shoudn't this be && instead of || ? (more below)

> > if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
> > &rt2x00dev->cap_flags)) {
> > rt2800_bbp_write(rt2x00dev, 82, 0x62);
> > @@ -2502,7 +2506,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev
> > *rt2x00dev) rt2x00_rt(rt2x00dev, RT3071) ||
> > rt2x00_rt(rt2x00dev, RT3090) ||
> > rt2x00_rt(rt2x00dev, RT3390) ||
> > - rt2x00_rt(rt2x00dev, RT5390))
> > + rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > return 0x1c + (2 * rt2x00dev->lna_gain);
> > else
> > return 0x2e + rt2x00dev->lna_gain;
> > @@ -2637,7 +2642,8 @@ static int rt2800_init_registers(struct rt2x00_dev
> > *rt2x00dev) } else if (rt2x00_rt(rt2x00dev, RT3572)) {
> > rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
> > rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> > - } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
> > rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> > rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
> > @@ -3013,7 +3019,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> > rt2800_wait_bbp_ready(rt2x00dev)))
> > return -EACCES;
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_bbp_read(rt2x00dev, 4, &value);
> > rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
> > rt2800_bbp_write(rt2x00dev, 4, value);
> > @@ -3021,19 +3028,22 @@ static int rt2800_init_bbp(struct rt2x00_dev
> > *rt2x00dev)
> >
> > if (rt2800_is_305x_soc(rt2x00dev) ||
> > rt2x00_rt(rt2x00dev, RT3572) ||
> > - rt2x00_rt(rt2x00dev, RT5390))
> > + rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 31, 0x08);
> >
> > rt2800_bbp_write(rt2x00dev, 65, 0x2c);
> > rt2800_bbp_write(rt2x00dev, 66, 0x38);
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390))
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 68, 0x0b);
> >
> > if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
> > rt2800_bbp_write(rt2x00dev, 69, 0x16);
> > rt2800_bbp_write(rt2x00dev, 73, 0x12);
> > - } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_bbp_write(rt2x00dev, 69, 0x12);
> > rt2800_bbp_write(rt2x00dev, 73, 0x13);
> > rt2800_bbp_write(rt2x00dev, 75, 0x46);
> > @@ -3051,7 +3061,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> > rt2x00_rt(rt2x00dev, RT3090) ||
> > rt2x00_rt(rt2x00dev, RT3390) ||
> > rt2x00_rt(rt2x00dev, RT3572) ||
> > - rt2x00_rt(rt2x00dev, RT5390)) {
> > + rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_bbp_write(rt2x00dev, 79, 0x13);
> > rt2800_bbp_write(rt2x00dev, 80, 0x05);
> > rt2800_bbp_write(rt2x00dev, 81, 0x33);
> > @@ -3063,64 +3074,88 @@ static int rt2800_init_bbp(struct rt2x00_dev
> > *rt2x00dev)
> > }
> >
> > rt2800_bbp_write(rt2x00dev, 82, 0x62);
> > - if (rt2x00_rt(rt2x00dev, RT5390))
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 83, 0x7a);
> > else
> > rt2800_bbp_write(rt2x00dev, 83, 0x6a);
> >
> > if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
> > rt2800_bbp_write(rt2x00dev, 84, 0x19);
> > - else if (rt2x00_rt(rt2x00dev, RT5390))
> > + else if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 84, 0x9a);
> > else
> > rt2800_bbp_write(rt2x00dev, 84, 0x99);
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390))
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 86, 0x38);
> > else
> > rt2800_bbp_write(rt2x00dev, 86, 0x00);
> >
> > + if (rt2x00_rt(rt2x00dev, RT5392))
> > + rt2800_bbp_write(rt2x00dev, 88, 0x90);
> > +
> > rt2800_bbp_write(rt2x00dev, 91, 0x04);
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390))
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 92, 0x02);
> > else
> > rt2800_bbp_write(rt2x00dev, 92, 0x00);
> >
> > + if (rt2x00_rt(rt2x00dev, RT5392)) {
> > + rt2800_bbp_write(rt2x00dev, 95, 0x9a);
> > + rt2800_bbp_write(rt2x00dev, 98, 0x12);
> > + }
> > +
> > if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
> > rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
> > rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
> > rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) ||
> > rt2x00_rt(rt2x00dev, RT3572) ||
> > rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392) ||
> > rt2800_is_305x_soc(rt2x00dev))
> > rt2800_bbp_write(rt2x00dev, 103, 0xc0);
> > else
> > rt2800_bbp_write(rt2x00dev, 103, 0x00);
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390))
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 104, 0x92);
> >
> > if (rt2800_is_305x_soc(rt2x00dev))
> > rt2800_bbp_write(rt2x00dev, 105, 0x01);
> > - else if (rt2x00_rt(rt2x00dev, RT5390))
> > + else if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 105, 0x3c);
> > else
> > rt2800_bbp_write(rt2x00dev, 105, 0x05);
> >
> > if (rt2x00_rt(rt2x00dev, RT5390))
> > rt2800_bbp_write(rt2x00dev, 106, 0x03);
> > + else if (rt2x00_rt(rt2x00dev, RT5392))
> > + rt2800_bbp_write(rt2x00dev, 106, 0x12);
> > else
> > rt2800_bbp_write(rt2x00dev, 106, 0x35);
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390))
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))
> > rt2800_bbp_write(rt2x00dev, 128, 0x12);
> >
> > + if (rt2x00_rt(rt2x00dev, RT5392)) {
> > + rt2800_bbp_write(rt2x00dev, 134, 0xd0);
> > + rt2800_bbp_write(rt2x00dev, 135, 0xf6);
> > + }
> > +
> > if (rt2x00_rt(rt2x00dev, RT3071) ||
> > rt2x00_rt(rt2x00dev, RT3090) ||
> > rt2x00_rt(rt2x00dev, RT3390) ||
> > rt2x00_rt(rt2x00dev, RT3572) ||
> > - rt2x00_rt(rt2x00dev, RT5390)) {
> > + rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_bbp_read(rt2x00dev, 138, &value);
> >
> > rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
> > @@ -3132,7 +3167,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> > rt2800_bbp_write(rt2x00dev, 138, value);
> > }
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > int ant, div_mode;
> >
> > rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
> > @@ -3258,13 +3294,15 @@ static int rt2800_init_rfcsr(struct rt2x00_dev
> > *rt2x00dev) !rt2x00_rt(rt2x00dev, RT3390) &&
> > !rt2x00_rt(rt2x00dev, RT3572) &&
> > !rt2x00_rt(rt2x00dev, RT5390) &&
> > + !rt2x00_rt(rt2x00dev, RT5392) &&
> > !rt2800_is_305x_soc(rt2x00dev))
> > return 0;
> >
> > /*
> > * Init RF calibration.
> > */
> > - if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
> > rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
> > rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
> > @@ -3482,6 +3520,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev
> > *rt2x00dev) rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
> > rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
> > rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
> > + } else if (rt2x00_rt(rt2x00dev, RT5392)) {
> > + rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
> > + rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
> > + rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
> > + rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
> > + rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
> > + rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
> > + rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
> > + rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
> > + rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
> > + rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
> > + rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
> > + rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
> > + rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
> > + rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
> > + rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
> > + rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
> > + rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
> > + rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
> > + rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
> > + rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
> > + rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
> > + rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
> > + rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
> > + rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
> > + rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
> > + rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
> > + rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
> > + rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
> > + rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
> > + rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
> > + rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
> > + rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
> > + rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
> > + rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
> > + rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
> > + rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
> > + rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
> > + rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
> > + rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
> > + rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
> > + rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
> > + rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
> > + rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
> > + rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
> > + rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
> > + rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
> > + rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
> > + rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
> > + rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
> > + rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
> > + rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
> > + rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
> > }
> >
> > if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
> > @@ -3549,7 +3647,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev
> > *rt2x00dev)
> > rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
> > }
> >
> > - if (!rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (!rt2x00_rt(rt2x00dev, RT5390) ||
> > + !rt2x00_rt(rt2x00dev, RT5392)) {

same here


> > /*
> > * Set back to initial state
> > */
> > @@ -3577,7 +3676,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev
> > *rt2x00dev)
> > rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
> > rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);
> >
> > - if (!rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (!rt2x00_rt(rt2x00dev, RT5390) ||
> > + !rt2x00_rt(rt2x00dev, RT5392)) {

and here

> > rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
> > rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
> > if (rt2x00_rt(rt2x00dev, RT3070) ||
> > @@ -3645,7 +3745,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev
> > *rt2x00dev)
> > rt2800_rfcsr_write(rt2x00dev, 27, rfcsr);
> > }
> >
> > - if (rt2x00_rt(rt2x00dev, RT5390)) {
> > + if (rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392)) {
> > rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
> > rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
> > rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
> > @@ -3929,7 +4030,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> > * RT53xx: defined in "EEPROM_CHIP_ID" field
> > */
> > rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
> > - if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
> > + if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
> > + rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
> > rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
> > else
> > value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
> > @@ -3947,6 +4049,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> > case RT3390:
> > case RT3572:
> > case RT5390:
> > + case RT5392:
> > break;
> > default:
> > ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
> > @@ -3965,6 +4068,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> > case RF3052:
> > case RF3320:
> > case RF5370:
> > + case RF5372:
> > case RF5390:
> > break;
> > default:
> > @@ -4271,6 +4375,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
> > rt2x00_rf(rt2x00dev, RF3022) ||
> > rt2x00_rf(rt2x00dev, RF3320) ||
> > rt2x00_rf(rt2x00dev, RF5370) ||
> > + rt2x00_rf(rt2x00dev, RF5372) ||
> > rt2x00_rf(rt2x00dev, RF5390)) {
> > spec->num_channels = 14;
> > spec->channels = rf_vals_3x;
> > diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c
> > b/drivers/net/wireless/rt2x00/rt2800pci.c index 837b460..bf0f83c 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> > +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> > @@ -480,7 +480,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev
> > *rt2x00dev)
> >
> > if (rt2x00_is_pcie(rt2x00dev) &&
> > (rt2x00_rt(rt2x00dev, RT3572) ||
> > - rt2x00_rt(rt2x00dev, RT5390))) {
> > + rt2x00_rt(rt2x00dev, RT5390) ||
> > + rt2x00_rt(rt2x00dev, RT5392))) {
> > rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
> > rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> > rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> > diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c
> > b/drivers/net/wireless/rt2x00/rt2800usb.c index 7f21005..6565113 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> > +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> > @@ -1101,12 +1101,26 @@ static struct usb_device_id rt2800usb_device_table[] =
> > {
> > { USB_DEVICE(0x5a57, 0x0284) },
> > #endif
> > #ifdef CONFIG_RT2800USB_RT53XX
> > + /* Alpha */
> > + { USB_DEVICE(0x2001, 0x3c15) },
> > + { USB_DEVICE(0x2001, 0x3c19) },
> > + /* Arcadyan */
> > + { USB_DEVICE(0x043e, 0x7a12) },
> > /* Azurewave */
> > { USB_DEVICE(0x13d3, 0x3329) },
> > { USB_DEVICE(0x13d3, 0x3365) },
> > + /* LG innotek */
> > + { USB_DEVICE(0x043e, 0x7a22) },
> > + /* Panasonic */
> > + { USB_DEVICE(0x04da, 0x1801) },
> > + { USB_DEVICE(0x04da, 0x1800) },
> > + /* Philips */
> > + { USB_DEVICE(0x0471, 0x2104) },
> > /* Ralink */
> > { USB_DEVICE(0x148f, 0x5370) },
> > { USB_DEVICE(0x148f, 0x5372) },
> > + /* Unknown */
> > + { USB_DEVICE(0x04da, 0x23f6) },
> > #endif
> > #ifdef CONFIG_RT2800USB_UNKNOWN
> > /*
> > diff --git a/drivers/net/wireless/rt2x00/rt2x00.h
> > b/drivers/net/wireless/rt2x00/rt2x00.h index b03b22c..bf743cd 100644
> > --- a/drivers/net/wireless/rt2x00/rt2x00.h
> > +++ b/drivers/net/wireless/rt2x00/rt2x00.h
> > @@ -192,6 +192,7 @@ struct rt2x00_chip {
> > #define RT3593 0x3593
> > #define RT3883 0x3883 /* WSOC */
> > #define RT5390 0x5390 /* 2.4GHz */
> > +#define RT5392 0x5392 /* 2.4GHz */
> >
> > u16 rf;
> > u16 rev;
> > --
> > 1.7.6.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html

2012-02-17 13:06:35

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: [PATCH] rt2x00:Add RT5372 chipset support

2012/2/17 John Li <[email protected]>:
> From: John Li <[email protected]>
>
> Signed-off-by: John Li <[email protected]>

Thanks to Marc Dietrich for spotting my oversight in the reviewing.
Anyway, this updated patch still is:

Acked-by: Gertjan van Wingerde <[email protected]>

> ---
> ?drivers/net/wireless/rt2x00/rt2800.h ? ?| ? ?1 +
> ?drivers/net/wireless/rt2x00/rt2800lib.c | ?153 ++++++++++++++++++++++++++-----
> ?drivers/net/wireless/rt2x00/rt2800pci.c | ? ?3 +-
> ?drivers/net/wireless/rt2x00/rt2800usb.c | ? 14 +++
> ?drivers/net/wireless/rt2x00/rt2x00.h ? ?| ? ?1 +
> ?5 files changed, 147 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index 2571a2f..56b78c8 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -68,6 +68,7 @@
> ?#define RF3322 ? ? ? ? ? ? ? ? ? ? ? ? 0x000c
> ?#define RF3053 ? ? ? ? ? ? ? ? ? ? ? ? 0x000d
> ?#define RF5370 ? ? ? ? ? ? ? ? ? ? ? ? 0x5370
> +#define RF5372 ? ? ? ? ? ? ? ? ? ? ? ? 0x5372
> ?#define RF5390 ? ? ? ? ? ? ? ? ? ? ? ? 0x5390
>
> ?/*
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 22a1a8f..90d7a36 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -402,7 +402,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,
>
> ? ? ? ?if (rt2x00_is_pci(rt2x00dev)) {
> ? ? ? ? ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
> ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> @@ -1906,7 +1907,8 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r55_nonbt_rev[idx]);
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 59,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r59_nonbt_rev[idx]);
> - ? ? ? ? ? ? ? ? ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? ? ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?static const char r59_non_bt[] = {0x8f, 0x8f,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
> @@ -1956,6 +1958,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ?rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case RF5370:
> + ? ? ? case RF5372:
> ? ? ? ?case RF5390:
> ? ? ? ? ? ? ? ?rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
> ? ? ? ? ? ? ? ?break;
> @@ -1972,7 +1975,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0);
>
> ? ? ? ?if (rf->channel <= 14) {
> - ? ? ? ? ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ?if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &rt2x00dev->cap_flags)) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 82, 0x62);
> @@ -2502,7 +2506,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3071) ||
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> - ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ? ? ? ? ?return 0x1c + (2 * rt2x00dev->lna_gain);
> ? ? ? ? ? ? ? ?else
> ? ? ? ? ? ? ? ? ? ? ? ?return 0x2e + rt2x00dev->lna_gain;
> @@ -2637,7 +2642,8 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?} else if (rt2x00_rt(rt2x00dev, RT3572)) {
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> - ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
> @@ -3013,7 +3019,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? rt2800_wait_bbp_ready(rt2x00dev)))
> ? ? ? ? ? ? ? ?return -EACCES;
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_read(rt2x00dev, 4, &value);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 4, value);
> @@ -3021,19 +3028,22 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
>
> ? ? ? ?if (rt2800_is_305x_soc(rt2x00dev) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 31, 0x08);
>
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 65, 0x2c);
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 66, 0x38);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 68, 0x0b);
>
> ? ? ? ?if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 69, 0x16);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 73, 0x12);
> - ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 69, 0x12);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 73, 0x13);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 75, 0x46);
> @@ -3051,7 +3061,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 79, 0x13);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 80, 0x05);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 81, 0x33);
> @@ -3063,64 +3074,88 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?}
>
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 82, 0x62);
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 83, 0x7a);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 83, 0x6a);
>
> ? ? ? ?if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x19);
> - ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x9a);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x99);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0x38);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0x00);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392))
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 88, 0x90);
> +
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 91, 0x04);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 92, 0x02);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 92, 0x00);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 95, 0x9a);
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 98, 0x12);
> + ? ? ? }
> +
> ? ? ? ?if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392) ||
> ? ? ? ? ? ?rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 103, 0xc0);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 103, 0x00);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 104, 0x92);
>
> ? ? ? ?if (rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x01);
> - ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x3c);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x05);
>
> ? ? ? ?if (rt2x00_rt(rt2x00dev, RT5390))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 106, 0x03);
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5392))
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 106, 0x12);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 106, 0x35);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 128, 0x12);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 134, 0xd0);
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 135, 0xf6);
> + ? ? ? }
> +
> ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3071) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_read(rt2x00dev, 138, &value);
>
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
> @@ -3132,7 +3167,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 138, value);
> ? ? ? ?}
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?int ant, div_mode;
>
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
> @@ -3258,13 +3294,15 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT3390) &&
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT3572) &&
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392) &&
> ? ? ? ? ? ?!rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?return 0;
>
> ? ? ? ?/*
> ? ? ? ? * Init RF calibration.
> ? ? ? ? */
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
> @@ -3482,6 +3520,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
> + ? ? ? } ? ? ? else if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
> ? ? ? ?}
>
> ? ? ? ?if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
> @@ -3549,7 +3647,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
> ? ? ? ?}
>
> - ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * Set back to initial state
> ? ? ? ? ? ? ? ? */
> @@ -3577,7 +3676,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
> ? ? ? ?rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);
>
> - ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
> ? ? ? ? ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3070) ||
> @@ -3645,7 +3745,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 27, rfcsr);
> ? ? ? ?}
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
> @@ -3929,7 +4030,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? * RT53xx: defined in "EEPROM_CHIP_ID" field
> ? ? ? ? */
> ? ? ? ?rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
> - ? ? ? if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
> + ? ? ? if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
> + ? ? ? ? ? ? ? rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
> @@ -3947,6 +4049,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?case RT3390:
> ? ? ? ?case RT3572:
> ? ? ? ?case RT5390:
> + ? ? ? case RT5392:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> ? ? ? ? ? ? ? ?ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
> @@ -3965,6 +4068,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?case RF3052:
> ? ? ? ?case RF3320:
> ? ? ? ?case RF5370:
> + ? ? ? case RF5372:
> ? ? ? ?case RF5390:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> @@ -4271,6 +4375,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF3022) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF3320) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF5370) ||
> + ? ? ? ? ? ? ? ? ?rt2x00_rf(rt2x00dev, RF5372) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF5390)) {
> ? ? ? ? ? ? ? ?spec->num_channels = 14;
> ? ? ? ? ? ? ? ?spec->channels = rf_vals_3x;
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
> index 837b460..bf0f83c 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -480,7 +480,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
>
> ? ? ? ?if (rt2x00_is_pcie(rt2x00dev) &&
> ? ? ? ? ? ?(rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390))) {
> + ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))) {
> ? ? ? ? ? ? ? ?rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
> ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 7f21005..6565113 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -1101,12 +1101,26 @@ static struct usb_device_id rt2800usb_device_table[] = {
> ? ? ? ?{ USB_DEVICE(0x5a57, 0x0284) },
> ?#endif
> ?#ifdef CONFIG_RT2800USB_RT53XX
> + ? ? ? /* Alpha */
> + ? ? ? { USB_DEVICE(0x2001, 0x3c15) },
> + ? ? ? { USB_DEVICE(0x2001, 0x3c19) },
> + ? ? ? /* Arcadyan */
> + ? ? ? { USB_DEVICE(0x043e, 0x7a12) },
> ? ? ? ?/* Azurewave */
> ? ? ? ?{ USB_DEVICE(0x13d3, 0x3329) },
> ? ? ? ?{ USB_DEVICE(0x13d3, 0x3365) },
> + ? ? ? /* LG innotek */
> + ? ? ? { USB_DEVICE(0x043e, 0x7a22) },
> + ? ? ? /* Panasonic */
> + ? ? ? { USB_DEVICE(0x04da, 0x1801) },
> + ? ? ? { USB_DEVICE(0x04da, 0x1800) },
> + ? ? ? /* Philips */
> + ? ? ? { USB_DEVICE(0x0471, 0x2104) },
> ? ? ? ?/* Ralink */
> ? ? ? ?{ USB_DEVICE(0x148f, 0x5370) },
> ? ? ? ?{ USB_DEVICE(0x148f, 0x5372) },
> + ? ? ? /* Unknown */
> + ? ? ? { USB_DEVICE(0x04da, 0x23f6) },
> ?#endif
> ?#ifdef CONFIG_RT2800USB_UNKNOWN
> ? ? ? ?/*
> diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
> index b03b22c..bf743cd 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00.h
> +++ b/drivers/net/wireless/rt2x00/rt2x00.h
> @@ -192,6 +192,7 @@ struct rt2x00_chip {
> ?#define RT3593 ? ? ? ? 0x3593
> ?#define RT3883 ? ? ? ? 0x3883 ?/* WSOC */
> ?#define RT5390 ? ? ? ? 0x5390 ?/* 2.4GHz */
> +#define RT5392 ? ? ? ? 0x5392 ?/* 2.4GHz */
>
> ? ? ? ?u16 rf;
> ? ? ? ?u16 rev;
> --
> 1.7.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html



--
---
Gertjan

2012-02-17 07:31:12

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: [PATCH] rt2x00:Add RT5372 chipset support

2012/2/16 John Li <[email protected]>:
> From: John Li <[email protected]>
>
> Signed-off-by: John Li <[email protected]>

Acked-by: Gertjan van Wingerde <[email protected]>

> ---
> ?drivers/net/wireless/rt2x00/rt2800.h ? ?| ? ?1 +
> ?drivers/net/wireless/rt2x00/rt2800lib.c | ?153 ++++++++++++++++++++++++++-----
> ?drivers/net/wireless/rt2x00/rt2800pci.c | ? ?3 +-
> ?drivers/net/wireless/rt2x00/rt2800usb.c | ? 14 +++
> ?drivers/net/wireless/rt2x00/rt2x00.h ? ?| ? ?1 +
> ?5 files changed, 147 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index 2571a2f..56b78c8 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -68,6 +68,7 @@
> ?#define RF3322 ? ? ? ? ? ? ? ? ? ? ? ? 0x000c
> ?#define RF3053 ? ? ? ? ? ? ? ? ? ? ? ? 0x000d
> ?#define RF5370 ? ? ? ? ? ? ? ? ? ? ? ? 0x5370
> +#define RF5372 ? ? ? ? ? ? ? ? ? ? ? ? 0x5372
> ?#define RF5390 ? ? ? ? ? ? ? ? ? ? ? ? 0x5390
>
> ?/*
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 22a1a8f..7c6c1b5 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -402,7 +402,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,
>
> ? ? ? ?if (rt2x00_is_pci(rt2x00dev)) {
> ? ? ? ? ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
> ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> @@ -1906,7 +1907,8 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r55_nonbt_rev[idx]);
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 59,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r59_nonbt_rev[idx]);
> - ? ? ? ? ? ? ? ? ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? ? ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?static const char r59_non_bt[] = {0x8f, 0x8f,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
> @@ -1956,6 +1958,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ?rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case RF5370:
> + ? ? ? case RF5372:
> ? ? ? ?case RF5390:
> ? ? ? ? ? ? ? ?rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
> ? ? ? ? ? ? ? ?break;
> @@ -1972,7 +1975,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0);
>
> ? ? ? ?if (rf->channel <= 14) {
> - ? ? ? ? ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ?if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &rt2x00dev->cap_flags)) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 82, 0x62);
> @@ -2502,7 +2506,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3071) ||
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> - ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ? ? ? ? ?return 0x1c + (2 * rt2x00dev->lna_gain);
> ? ? ? ? ? ? ? ?else
> ? ? ? ? ? ? ? ? ? ? ? ?return 0x2e + rt2x00dev->lna_gain;
> @@ -2637,7 +2642,8 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?} else if (rt2x00_rt(rt2x00dev, RT3572)) {
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> - ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
> @@ -3013,7 +3019,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? rt2800_wait_bbp_ready(rt2x00dev)))
> ? ? ? ? ? ? ? ?return -EACCES;
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_read(rt2x00dev, 4, &value);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 4, value);
> @@ -3021,19 +3028,22 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
>
> ? ? ? ?if (rt2800_is_305x_soc(rt2x00dev) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 31, 0x08);
>
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 65, 0x2c);
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 66, 0x38);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 68, 0x0b);
>
> ? ? ? ?if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 69, 0x16);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 73, 0x12);
> - ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 69, 0x12);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 73, 0x13);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 75, 0x46);
> @@ -3051,7 +3061,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 79, 0x13);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 80, 0x05);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 81, 0x33);
> @@ -3063,64 +3074,88 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?}
>
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 82, 0x62);
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 83, 0x7a);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 83, 0x6a);
>
> ? ? ? ?if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x19);
> - ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x9a);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x99);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0x38);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0x00);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392))
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 88, 0x90);
> +
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 91, 0x04);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 92, 0x02);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 92, 0x00);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 95, 0x9a);
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 98, 0x12);
> + ? ? ? }
> +
> ? ? ? ?if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392) ||
> ? ? ? ? ? ?rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 103, 0xc0);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 103, 0x00);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 104, 0x92);
>
> ? ? ? ?if (rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x01);
> - ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x3c);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x05);
>
> ? ? ? ?if (rt2x00_rt(rt2x00dev, RT5390))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 106, 0x03);
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5392))
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 106, 0x12);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 106, 0x35);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 128, 0x12);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 134, 0xd0);
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 135, 0xf6);
> + ? ? ? }
> +
> ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3071) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_read(rt2x00dev, 138, &value);
>
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
> @@ -3132,7 +3167,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 138, value);
> ? ? ? ?}
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?int ant, div_mode;
>
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
> @@ -3258,13 +3294,15 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT3390) &&
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT3572) &&
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392) &&
> ? ? ? ? ? ?!rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?return 0;
>
> ? ? ? ?/*
> ? ? ? ? * Init RF calibration.
> ? ? ? ? */
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
> @@ -3482,6 +3520,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
> + ? ? ? } ? ? ? else if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
> ? ? ? ?}
>
> ? ? ? ?if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
> @@ -3549,7 +3647,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
> ? ? ? ?}
>
> - ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * Set back to initial state
> ? ? ? ? ? ? ? ? */
> @@ -3577,7 +3676,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
> ? ? ? ?rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);
>
> - ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
> ? ? ? ? ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3070) ||
> @@ -3645,7 +3745,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 27, rfcsr);
> ? ? ? ?}
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
> @@ -3929,7 +4030,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? * RT53xx: defined in "EEPROM_CHIP_ID" field
> ? ? ? ? */
> ? ? ? ?rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
> - ? ? ? if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
> + ? ? ? if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
> + ? ? ? ? ? ? ? rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
> @@ -3947,6 +4049,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?case RT3390:
> ? ? ? ?case RT3572:
> ? ? ? ?case RT5390:
> + ? ? ? case RT5392:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> ? ? ? ? ? ? ? ?ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
> @@ -3965,6 +4068,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?case RF3052:
> ? ? ? ?case RF3320:
> ? ? ? ?case RF5370:
> + ? ? ? case RF5372:
> ? ? ? ?case RF5390:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> @@ -4271,6 +4375,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF3022) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF3320) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF5370) ||
> + ? ? ? ? ? ? ? ? ?rt2x00_rf(rt2x00dev, RF5372) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF5390)) {
> ? ? ? ? ? ? ? ?spec->num_channels = 14;
> ? ? ? ? ? ? ? ?spec->channels = rf_vals_3x;
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
> index 837b460..bf0f83c 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -480,7 +480,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
>
> ? ? ? ?if (rt2x00_is_pcie(rt2x00dev) &&
> ? ? ? ? ? ?(rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390))) {
> + ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))) {
> ? ? ? ? ? ? ? ?rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
> ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 7f21005..6565113 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -1101,12 +1101,26 @@ static struct usb_device_id rt2800usb_device_table[] = {
> ? ? ? ?{ USB_DEVICE(0x5a57, 0x0284) },
> ?#endif
> ?#ifdef CONFIG_RT2800USB_RT53XX
> + ? ? ? /* Alpha */
> + ? ? ? { USB_DEVICE(0x2001, 0x3c15) },
> + ? ? ? { USB_DEVICE(0x2001, 0x3c19) },
> + ? ? ? /* Arcadyan */
> + ? ? ? { USB_DEVICE(0x043e, 0x7a12) },
> ? ? ? ?/* Azurewave */
> ? ? ? ?{ USB_DEVICE(0x13d3, 0x3329) },
> ? ? ? ?{ USB_DEVICE(0x13d3, 0x3365) },
> + ? ? ? /* LG innotek */
> + ? ? ? { USB_DEVICE(0x043e, 0x7a22) },
> + ? ? ? /* Panasonic */
> + ? ? ? { USB_DEVICE(0x04da, 0x1801) },
> + ? ? ? { USB_DEVICE(0x04da, 0x1800) },
> + ? ? ? /* Philips */
> + ? ? ? { USB_DEVICE(0x0471, 0x2104) },
> ? ? ? ?/* Ralink */
> ? ? ? ?{ USB_DEVICE(0x148f, 0x5370) },
> ? ? ? ?{ USB_DEVICE(0x148f, 0x5372) },
> + ? ? ? /* Unknown */
> + ? ? ? { USB_DEVICE(0x04da, 0x23f6) },
> ?#endif
> ?#ifdef CONFIG_RT2800USB_UNKNOWN
> ? ? ? ?/*
> diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
> index b03b22c..bf743cd 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00.h
> +++ b/drivers/net/wireless/rt2x00/rt2x00.h
> @@ -192,6 +192,7 @@ struct rt2x00_chip {
> ?#define RT3593 ? ? ? ? 0x3593
> ?#define RT3883 ? ? ? ? 0x3883 ?/* WSOC */
> ?#define RT5390 ? ? ? ? 0x5390 ?/* 2.4GHz */
> +#define RT5392 ? ? ? ? 0x5392 ?/* 2.4GHz */
>
> ? ? ? ?u16 rf;
> ? ? ? ?u16 rev;
> --
> 1.7.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html



--
---
Gertjan

2012-02-18 12:24:56

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [PATCH] rt2x00:Add RT5372 chipset support

2012/2/17 John Li <[email protected]>:
> From: John Li <[email protected]>
>
> Signed-off-by: John Li <[email protected]>

Acked-by: Ivo van Doorn <[email protected]>

> ---
> ?drivers/net/wireless/rt2x00/rt2800.h ? ?| ? ?1 +
> ?drivers/net/wireless/rt2x00/rt2800lib.c | ?153 ++++++++++++++++++++++++++-----
> ?drivers/net/wireless/rt2x00/rt2800pci.c | ? ?3 +-
> ?drivers/net/wireless/rt2x00/rt2800usb.c | ? 14 +++
> ?drivers/net/wireless/rt2x00/rt2x00.h ? ?| ? ?1 +
> ?5 files changed, 147 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index 2571a2f..56b78c8 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -68,6 +68,7 @@
> ?#define RF3322 ? ? ? ? ? ? ? ? ? ? ? ? 0x000c
> ?#define RF3053 ? ? ? ? ? ? ? ? ? ? ? ? 0x000d
> ?#define RF5370 ? ? ? ? ? ? ? ? ? ? ? ? 0x5370
> +#define RF5372 ? ? ? ? ? ? ? ? ? ? ? ? 0x5372
> ?#define RF5390 ? ? ? ? ? ? ? ? ? ? ? ? 0x5390
>
> ?/*
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 22a1a8f..90d7a36 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -402,7 +402,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,
>
> ? ? ? ?if (rt2x00_is_pci(rt2x00dev)) {
> ? ? ? ? ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
> ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> @@ -1906,7 +1907,8 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r55_nonbt_rev[idx]);
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 59,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r59_nonbt_rev[idx]);
> - ? ? ? ? ? ? ? ? ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? ? ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?static const char r59_non_bt[] = {0x8f, 0x8f,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
> @@ -1956,6 +1958,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ?rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case RF5370:
> + ? ? ? case RF5372:
> ? ? ? ?case RF5390:
> ? ? ? ? ? ? ? ?rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
> ? ? ? ? ? ? ? ?break;
> @@ -1972,7 +1975,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0);
>
> ? ? ? ?if (rf->channel <= 14) {
> - ? ? ? ? ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ? ? ? ? ?if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &rt2x00dev->cap_flags)) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 82, 0x62);
> @@ -2502,7 +2506,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3071) ||
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> - ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ? ? ? ? ?return 0x1c + (2 * rt2x00dev->lna_gain);
> ? ? ? ? ? ? ? ?else
> ? ? ? ? ? ? ? ? ? ? ? ?return 0x2e + rt2x00dev->lna_gain;
> @@ -2637,7 +2642,8 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?} else if (rt2x00_rt(rt2x00dev, RT3572)) {
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> - ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
> ? ? ? ? ? ? ? ?rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
> @@ -3013,7 +3019,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? rt2800_wait_bbp_ready(rt2x00dev)))
> ? ? ? ? ? ? ? ?return -EACCES;
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_read(rt2x00dev, 4, &value);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 4, value);
> @@ -3021,19 +3028,22 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
>
> ? ? ? ?if (rt2800_is_305x_soc(rt2x00dev) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 31, 0x08);
>
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 65, 0x2c);
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 66, 0x38);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 68, 0x0b);
>
> ? ? ? ?if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 69, 0x16);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 73, 0x12);
> - ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 69, 0x12);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 73, 0x13);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 75, 0x46);
> @@ -3051,7 +3061,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 79, 0x13);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 80, 0x05);
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 81, 0x33);
> @@ -3063,64 +3074,88 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?}
>
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 82, 0x62);
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 83, 0x7a);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 83, 0x6a);
>
> ? ? ? ?if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x19);
> - ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x9a);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 84, 0x99);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0x38);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 86, 0x00);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392))
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 88, 0x90);
> +
> ? ? ? ?rt2800_bbp_write(rt2x00dev, 91, 0x04);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 92, 0x02);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 92, 0x00);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 95, 0x9a);
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 98, 0x12);
> + ? ? ? }
> +
> ? ? ? ?if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
> ? ? ? ? ? ?rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392) ||
> ? ? ? ? ? ?rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 103, 0xc0);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 103, 0x00);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 104, 0x92);
>
> ? ? ? ?if (rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x01);
> - ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x3c);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 105, 0x05);
>
> ? ? ? ?if (rt2x00_rt(rt2x00dev, RT5390))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 106, 0x03);
> + ? ? ? else if (rt2x00_rt(rt2x00dev, RT5392))
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 106, 0x12);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 106, 0x35);
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390))
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392))
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 128, 0x12);
>
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 134, 0xd0);
> + ? ? ? ? ? ? ? rt2800_bbp_write(rt2x00dev, 135, 0xf6);
> + ? ? ? }
> +
> ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3071) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3090) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3390) ||
> ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_bbp_read(rt2x00dev, 138, &value);
>
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
> @@ -3132,7 +3167,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ?rt2800_bbp_write(rt2x00dev, 138, value);
> ? ? ? ?}
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?int ant, div_mode;
>
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
> @@ -3258,13 +3294,15 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT3390) &&
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT3572) &&
> ? ? ? ? ? ?!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392) &&
> ? ? ? ? ? ?!rt2800_is_305x_soc(rt2x00dev))
> ? ? ? ? ? ? ? ?return 0;
>
> ? ? ? ?/*
> ? ? ? ? * Init RF calibration.
> ? ? ? ? */
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
> @@ -3482,6 +3520,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
> + ? ? ? } ? ? ? else if (rt2x00_rt(rt2x00dev, RT5392)) {
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
> + ? ? ? ? ? ? ? ? ? ? ? rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
> ? ? ? ?}
>
> ? ? ? ?if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
> @@ -3549,7 +3647,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? ? ? ?rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
> ? ? ? ?}
>
> - ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * Set back to initial state
> ? ? ? ? ? ? ? ? */
> @@ -3577,7 +3676,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
> ? ? ? ?rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);
>
> - ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (!rt2x00_rt(rt2x00dev, RT5390) &&
> + ? ? ? ? ? ? ? !rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
> ? ? ? ? ? ? ? ?if (rt2x00_rt(rt2x00dev, RT3070) ||
> @@ -3645,7 +3745,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 27, rfcsr);
> ? ? ? ?}
>
> - ? ? ? if (rt2x00_rt(rt2x00dev, RT5390)) {
> + ? ? ? if (rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ? ? rt2x00_rt(rt2x00dev, RT5392)) {
> ? ? ? ? ? ? ? ?rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
> ? ? ? ? ? ? ? ?rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
> ? ? ? ? ? ? ? ?rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
> @@ -3929,7 +4030,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? * RT53xx: defined in "EEPROM_CHIP_ID" field
> ? ? ? ? */
> ? ? ? ?rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
> - ? ? ? if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
> + ? ? ? if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
> + ? ? ? ? ? ? ? rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
> ? ? ? ? ? ? ? ?rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
> ? ? ? ?else
> ? ? ? ? ? ? ? ?value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
> @@ -3947,6 +4049,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?case RT3390:
> ? ? ? ?case RT3572:
> ? ? ? ?case RT5390:
> + ? ? ? case RT5392:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> ? ? ? ? ? ? ? ?ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
> @@ -3965,6 +4068,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> ? ? ? ?case RF3052:
> ? ? ? ?case RF3320:
> ? ? ? ?case RF5370:
> + ? ? ? case RF5372:
> ? ? ? ?case RF5390:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?default:
> @@ -4271,6 +4375,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF3022) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF3320) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF5370) ||
> + ? ? ? ? ? ? ? ? ?rt2x00_rf(rt2x00dev, RF5372) ||
> ? ? ? ? ? ? ? ? ? rt2x00_rf(rt2x00dev, RF5390)) {
> ? ? ? ? ? ? ? ?spec->num_channels = 14;
> ? ? ? ? ? ? ? ?spec->channels = rf_vals_3x;
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
> index 837b460..bf0f83c 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -480,7 +480,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
>
> ? ? ? ?if (rt2x00_is_pcie(rt2x00dev) &&
> ? ? ? ? ? ?(rt2x00_rt(rt2x00dev, RT3572) ||
> - ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390))) {
> + ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5390) ||
> + ? ? ? ? ? ?rt2x00_rt(rt2x00dev, RT5392))) {
> ? ? ? ? ? ? ? ?rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
> ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
> ? ? ? ? ? ? ? ?rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 7f21005..6565113 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -1101,12 +1101,26 @@ static struct usb_device_id rt2800usb_device_table[] = {
> ? ? ? ?{ USB_DEVICE(0x5a57, 0x0284) },
> ?#endif
> ?#ifdef CONFIG_RT2800USB_RT53XX
> + ? ? ? /* Alpha */
> + ? ? ? { USB_DEVICE(0x2001, 0x3c15) },
> + ? ? ? { USB_DEVICE(0x2001, 0x3c19) },
> + ? ? ? /* Arcadyan */
> + ? ? ? { USB_DEVICE(0x043e, 0x7a12) },
> ? ? ? ?/* Azurewave */
> ? ? ? ?{ USB_DEVICE(0x13d3, 0x3329) },
> ? ? ? ?{ USB_DEVICE(0x13d3, 0x3365) },
> + ? ? ? /* LG innotek */
> + ? ? ? { USB_DEVICE(0x043e, 0x7a22) },
> + ? ? ? /* Panasonic */
> + ? ? ? { USB_DEVICE(0x04da, 0x1801) },
> + ? ? ? { USB_DEVICE(0x04da, 0x1800) },
> + ? ? ? /* Philips */
> + ? ? ? { USB_DEVICE(0x0471, 0x2104) },
> ? ? ? ?/* Ralink */
> ? ? ? ?{ USB_DEVICE(0x148f, 0x5370) },
> ? ? ? ?{ USB_DEVICE(0x148f, 0x5372) },
> + ? ? ? /* Unknown */
> + ? ? ? { USB_DEVICE(0x04da, 0x23f6) },
> ?#endif
> ?#ifdef CONFIG_RT2800USB_UNKNOWN
> ? ? ? ?/*
> diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
> index b03b22c..bf743cd 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00.h
> +++ b/drivers/net/wireless/rt2x00/rt2x00.h
> @@ -192,6 +192,7 @@ struct rt2x00_chip {
> ?#define RT3593 ? ? ? ? 0x3593
> ?#define RT3883 ? ? ? ? 0x3883 ?/* WSOC */
> ?#define RT5390 ? ? ? ? 0x5390 ?/* 2.4GHz */
> +#define RT5392 ? ? ? ? 0x5392 ?/* 2.4GHz */
>
> ? ? ? ?u16 rf;
> ? ? ? ?u16 rev;
> --
> 1.7.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html