aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/radio_2056.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-04-20 07:05:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-04-22 15:06:33 -0400
commit4bd48b86f1606e33fea8a0d4ec5c478f0c625489 (patch)
treeed7c1c77d5fa22fe58ce72b4639b0a54b5f716ce /drivers/net/wireless/b43/radio_2056.c
parent97e2a1a1e477b0109eb943aa339bfc451e895025 (diff)
b43: N-PHY: add init & calib values for radio 0x2056 rev 11
They were extracted from MMIO dumps of 14e4:4353 and wl 6.30.223.141. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/radio_2056.c')
-rw-r--r--drivers/net/wireless/b43/radio_2056.c246
1 files changed, 246 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c
index b4fd9345d673..d252c5247bb8 100644
--- a/drivers/net/wireless/b43/radio_2056.c
+++ b/drivers/net/wireless/b43/radio_2056.c
@@ -2972,6 +2972,51 @@ static const struct b2056_inittab_entry b2056_inittab_rev8_rx[] = {
2972 [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, 2972 [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
2973}; 2973};
2974 2974
2975static const struct b2056_inittab_entry b2056_inittab_radio_rev11_syn[] = {
2976 [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0006, .ghz2 = 0x0006, UPLOAD, },
2977 [B2056_SYN_PLL_CP2] = { .ghz5 = 0x003f, .ghz2 = 0x003f, UPLOAD, },
2978 [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x0006, .ghz2 = 0x0006, UPLOAD, },
2979 [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x0006, .ghz2 = 0x0006, UPLOAD, },
2980 [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x002b, .ghz2 = 0x002b, UPLOAD, },
2981 [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, },
2982 [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, },
2983 [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, },
2984};
2985
2986static const struct b2056_inittab_entry b2056_inittab_radio_rev11_tx[] = {
2987 [B2056_TX_PA_SPARE2] = { .ghz5 = 0x00ee, .ghz2 = 0x00ee, UPLOAD, },
2988 [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, },
2989 [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, },
2990 [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, },
2991 [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, },
2992 [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, },
2993 [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, },
2994 [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, },
2995 [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, },
2996 [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, },
2997 [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, },
2998 [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, },
2999 [B2056_TX_TXSPARE1] = { .ghz5 = 0x0030, .ghz2 = 0x0030, UPLOAD, },
3000};
3001
3002static const struct b2056_inittab_entry b2056_inittab_radio_rev11_rx[] = {
3003 [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, },
3004 [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, },
3005 [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, },
3006 [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, },
3007 [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, },
3008 [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0088, .ghz2 = 0x0088, UPLOAD, },
3009 [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, },
3010 [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, },
3011 [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, },
3012 [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, },
3013 [B2056_RX_TIA_IMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, },
3014 [B2056_RX_TIA_QMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, },
3015 [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x0004, .ghz2 = 0x0004, UPLOAD, },
3016 [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, },
3017 [B2056_RX_RXSPARE3] = { .ghz5 = 0x0005, .ghz2 = 0x0005, UPLOAD, },
3018};
3019
2975#define INITTABSPTS(prefix) \ 3020#define INITTABSPTS(prefix) \
2976 .syn = prefix##_syn, \ 3021 .syn = prefix##_syn, \
2977 .syn_length = ARRAY_SIZE(prefix##_syn), \ 3022 .syn_length = ARRAY_SIZE(prefix##_syn), \
@@ -9011,6 +9056,207 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev8[] =
9011 }, 9056 },
9012}; 9057};
9013 9058
9059static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_radio_rev11[] = {
9060 {
9061 .freq = 5180,
9062 RADIOREGS3(0xb6, 0x01, 0x01, 0x02, 0x06, 0x05, 0x05, 0x02,
9063 0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00,
9064 0xff, 0xf9, 0x00, 0x06, 0x00, 0x77, 0x00, 0x0e,
9065 0x00, 0x6f, 0x00, 0xf9, 0x00, 0x06, 0x00, 0x77,
9066 0x00, 0x0e, 0x00, 0x6f, 0x00),
9067 PHYREGS(0x081c, 0x0818, 0x0814, 0x01f9, 0x01fa, 0x01fb),
9068 },
9069 {
9070 .freq = 5200,
9071 RADIOREGS3(0xaf, 0x01, 0x01, 0x02, 0x08, 0x05, 0x05, 0x02,
9072 0x0c, 0x01, 0x02, 0x02, 0x02, 0x8f, 0x0f, 0x00,
9073 0xff, 0xf9, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d,
9074 0x00, 0x6f, 0x00, 0xf9, 0x00, 0x05, 0x00, 0x77,
9075 0x00, 0x0d, 0x00, 0x6f, 0x00),
9076 PHYREGS(0x0824, 0x0820, 0x081c, 0x01f7, 0x01f8, 0x01f9),
9077 },
9078 {
9079 .freq = 5220,
9080 RADIOREGS3(0xa7, 0x01, 0x01, 0x02, 0x0a, 0x05, 0x05, 0x02,
9081 0x0c, 0x01, 0x02, 0x02, 0x02, 0x8e, 0x0f, 0x00,
9082 0xfe, 0xd8, 0x00, 0x05, 0x00, 0x77, 0x00, 0x0d,
9083 0x00, 0x6f, 0x00, 0xd8, 0x00, 0x05, 0x00, 0x77,
9084 0x00, 0x0d, 0x00, 0x6f, 0x00),
9085 PHYREGS(0x082c, 0x0828, 0x0824, 0x01f5, 0x01f6, 0x01f7),
9086 },
9087 {
9088 .freq = 5745,
9089 RADIOREGS3(0xfe, 0x00, 0x02, 0x04, 0x7d, 0x05, 0x05, 0x02,
9090 0x15, 0x01, 0x05, 0x05, 0x05, 0x87, 0x05, 0x00,
9091 0x20, 0x30, 0x00, 0x00, 0x00, 0x77, 0x00, 0x06,
9092 0x00, 0x6d, 0x00, 0x30, 0x00, 0x00, 0x00, 0x77,
9093 0x00, 0x06, 0x00, 0x6d, 0x00),
9094 PHYREGS(0x08fe, 0x08fa, 0x08f6, 0x01c8, 0x01c8, 0x01c9),
9095 },
9096 {
9097 .freq = 5765,
9098 RADIOREGS3(0xf8, 0x00, 0x02, 0x04, 0x81, 0x05, 0x05, 0x02,
9099 0x15, 0x01, 0x05, 0x05, 0x05, 0x86, 0x05, 0x00,
9100 0x10, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05,
9101 0x00, 0x6c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77,
9102 0x00, 0x05, 0x00, 0x6c, 0x00),
9103 PHYREGS(0x0906, 0x0902, 0x08fe, 0x01c6, 0x01c7, 0x01c8),
9104 },
9105 {
9106 .freq = 5785,
9107 RADIOREGS3(0xf2, 0x00, 0x02, 0x04, 0x85, 0x05, 0x05, 0x02,
9108 0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00,
9109 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05,
9110 0x00, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77,
9111 0x00, 0x05, 0x00, 0x6b, 0x00),
9112 PHYREGS(0x090e, 0x090a, 0x0906, 0x01c4, 0x01c5, 0x01c6),
9113 },
9114 {
9115 .freq = 5805,
9116 RADIOREGS3(0xed, 0x00, 0x02, 0x04, 0x89, 0x05, 0x05, 0x02,
9117 0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00,
9118 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05,
9119 0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77,
9120 0x00, 0x05, 0x00, 0x6a, 0x00),
9121 PHYREGS(0x0916, 0x0912, 0x090e, 0x01c3, 0x01c4, 0x01c4),
9122 },
9123 {
9124 .freq = 5825,
9125 RADIOREGS3(0xed, 0x00, 0x02, 0x04, 0x8d, 0x05, 0x05, 0x02,
9126 0x15, 0x01, 0x06, 0x06, 0x06, 0x86, 0x04, 0x00,
9127 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x05,
9128 0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77,
9129 0x00, 0x05, 0x00, 0x69, 0x00),
9130 PHYREGS(0x091e, 0x091a, 0x0916, 0x01c1, 0x01c2, 0x01c3),
9131 },
9132 {
9133 .freq = 2412,
9134 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x6c, 0x06, 0x06, 0x04,
9135 0x2b, 0x01, 0x04, 0x04, 0x04, 0x8f, 0x30, 0x00,
9136 0x00, 0x00, 0x78, 0x00, 0x03, 0x00, 0x70, 0x00,
9137 0x0b, 0x00, 0x0a, 0x00, 0x89, 0x00, 0x03, 0x00,
9138 0x70, 0x00, 0x0b, 0x00, 0x0a),
9139 PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
9140 },
9141 {
9142 .freq = 2417,
9143 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x71, 0x06, 0x06, 0x04,
9144 0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00,
9145 0x00, 0x00, 0x78, 0x00, 0x03, 0x00, 0x70, 0x00,
9146 0x0b, 0x00, 0x0a, 0x00, 0x89, 0x00, 0x03, 0x00,
9147 0x70, 0x00, 0x0b, 0x00, 0x0a),
9148 PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
9149 },
9150 {
9151 .freq = 2422,
9152 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x76, 0x06, 0x06, 0x04,
9153 0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00,
9154 0x00, 0x00, 0x67, 0x00, 0x03, 0x00, 0x70, 0x00,
9155 0x0b, 0x00, 0x0a, 0x00, 0x89, 0x00, 0x03, 0x00,
9156 0x70, 0x00, 0x0b, 0x00, 0x0a),
9157 PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
9158 },
9159 {
9160 .freq = 2427,
9161 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x7b, 0x06, 0x06, 0x04,
9162 0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00,
9163 0x00, 0x00, 0x57, 0x00, 0x03, 0x00, 0x70, 0x00,
9164 0x0a, 0x00, 0x0a, 0x00, 0x78, 0x00, 0x03, 0x00,
9165 0x70, 0x00, 0x0a, 0x00, 0x0a),
9166 PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
9167 },
9168 {
9169 .freq = 2432,
9170 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x80, 0x06, 0x06, 0x04,
9171 0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00,
9172 0x00, 0x00, 0x56, 0x00, 0x03, 0x00, 0x70, 0x00,
9173 0x0a, 0x00, 0x0a, 0x00, 0x77, 0x00, 0x03, 0x00,
9174 0x70, 0x00, 0x0a, 0x00, 0x0a),
9175 PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
9176 },
9177 {
9178 .freq = 2437,
9179 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x85, 0x06, 0x06, 0x04,
9180 0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00,
9181 0x00, 0x00, 0x46, 0x00, 0x03, 0x00, 0x70, 0x00,
9182 0x0a, 0x00, 0x0a, 0x00, 0x76, 0x00, 0x03, 0x00,
9183 0x70, 0x00, 0x0a, 0x00, 0x0a),
9184 PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
9185 },
9186 {
9187 .freq = 2442,
9188 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x8a, 0x06, 0x06, 0x04,
9189 0x2b, 0x01, 0x05, 0x05, 0x05, 0x8f, 0x30, 0x00,
9190 0x00, 0x00, 0x45, 0x00, 0x02, 0x00, 0x70, 0x00,
9191 0x0a, 0x00, 0x0a, 0x00, 0x66, 0x00, 0x02, 0x00,
9192 0x70, 0x00, 0x0a, 0x00, 0x0a),
9193 PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
9194 },
9195 {
9196 .freq = 2447,
9197 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x8f, 0x06, 0x06, 0x04,
9198 0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00,
9199 0x00, 0x00, 0x34, 0x00, 0x02, 0x00, 0x70, 0x00,
9200 0x0a, 0x00, 0x09, 0x00, 0x55, 0x00, 0x02, 0x00,
9201 0x70, 0x00, 0x0a, 0x00, 0x09),
9202 PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
9203 },
9204 {
9205 .freq = 2452,
9206 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x94, 0x06, 0x06, 0x04,
9207 0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00,
9208 0x00, 0x00, 0x23, 0x00, 0x02, 0x00, 0x70, 0x00,
9209 0x0a, 0x00, 0x09, 0x00, 0x45, 0x00, 0x02, 0x00,
9210 0x70, 0x00, 0x0a, 0x00, 0x09),
9211 PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
9212 },
9213 {
9214 .freq = 2457,
9215 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x99, 0x06, 0x06, 0x04,
9216 0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00,
9217 0x00, 0x00, 0x12, 0x00, 0x02, 0x00, 0x70, 0x00,
9218 0x0a, 0x00, 0x09, 0x00, 0x34, 0x00, 0x02, 0x00,
9219 0x70, 0x00, 0x0a, 0x00, 0x09),
9220 PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
9221 },
9222 {
9223 .freq = 2462,
9224 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0x9e, 0x06, 0x06, 0x04,
9225 0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00,
9226 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x70, 0x00,
9227 0x09, 0x00, 0x09, 0x00, 0x33, 0x00, 0x02, 0x00,
9228 0x70, 0x00, 0x09, 0x00, 0x09),
9229 PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
9230 },
9231 {
9232 .freq = 2467,
9233 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0xa3, 0x06, 0x06, 0x04,
9234 0x2b, 0x01, 0x06, 0x06, 0x06, 0x8f, 0x30, 0x00,
9235 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x70, 0x00,
9236 0x09, 0x00, 0x09, 0x00, 0x22, 0x00, 0x02, 0x00,
9237 0x70, 0x00, 0x09, 0x00, 0x09),
9238 PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b),
9239 },
9240 {
9241 .freq = 2472,
9242 RADIOREGS3(0x00, 0x01, 0x03, 0x09, 0xa8, 0x06, 0x06, 0x04,
9243 0x2b, 0x01, 0x07, 0x07, 0x07, 0x8f, 0x30, 0x00,
9244 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x70, 0x00,
9245 0x09, 0x00, 0x09, 0x00, 0x11, 0x00, 0x02, 0x00,
9246 0x70, 0x00, 0x09, 0x00, 0x09),
9247 PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
9248 },
9249 {
9250 .freq = 2484,
9251 RADIOREGS3(0xff, 0x01, 0x03, 0x09, 0xb4, 0x06, 0x06, 0x04,
9252 0x2b, 0x01, 0x07, 0x07, 0x07, 0x8f, 0x20, 0x00,
9253 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x70, 0x00,
9254 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00,
9255 0x70, 0x00, 0x09, 0x00, 0x09),
9256 PHYREGS(0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424),
9257 },
9258};
9259
9014static void b2056_upload_inittab(struct b43_wldev *dev, bool ghz5, 9260static void b2056_upload_inittab(struct b43_wldev *dev, bool ghz5,
9015 bool ignore_uploadflag, u16 routing, 9261 bool ignore_uploadflag, u16 routing,
9016 const struct b2056_inittab_entry *e, 9262 const struct b2056_inittab_entry *e,