aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ssb/ssb_regs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ssb/ssb_regs.h')
-rw-r--r--include/linux/ssb/ssb_regs.h83
1 files changed, 74 insertions, 9 deletions
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index 47c7c71a5acf..ebad0bac9801 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -147,6 +147,10 @@
147#define SSB_IDLOW_SSBREV 0xF0000000 /* Sonics Backplane Revision code */ 147#define SSB_IDLOW_SSBREV 0xF0000000 /* Sonics Backplane Revision code */
148#define SSB_IDLOW_SSBREV_22 0x00000000 /* <= 2.2 */ 148#define SSB_IDLOW_SSBREV_22 0x00000000 /* <= 2.2 */
149#define SSB_IDLOW_SSBREV_23 0x10000000 /* 2.3 */ 149#define SSB_IDLOW_SSBREV_23 0x10000000 /* 2.3 */
150#define SSB_IDLOW_SSBREV_24 0x40000000 /* ?? Found in BCM4328 */
151#define SSB_IDLOW_SSBREV_25 0x50000000 /* ?? Not Found yet */
152#define SSB_IDLOW_SSBREV_26 0x60000000 /* ?? Found in some BCM4311/2 */
153#define SSB_IDLOW_SSBREV_27 0x70000000 /* ?? Found in some BCM4311/2 */
150#define SSB_IDHIGH 0x0FFC /* SB Identification High */ 154#define SSB_IDHIGH 0x0FFC /* SB Identification High */
151#define SSB_IDHIGH_RCLO 0x0000000F /* Revision Code (low part) */ 155#define SSB_IDHIGH_RCLO 0x0000000F /* Revision Code (low part) */
152#define SSB_IDHIGH_CC 0x00008FF0 /* Core Code */ 156#define SSB_IDHIGH_CC 0x00008FF0 /* Core Code */
@@ -162,11 +166,16 @@
162 */ 166 */
163#define SSB_SPROMSIZE_WORDS 64 167#define SSB_SPROMSIZE_WORDS 64
164#define SSB_SPROMSIZE_BYTES (SSB_SPROMSIZE_WORDS * sizeof(u16)) 168#define SSB_SPROMSIZE_BYTES (SSB_SPROMSIZE_WORDS * sizeof(u16))
169#define SSB_SPROMSIZE_WORDS_R123 64
170#define SSB_SPROMSIZE_WORDS_R4 220
171#define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16))
172#define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16))
165#define SSB_SPROM_BASE 0x1000 173#define SSB_SPROM_BASE 0x1000
166#define SSB_SPROM_REVISION 0x107E 174#define SSB_SPROM_REVISION 0x107E
167#define SSB_SPROM_REVISION_REV 0x00FF /* SPROM Revision number */ 175#define SSB_SPROM_REVISION_REV 0x00FF /* SPROM Revision number */
168#define SSB_SPROM_REVISION_CRC 0xFF00 /* SPROM CRC8 value */ 176#define SSB_SPROM_REVISION_CRC 0xFF00 /* SPROM CRC8 value */
169#define SSB_SPROM_REVISION_CRC_SHIFT 8 177#define SSB_SPROM_REVISION_CRC_SHIFT 8
178
170/* SPROM Revision 1 */ 179/* SPROM Revision 1 */
171#define SSB_SPROM1_SPID 0x1004 /* Subsystem Product ID for PCI */ 180#define SSB_SPROM1_SPID 0x1004 /* Subsystem Product ID for PCI */
172#define SSB_SPROM1_SVID 0x1006 /* Subsystem Vendor ID for PCI */ 181#define SSB_SPROM1_SVID 0x1006 /* Subsystem Vendor ID for PCI */
@@ -184,10 +193,10 @@
184#define SSB_SPROM1_BINF_BREV 0x00FF /* Board Revision */ 193#define SSB_SPROM1_BINF_BREV 0x00FF /* Board Revision */
185#define SSB_SPROM1_BINF_CCODE 0x0F00 /* Country Code */ 194#define SSB_SPROM1_BINF_CCODE 0x0F00 /* Country Code */
186#define SSB_SPROM1_BINF_CCODE_SHIFT 8 195#define SSB_SPROM1_BINF_CCODE_SHIFT 8
187#define SSB_SPROM1_BINF_ANTA 0x3000 /* Available A-PHY antennas */ 196#define SSB_SPROM1_BINF_ANTBG 0x3000 /* Available B-PHY and G-PHY antennas */
188#define SSB_SPROM1_BINF_ANTA_SHIFT 12 197#define SSB_SPROM1_BINF_ANTBG_SHIFT 12
189#define SSB_SPROM1_BINF_ANTBG 0xC000 /* Available B-PHY antennas */ 198#define SSB_SPROM1_BINF_ANTA 0xC000 /* Available A-PHY antennas */
190#define SSB_SPROM1_BINF_ANTBG_SHIFT 14 199#define SSB_SPROM1_BINF_ANTA_SHIFT 14
191#define SSB_SPROM1_PA0B0 0x105E 200#define SSB_SPROM1_PA0B0 0x105E
192#define SSB_SPROM1_PA0B1 0x1060 201#define SSB_SPROM1_PA0B1 0x1060
193#define SSB_SPROM1_PA0B2 0x1062 202#define SSB_SPROM1_PA0B2 0x1062
@@ -212,10 +221,11 @@
212#define SSB_SPROM1_ITSSI_A_SHIFT 8 221#define SSB_SPROM1_ITSSI_A_SHIFT 8
213#define SSB_SPROM1_BFLLO 0x1072 /* Boardflags (low 16 bits) */ 222#define SSB_SPROM1_BFLLO 0x1072 /* Boardflags (low 16 bits) */
214#define SSB_SPROM1_AGAIN 0x1074 /* Antenna Gain (in dBm Q5.2) */ 223#define SSB_SPROM1_AGAIN 0x1074 /* Antenna Gain (in dBm Q5.2) */
215#define SSB_SPROM1_AGAIN_A 0x00FF /* A-PHY */ 224#define SSB_SPROM1_AGAIN_BG 0x00FF /* B-PHY and G-PHY */
216#define SSB_SPROM1_AGAIN_BG 0xFF00 /* B-PHY and G-PHY */ 225#define SSB_SPROM1_AGAIN_BG_SHIFT 0
217#define SSB_SPROM1_AGAIN_BG_SHIFT 8 226#define SSB_SPROM1_AGAIN_A 0xFF00 /* A-PHY */
218#define SSB_SPROM1_OEM 0x1076 /* 8 bytes OEM string (rev 1 only) */ 227#define SSB_SPROM1_AGAIN_A_SHIFT 8
228
219/* SPROM Revision 2 (inherits from rev 1) */ 229/* SPROM Revision 2 (inherits from rev 1) */
220#define SSB_SPROM2_BFLHI 0x1038 /* Boardflags (high 16 bits) */ 230#define SSB_SPROM2_BFLHI 0x1038 /* Boardflags (high 16 bits) */
221#define SSB_SPROM2_MAXP_A 0x103A /* A-PHY Max Power */ 231#define SSB_SPROM2_MAXP_A 0x103A /* A-PHY Max Power */
@@ -232,7 +242,11 @@
232#define SSB_SPROM2_OPO_VALUE 0x00FF 242#define SSB_SPROM2_OPO_VALUE 0x00FF
233#define SSB_SPROM2_OPO_UNUSED 0xFF00 243#define SSB_SPROM2_OPO_UNUSED 0xFF00
234#define SSB_SPROM2_CCODE 0x107C /* Two char Country Code */ 244#define SSB_SPROM2_CCODE 0x107C /* Two char Country Code */
235/* SPROM Revision 3 (inherits from rev 2) */ 245
246/* SPROM Revision 3 (inherits most data from rev 2) */
247#define SSB_SPROM3_IL0MAC 0x104A /* 6 bytes MAC address for 802.11b/g */
248#define SSB_SPROM3_ET0MAC 0x1050 /* 6 bytes MAC address for Ethernet ?? */
249#define SSB_SPROM3_ET1MAC 0x1050 /* 6 bytes MAC address for 802.11a ?? */
236#define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */ 250#define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */
237#define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */ 251#define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */
238#define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */ 252#define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */
@@ -251,6 +265,57 @@
251#define SSB_SPROM3_CCKPO_11M_SHIFT 12 265#define SSB_SPROM3_CCKPO_11M_SHIFT 12
252#define SSB_SPROM3_OFDMGPO 0x107A /* G-PHY OFDM Power Offset (4 bytes, BigEndian) */ 266#define SSB_SPROM3_OFDMGPO 0x107A /* G-PHY OFDM Power Offset (4 bytes, BigEndian) */
253 267
268/* SPROM Revision 4 */
269#define SSB_SPROM4_IL0MAC 0x104C /* 6 byte MAC address for a/b/g/n */
270#define SSB_SPROM4_ET0MAC 0x1018 /* 6 bytes MAC address for Ethernet ?? */
271#define SSB_SPROM4_ET1MAC 0x1018 /* 6 bytes MAC address for 802.11a ?? */
272#define SSB_SPROM4_ETHPHY 0x105A /* Ethernet PHY settings ?? */
273#define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */
274#define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */
275#define SSB_SPROM4_ETHPHY_ET1A_SHIFT 5
276#define SSB_SPROM4_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */
277#define SSB_SPROM4_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */
278#define SSB_SPROM4_CCODE 0x1052 /* Country Code (2 bytes) */
279#define SSB_SPROM4_ANTAVAIL 0x105D /* Antenna available bitfields */
280#define SSB_SPROM4_ANTAVAIL_A 0x00FF /* A-PHY bitfield */
281#define SSB_SPROM4_ANTAVAIL_A_SHIFT 0
282#define SSB_SPROM4_ANTAVAIL_BG 0xFF00 /* B-PHY and G-PHY bitfield */
283#define SSB_SPROM4_ANTAVAIL_BG_SHIFT 8
284#define SSB_SPROM4_BFLLO 0x1044 /* Boardflags (low 16 bits) */
285#define SSB_SPROM4_AGAIN01 0x105E /* Antenna Gain (in dBm Q5.2) */
286#define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */
287#define SSB_SPROM4_AGAIN0_SHIFT 0
288#define SSB_SPROM4_AGAIN1 0xFF00 /* Antenna 1 */
289#define SSB_SPROM4_AGAIN1_SHIFT 8
290#define SSB_SPROM4_AGAIN23 0x1060
291#define SSB_SPROM4_AGAIN2 0x00FF /* Antenna 2 */
292#define SSB_SPROM4_AGAIN2_SHIFT 0
293#define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */
294#define SSB_SPROM4_AGAIN3_SHIFT 8
295#define SSB_SPROM4_BFLHI 0x1046 /* Board Flags Hi */
296#define SSB_SPROM4_MAXP_BG 0x1080 /* Max Power BG in path 1 */
297#define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */
298#define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */
299#define SSB_SPROM4_ITSSI_BG_SHIFT 8
300#define SSB_SPROM4_MAXP_A 0x108A /* Max Power A in path 1 */
301#define SSB_SPROM4_MAXP_A_MASK 0x00FF /* Mask for Max Power A */
302#define SSB_SPROM4_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */
303#define SSB_SPROM4_ITSSI_A_SHIFT 8
304#define SSB_SPROM4_GPIOA 0x1056 /* Gen. Purpose IO # 0 and 1 */
305#define SSB_SPROM4_GPIOA_P0 0x00FF /* Pin 0 */
306#define SSB_SPROM4_GPIOA_P1 0xFF00 /* Pin 1 */
307#define SSB_SPROM4_GPIOA_P1_SHIFT 8
308#define SSB_SPROM4_GPIOB 0x1058 /* Gen. Purpose IO # 2 and 3 */
309#define SSB_SPROM4_GPIOB_P2 0x00FF /* Pin 2 */
310#define SSB_SPROM4_GPIOB_P3 0xFF00 /* Pin 3 */
311#define SSB_SPROM4_GPIOB_P3_SHIFT 8
312#define SSB_SPROM4_PA0B0 0x1082 /* The paXbY locations are */
313#define SSB_SPROM4_PA0B1 0x1084 /* only guesses */
314#define SSB_SPROM4_PA0B2 0x1086
315#define SSB_SPROM4_PA1B0 0x108E
316#define SSB_SPROM4_PA1B1 0x1090
317#define SSB_SPROM4_PA1B2 0x1092
318
254/* Values for SSB_SPROM1_BINF_CCODE */ 319/* Values for SSB_SPROM1_BINF_CCODE */
255enum { 320enum {
256 SSB_SPROM1CCODE_WORLD = 0, 321 SSB_SPROM1CCODE_WORLD = 0,