aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2008-04-04 00:44:44 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-04 00:44:44 -0400
commitb2a5c19ca0315723cecb9489ff8b67c4f17367b4 (patch)
treee218cd12701ef2a180e283b99697a277ab0f70c0
parent61407f80f72970d52d4339f81c6c3cd03f4ca0f0 (diff)
[TG3]: Add PHY workaround for 5784
The 5784 B step and newer chips require the PHY DSPs to be fine-tuned based on one-time programmable values stored in the chip. This is essential to achieve optimal PHY operations especially when using long cables. We also need to properly handle the 10Mbit RX bit in the CPMU_CTRL register during PHY reset. Update version to 3.89. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/tg3.c154
-rw-r--r--drivers/net/tg3.h79
2 files changed, 219 insertions, 14 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index f9ef8bd8b11e..d4655b2d1f3f 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
64 64
65#define DRV_MODULE_NAME "tg3" 65#define DRV_MODULE_NAME "tg3"
66#define PFX DRV_MODULE_NAME ": " 66#define PFX DRV_MODULE_NAME ": "
67#define DRV_MODULE_VERSION "3.88" 67#define DRV_MODULE_VERSION "3.89"
68#define DRV_MODULE_RELDATE "March 20, 2008" 68#define DRV_MODULE_RELDATE "April 03, 2008"
69 69
70#define TG3_DEF_MAC_MODE 0 70#define TG3_DEF_MAC_MODE 0
71#define TG3_DEF_RX_MODE 0 71#define TG3_DEF_RX_MODE 0
@@ -804,6 +804,12 @@ static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
804 return ret; 804 return ret;
805} 805}
806 806
807static void tg3_phydsp_write(struct tg3 *tp, u32 reg, u32 val)
808{
809 tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg);
810 tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val);
811}
812
807static void tg3_phy_toggle_automdix(struct tg3 *tp, int enable) 813static void tg3_phy_toggle_automdix(struct tg3 *tp, int enable)
808{ 814{
809 u32 phy; 815 u32 phy;
@@ -886,6 +892,49 @@ static int tg3_bmcr_reset(struct tg3 *tp)
886 return 0; 892 return 0;
887} 893}
888 894
895static void tg3_phy_apply_otp(struct tg3 *tp)
896{
897 u32 otp, phy;
898
899 if (!tp->phy_otp)
900 return;
901
902 otp = tp->phy_otp;
903
904 /* Enable SM_DSP clock and tx 6dB coding. */
905 phy = MII_TG3_AUXCTL_SHDWSEL_AUXCTL |
906 MII_TG3_AUXCTL_ACTL_SMDSP_ENA |
907 MII_TG3_AUXCTL_ACTL_TX_6DB;
908 tg3_writephy(tp, MII_TG3_AUX_CTRL, phy);
909
910 phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT);
911 phy |= MII_TG3_DSP_TAP1_AGCTGT_DFLT;
912 tg3_phydsp_write(tp, MII_TG3_DSP_TAP1, phy);
913
914 phy = ((otp & TG3_OTP_HPFFLTR_MASK) >> TG3_OTP_HPFFLTR_SHIFT) |
915 ((otp & TG3_OTP_HPFOVER_MASK) >> TG3_OTP_HPFOVER_SHIFT);
916 tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH0, phy);
917
918 phy = ((otp & TG3_OTP_LPFDIS_MASK) >> TG3_OTP_LPFDIS_SHIFT);
919 phy |= MII_TG3_DSP_AADJ1CH3_ADCCKADJ;
920 tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH3, phy);
921
922 phy = ((otp & TG3_OTP_VDAC_MASK) >> TG3_OTP_VDAC_SHIFT);
923 tg3_phydsp_write(tp, MII_TG3_DSP_EXP75, phy);
924
925 phy = ((otp & TG3_OTP_10BTAMP_MASK) >> TG3_OTP_10BTAMP_SHIFT);
926 tg3_phydsp_write(tp, MII_TG3_DSP_EXP96, phy);
927
928 phy = ((otp & TG3_OTP_ROFF_MASK) >> TG3_OTP_ROFF_SHIFT) |
929 ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT);
930 tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy);
931
932 /* Turn off SM_DSP clock. */
933 phy = MII_TG3_AUXCTL_SHDWSEL_AUXCTL |
934 MII_TG3_AUXCTL_ACTL_TX_6DB;
935 tg3_writephy(tp, MII_TG3_AUX_CTRL, phy);
936}
937
889static int tg3_wait_macro_done(struct tg3 *tp) 938static int tg3_wait_macro_done(struct tg3 *tp)
890{ 939{
891 int limit = 100; 940 int limit = 100;
@@ -1073,6 +1122,7 @@ static void tg3_link_report(struct tg3 *);
1073 */ 1122 */
1074static int tg3_phy_reset(struct tg3 *tp) 1123static int tg3_phy_reset(struct tg3 *tp)
1075{ 1124{
1125 u32 cpmuctrl;
1076 u32 phy_status; 1126 u32 phy_status;
1077 int err; 1127 int err;
1078 1128
@@ -1102,10 +1152,28 @@ static int tg3_phy_reset(struct tg3 *tp)
1102 goto out; 1152 goto out;
1103 } 1153 }
1104 1154
1155 cpmuctrl = 0;
1156 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
1157 GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) {
1158 cpmuctrl = tr32(TG3_CPMU_CTRL);
1159 if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY)
1160 tw32(TG3_CPMU_CTRL,
1161 cpmuctrl & ~CPMU_CTRL_GPHY_10MB_RXONLY);
1162 }
1163
1105 err = tg3_bmcr_reset(tp); 1164 err = tg3_bmcr_reset(tp);
1106 if (err) 1165 if (err)
1107 return err; 1166 return err;
1108 1167
1168 if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY) {
1169 u32 phy;
1170
1171 phy = MII_TG3_DSP_EXP8_AEDW | MII_TG3_DSP_EXP8_REJ2MHz;
1172 tg3_phydsp_write(tp, MII_TG3_DSP_EXP8, phy);
1173
1174 tw32(TG3_CPMU_CTRL, cpmuctrl);
1175 }
1176
1109 if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) { 1177 if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) {
1110 u32 val; 1178 u32 val;
1111 1179
@@ -1124,6 +1192,8 @@ static int tg3_phy_reset(struct tg3 *tp)
1124 MII_TG3_MISC_SHDW_APD_WKTM_84MS); 1192 MII_TG3_MISC_SHDW_APD_WKTM_84MS);
1125 } 1193 }
1126 1194
1195 tg3_phy_apply_otp(tp);
1196
1127out: 1197out:
1128 if (tp->tg3_flags2 & TG3_FLG2_PHY_ADC_BUG) { 1198 if (tp->tg3_flags2 & TG3_FLG2_PHY_ADC_BUG) {
1129 tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); 1199 tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00);
@@ -9464,7 +9534,8 @@ static int tg3_test_loopback(struct tg3 *tp)
9464 if (err) 9534 if (err)
9465 return TG3_LOOPBACK_FAILED; 9535 return TG3_LOOPBACK_FAILED;
9466 9536
9467 if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) { 9537 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
9538 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
9468 int i; 9539 int i;
9469 u32 status; 9540 u32 status;
9470 9541
@@ -9481,17 +9552,23 @@ static int tg3_test_loopback(struct tg3 *tp)
9481 if (status != CPMU_MUTEX_GNT_DRIVER) 9552 if (status != CPMU_MUTEX_GNT_DRIVER)
9482 return TG3_LOOPBACK_FAILED; 9553 return TG3_LOOPBACK_FAILED;
9483 9554
9484 /* Turn off power management based on link speed. */ 9555 /* Turn off link-based power management. */
9485 cpmuctrl = tr32(TG3_CPMU_CTRL); 9556 cpmuctrl = tr32(TG3_CPMU_CTRL);
9486 tw32(TG3_CPMU_CTRL, 9557 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
9487 cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE | 9558 GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5761_AX)
9488 CPMU_CTRL_LINK_AWARE_MODE)); 9559 tw32(TG3_CPMU_CTRL,
9560 cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE |
9561 CPMU_CTRL_LINK_AWARE_MODE));
9562 else
9563 tw32(TG3_CPMU_CTRL,
9564 cpmuctrl & ~CPMU_CTRL_LINK_AWARE_MODE);
9489 } 9565 }
9490 9566
9491 if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) 9567 if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK))
9492 err |= TG3_MAC_LOOPBACK_FAILED; 9568 err |= TG3_MAC_LOOPBACK_FAILED;
9493 9569
9494 if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) { 9570 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
9571 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
9495 tw32(TG3_CPMU_CTRL, cpmuctrl); 9572 tw32(TG3_CPMU_CTRL, cpmuctrl);
9496 9573
9497 /* Release the mutex */ 9574 /* Release the mutex */
@@ -10724,9 +10801,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
10724 tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL) 10801 tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)
10725 tp->led_ctrl = LED_CTRL_MODE_PHY_2; 10802 tp->led_ctrl = LED_CTRL_MODE_PHY_2;
10726 10803
10727 if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || 10804 if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5784_AX)
10728 tp->pci_chip_rev_id == CHIPREV_ID_5784_A1) 10805 tp->led_ctrl = LED_CTRL_MODE_PHY_1;
10729 tp->led_ctrl = LED_CTRL_MODE_MAC;
10730 10806
10731 if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) { 10807 if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) {
10732 tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; 10808 tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT;
@@ -10773,6 +10849,55 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
10773 } 10849 }
10774} 10850}
10775 10851
10852static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd)
10853{
10854 int i;
10855 u32 val;
10856
10857 tw32(OTP_CTRL, cmd | OTP_CTRL_OTP_CMD_START);
10858 tw32(OTP_CTRL, cmd);
10859
10860 /* Wait for up to 1 ms for command to execute. */
10861 for (i = 0; i < 100; i++) {
10862 val = tr32(OTP_STATUS);
10863 if (val & OTP_STATUS_CMD_DONE)
10864 break;
10865 udelay(10);
10866 }
10867
10868 return (val & OTP_STATUS_CMD_DONE) ? 0 : -EBUSY;
10869}
10870
10871/* Read the gphy configuration from the OTP region of the chip. The gphy
10872 * configuration is a 32-bit value that straddles the alignment boundary.
10873 * We do two 32-bit reads and then shift and merge the results.
10874 */
10875static u32 __devinit tg3_read_otp_phycfg(struct tg3 *tp)
10876{
10877 u32 bhalf_otp, thalf_otp;
10878
10879 tw32(OTP_MODE, OTP_MODE_OTP_THRU_GRC);
10880
10881 if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_INIT))
10882 return 0;
10883
10884 tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC1);
10885
10886 if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ))
10887 return 0;
10888
10889 thalf_otp = tr32(OTP_READ_DATA);
10890
10891 tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC2);
10892
10893 if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ))
10894 return 0;
10895
10896 bhalf_otp = tr32(OTP_READ_DATA);
10897
10898 return ((thalf_otp & 0x0000ffff) << 16) | (bhalf_otp >> 16);
10899}
10900
10776static int __devinit tg3_phy_probe(struct tg3 *tp) 10901static int __devinit tg3_phy_probe(struct tg3 *tp)
10777{ 10902{
10778 u32 hw_phy_id_1, hw_phy_id_2; 10903 u32 hw_phy_id_1, hw_phy_id_2;
@@ -11586,6 +11711,13 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
11586 tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; 11711 tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG;
11587 } 11712 }
11588 11713
11714 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
11715 GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) {
11716 tp->phy_otp = tg3_read_otp_phycfg(tp);
11717 if (tp->phy_otp == 0)
11718 tp->phy_otp = TG3_OTP_DEFAULT;
11719 }
11720
11589 tp->coalesce_mode = 0; 11721 tp->coalesce_mode = 0;
11590 if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX && 11722 if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX &&
11591 GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_BX) 11723 GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_BX)
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 3938eb35ce8c..c1075a73d66c 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -138,6 +138,8 @@
138#define CHIPREV_5704_BX 0x21 138#define CHIPREV_5704_BX 0x21
139#define CHIPREV_5750_AX 0x40 139#define CHIPREV_5750_AX 0x40
140#define CHIPREV_5750_BX 0x41 140#define CHIPREV_5750_BX 0x41
141#define CHIPREV_5784_AX 0x57840
142#define CHIPREV_5761_AX 0x57610
141#define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff) 143#define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff)
142#define METAL_REV_A0 0x00 144#define METAL_REV_A0 0x00
143#define METAL_REV_A1 0x01 145#define METAL_REV_A1 0x01
@@ -866,6 +868,7 @@
866#define CPMU_CTRL_LINK_IDLE_MODE 0x00000200 868#define CPMU_CTRL_LINK_IDLE_MODE 0x00000200
867#define CPMU_CTRL_LINK_AWARE_MODE 0x00000400 869#define CPMU_CTRL_LINK_AWARE_MODE 0x00000400
868#define CPMU_CTRL_LINK_SPEED_MODE 0x00004000 870#define CPMU_CTRL_LINK_SPEED_MODE 0x00004000
871#define CPMU_CTRL_GPHY_10MB_RXONLY 0x00010000
869#define TG3_CPMU_LSPD_10MB_CLK 0x00003604 872#define TG3_CPMU_LSPD_10MB_CLK 0x00003604
870#define CPMU_LSPD_10MB_MACCLK_MASK 0x001f0000 873#define CPMU_LSPD_10MB_MACCLK_MASK 0x001f0000
871#define CPMU_LSPD_10MB_MACCLK_6_25 0x00130000 874#define CPMU_LSPD_10MB_MACCLK_6_25 0x00130000
@@ -1559,7 +1562,24 @@
1559/* 0x702c unused */ 1562/* 0x702c unused */
1560 1563
1561#define NVRAM_ADDR_LOCKOUT 0x00007030 1564#define NVRAM_ADDR_LOCKOUT 0x00007030
1562/* 0x7034 --> 0x7c00 unused */ 1565/* 0x7034 --> 0x7500 unused */
1566
1567#define OTP_MODE 0x00007500
1568#define OTP_MODE_OTP_THRU_GRC 0x00000001
1569#define OTP_CTRL 0x00007504
1570#define OTP_CTRL_OTP_PROG_ENABLE 0x00200000
1571#define OTP_CTRL_OTP_CMD_READ 0x00000000
1572#define OTP_CTRL_OTP_CMD_INIT 0x00000008
1573#define OTP_CTRL_OTP_CMD_START 0x00000001
1574#define OTP_STATUS 0x00007508
1575#define OTP_STATUS_CMD_DONE 0x00000001
1576#define OTP_ADDRESS 0x0000750c
1577#define OTP_ADDRESS_MAGIC1 0x000000a0
1578#define OTP_ADDRESS_MAGIC2 0x00000080
1579/* 0x7510 unused */
1580
1581#define OTP_READ_DATA 0x00007514
1582/* 0x7518 --> 0x7c04 unused */
1563 1583
1564#define PCIE_TRANSACTION_CFG 0x00007c04 1584#define PCIE_TRANSACTION_CFG 0x00007c04
1565#define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000 1585#define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000
@@ -1568,6 +1588,28 @@
1568#define PCIE_PWR_MGMT_THRESH 0x00007d28 1588#define PCIE_PWR_MGMT_THRESH 0x00007d28
1569#define PCIE_PWR_MGMT_L1_THRESH_MSK 0x0000ff00 1589#define PCIE_PWR_MGMT_L1_THRESH_MSK 0x0000ff00
1570 1590
1591
1592/* OTP bit definitions */
1593#define TG3_OTP_AGCTGT_MASK 0x000000e0
1594#define TG3_OTP_AGCTGT_SHIFT 1
1595#define TG3_OTP_HPFFLTR_MASK 0x00000300
1596#define TG3_OTP_HPFFLTR_SHIFT 1
1597#define TG3_OTP_HPFOVER_MASK 0x00000400
1598#define TG3_OTP_HPFOVER_SHIFT 1
1599#define TG3_OTP_LPFDIS_MASK 0x00000800
1600#define TG3_OTP_LPFDIS_SHIFT 11
1601#define TG3_OTP_VDAC_MASK 0xff000000
1602#define TG3_OTP_VDAC_SHIFT 24
1603#define TG3_OTP_10BTAMP_MASK 0x0000f000
1604#define TG3_OTP_10BTAMP_SHIFT 8
1605#define TG3_OTP_ROFF_MASK 0x00e00000
1606#define TG3_OTP_ROFF_SHIFT 11
1607#define TG3_OTP_RCOFF_MASK 0x001c0000
1608#define TG3_OTP_RCOFF_SHIFT 16
1609
1610#define TG3_OTP_DEFAULT 0x286c1640
1611
1612
1571#define TG3_EEPROM_MAGIC 0x669955aa 1613#define TG3_EEPROM_MAGIC 0x669955aa
1572#define TG3_EEPROM_MAGIC_FW 0xa5000000 1614#define TG3_EEPROM_MAGIC_FW 0xa5000000
1573#define TG3_EEPROM_MAGIC_FW_MSK 0xff000000 1615#define TG3_EEPROM_MAGIC_FW_MSK 0xff000000
@@ -1705,15 +1747,31 @@
1705 1747
1706#define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ 1748#define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */
1707 1749
1708#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */
1709#define MII_TG3_EPHY_PTEST 0x17 /* 5906 PHY register */ 1750#define MII_TG3_EPHY_PTEST 0x17 /* 5906 PHY register */
1751#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */
1752
1753#define MII_TG3_DSP_TAP1 0x0001
1754#define MII_TG3_DSP_TAP1_AGCTGT_DFLT 0x0007
1755#define MII_TG3_DSP_AADJ1CH0 0x001f
1756#define MII_TG3_DSP_AADJ1CH3 0x601f
1757#define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002
1758#define MII_TG3_DSP_EXP8 0x0708
1759#define MII_TG3_DSP_EXP8_REJ2MHz 0x0001
1760#define MII_TG3_DSP_EXP8_AEDW 0x0200
1761#define MII_TG3_DSP_EXP75 0x0f75
1762#define MII_TG3_DSP_EXP96 0x0f96
1763#define MII_TG3_DSP_EXP97 0x0f97
1710 1764
1711#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ 1765#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */
1712 1766
1713#define MII_TG3_AUXCTL_MISC_WREN 0x8000 1767#define MII_TG3_AUXCTL_MISC_WREN 0x8000
1714#define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200 1768#define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200
1715#define MII_TG3_AUXCTL_MISC_RDSEL_MISC 0x7000 1769#define MII_TG3_AUXCTL_MISC_RDSEL_MISC 0x7000
1716#define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007 1770#define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007
1771
1772#define MII_TG3_AUXCTL_ACTL_SMDSP_ENA 0x0800
1773#define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400
1774#define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000
1717 1775
1718#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ 1776#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */
1719#define MII_TG3_AUX_STAT_LPASS 0x0004 1777#define MII_TG3_AUX_STAT_LPASS 0x0004
@@ -1743,6 +1801,20 @@
1743#define MII_TG3_INT_DUPLEXCHG 0x0008 1801#define MII_TG3_INT_DUPLEXCHG 0x0008
1744#define MII_TG3_INT_ANEG_PAGE_RX 0x0400 1802#define MII_TG3_INT_ANEG_PAGE_RX 0x0400
1745 1803
1804#define MII_TG3_MISC_SHDW 0x1c
1805#define MII_TG3_MISC_SHDW_WREN 0x8000
1806#define MII_TG3_MISC_SHDW_SCR5_SEL 0x1400
1807#define MII_TG3_MISC_SHDW_APD_SEL 0x2800
1808
1809#define MII_TG3_MISC_SHDW_SCR5_C125OE 0x0001
1810#define MII_TG3_MISC_SHDW_SCR5_DLLAPD 0x0002
1811#define MII_TG3_MISC_SHDW_SCR5_SDTL 0x0004
1812#define MII_TG3_MISC_SHDW_SCR5_DLPTLM 0x0008
1813#define MII_TG3_MISC_SHDW_SCR5_LPED 0x0010
1814
1815#define MII_TG3_MISC_SHDW_APD_WKTM_84MS 0x0001
1816#define MII_TG3_MISC_SHDW_APD_ENABLE 0x0020
1817
1746#define MII_TG3_EPHY_TEST 0x1f /* 5906 PHY register */ 1818#define MII_TG3_EPHY_TEST 0x1f /* 5906 PHY register */
1747#define MII_TG3_EPHY_SHADOW_EN 0x80 1819#define MII_TG3_EPHY_SHADOW_EN 0x80
1748 1820
@@ -2473,6 +2545,7 @@ struct tg3 {
2473#define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ 2545#define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */
2474 2546
2475 u32 led_ctrl; 2547 u32 led_ctrl;
2548 u32 phy_otp;
2476 u16 pci_cmd; 2549 u16 pci_cmd;
2477 2550
2478 char board_part_number[24]; 2551 char board_part_number[24];