diff options
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 111 |
1 files changed, 109 insertions, 2 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index be252abe8985..599e490cf62c 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -38,6 +38,8 @@ | |||
38 | #define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */ | 38 | #define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */ |
39 | #define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */ | 39 | #define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */ |
40 | #define TG3PCI_DEVICE_TIGON3_4 0x1647 /* BCM5703 */ | 40 | #define TG3PCI_DEVICE_TIGON3_4 0x1647 /* BCM5703 */ |
41 | #define TG3PCI_DEVICE_TIGON3_5761S 0x1688 | ||
42 | #define TG3PCI_DEVICE_TIGON3_5761SE 0x1689 | ||
41 | #define TG3PCI_COMMAND 0x00000004 | 43 | #define TG3PCI_COMMAND 0x00000004 |
42 | #define TG3PCI_STATUS 0x00000006 | 44 | #define TG3PCI_STATUS 0x00000006 |
43 | #define TG3PCI_CCREVID 0x00000008 | 45 | #define TG3PCI_CCREVID 0x00000008 |
@@ -325,6 +327,7 @@ | |||
325 | #define MAC_MODE_TDE_ENABLE 0x00200000 | 327 | #define MAC_MODE_TDE_ENABLE 0x00200000 |
326 | #define MAC_MODE_RDE_ENABLE 0x00400000 | 328 | #define MAC_MODE_RDE_ENABLE 0x00400000 |
327 | #define MAC_MODE_FHDE_ENABLE 0x00800000 | 329 | #define MAC_MODE_FHDE_ENABLE 0x00800000 |
330 | #define MAC_MODE_KEEP_FRAME_IN_WOL 0x01000000 | ||
328 | #define MAC_MODE_APE_RX_EN 0x08000000 | 331 | #define MAC_MODE_APE_RX_EN 0x08000000 |
329 | #define MAC_MODE_APE_TX_EN 0x10000000 | 332 | #define MAC_MODE_APE_TX_EN 0x10000000 |
330 | #define MAC_STATUS 0x00000404 | 333 | #define MAC_STATUS 0x00000404 |
@@ -414,6 +417,7 @@ | |||
414 | #define MI_COM_DATA_MASK 0x0000ffff | 417 | #define MI_COM_DATA_MASK 0x0000ffff |
415 | #define MAC_MI_STAT 0x00000450 | 418 | #define MAC_MI_STAT 0x00000450 |
416 | #define MAC_MI_STAT_LNKSTAT_ATTN_ENAB 0x00000001 | 419 | #define MAC_MI_STAT_LNKSTAT_ATTN_ENAB 0x00000001 |
420 | #define MAC_MI_STAT_10MBPS_MODE 0x00000002 | ||
417 | #define MAC_MI_MODE 0x00000454 | 421 | #define MAC_MI_MODE 0x00000454 |
418 | #define MAC_MI_MODE_CLK_10MHZ 0x00000001 | 422 | #define MAC_MI_MODE_CLK_10MHZ 0x00000001 |
419 | #define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 | 423 | #define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 |
@@ -539,6 +543,100 @@ | |||
539 | #define MAC_PHYCFG1_TXC_DRV 0x20000000 | 543 | #define MAC_PHYCFG1_TXC_DRV 0x20000000 |
540 | #define MAC_PHYCFG2 0x000005a4 | 544 | #define MAC_PHYCFG2 0x000005a4 |
541 | #define MAC_PHYCFG2_INBAND_ENABLE 0x00000001 | 545 | #define MAC_PHYCFG2_INBAND_ENABLE 0x00000001 |
546 | #define MAC_PHYCFG2_EMODE_MASK_MASK 0x000001c0 | ||
547 | #define MAC_PHYCFG2_EMODE_MASK_AC131 0x000000c0 | ||
548 | #define MAC_PHYCFG2_EMODE_MASK_50610 0x00000100 | ||
549 | #define MAC_PHYCFG2_EMODE_MASK_RT8211 0x00000000 | ||
550 | #define MAC_PHYCFG2_EMODE_MASK_RT8201 0x000001c0 | ||
551 | #define MAC_PHYCFG2_EMODE_COMP_MASK 0x00000e00 | ||
552 | #define MAC_PHYCFG2_EMODE_COMP_AC131 0x00000600 | ||
553 | #define MAC_PHYCFG2_EMODE_COMP_50610 0x00000400 | ||
554 | #define MAC_PHYCFG2_EMODE_COMP_RT8211 0x00000800 | ||
555 | #define MAC_PHYCFG2_EMODE_COMP_RT8201 0x00000000 | ||
556 | #define MAC_PHYCFG2_FMODE_MASK_MASK 0x00007000 | ||
557 | #define MAC_PHYCFG2_FMODE_MASK_AC131 0x00006000 | ||
558 | #define MAC_PHYCFG2_FMODE_MASK_50610 0x00004000 | ||
559 | #define MAC_PHYCFG2_FMODE_MASK_RT8211 0x00000000 | ||
560 | #define MAC_PHYCFG2_FMODE_MASK_RT8201 0x00007000 | ||
561 | #define MAC_PHYCFG2_FMODE_COMP_MASK 0x00038000 | ||
562 | #define MAC_PHYCFG2_FMODE_COMP_AC131 0x00030000 | ||
563 | #define MAC_PHYCFG2_FMODE_COMP_50610 0x00008000 | ||
564 | #define MAC_PHYCFG2_FMODE_COMP_RT8211 0x00038000 | ||
565 | #define MAC_PHYCFG2_FMODE_COMP_RT8201 0x00000000 | ||
566 | #define MAC_PHYCFG2_GMODE_MASK_MASK 0x001c0000 | ||
567 | #define MAC_PHYCFG2_GMODE_MASK_AC131 0x001c0000 | ||
568 | #define MAC_PHYCFG2_GMODE_MASK_50610 0x00100000 | ||
569 | #define MAC_PHYCFG2_GMODE_MASK_RT8211 0x00000000 | ||
570 | #define MAC_PHYCFG2_GMODE_MASK_RT8201 0x001c0000 | ||
571 | #define MAC_PHYCFG2_GMODE_COMP_MASK 0x00e00000 | ||
572 | #define MAC_PHYCFG2_GMODE_COMP_AC131 0x00e00000 | ||
573 | #define MAC_PHYCFG2_GMODE_COMP_50610 0x00000000 | ||
574 | #define MAC_PHYCFG2_GMODE_COMP_RT8211 0x00200000 | ||
575 | #define MAC_PHYCFG2_GMODE_COMP_RT8201 0x00000000 | ||
576 | #define MAC_PHYCFG2_ACT_MASK_MASK 0x03000000 | ||
577 | #define MAC_PHYCFG2_ACT_MASK_AC131 0x03000000 | ||
578 | #define MAC_PHYCFG2_ACT_MASK_50610 0x01000000 | ||
579 | #define MAC_PHYCFG2_ACT_MASK_RT8211 0x03000000 | ||
580 | #define MAC_PHYCFG2_ACT_MASK_RT8201 0x01000000 | ||
581 | #define MAC_PHYCFG2_ACT_COMP_MASK 0x0c000000 | ||
582 | #define MAC_PHYCFG2_ACT_COMP_AC131 0x00000000 | ||
583 | #define MAC_PHYCFG2_ACT_COMP_50610 0x00000000 | ||
584 | #define MAC_PHYCFG2_ACT_COMP_RT8211 0x00000000 | ||
585 | #define MAC_PHYCFG2_ACT_COMP_RT8201 0x08000000 | ||
586 | #define MAC_PHYCFG2_QUAL_MASK_MASK 0x30000000 | ||
587 | #define MAC_PHYCFG2_QUAL_MASK_AC131 0x30000000 | ||
588 | #define MAC_PHYCFG2_QUAL_MASK_50610 0x30000000 | ||
589 | #define MAC_PHYCFG2_QUAL_MASK_RT8211 0x30000000 | ||
590 | #define MAC_PHYCFG2_QUAL_MASK_RT8201 0x30000000 | ||
591 | #define MAC_PHYCFG2_QUAL_COMP_MASK 0xc0000000 | ||
592 | #define MAC_PHYCFG2_QUAL_COMP_AC131 0x00000000 | ||
593 | #define MAC_PHYCFG2_QUAL_COMP_50610 0x00000000 | ||
594 | #define MAC_PHYCFG2_QUAL_COMP_RT8211 0x00000000 | ||
595 | #define MAC_PHYCFG2_QUAL_COMP_RT8201 0x00000000 | ||
596 | #define MAC_PHYCFG2_50610_LED_MODES \ | ||
597 | (MAC_PHYCFG2_EMODE_MASK_50610 | \ | ||
598 | MAC_PHYCFG2_EMODE_COMP_50610 | \ | ||
599 | MAC_PHYCFG2_FMODE_MASK_50610 | \ | ||
600 | MAC_PHYCFG2_FMODE_COMP_50610 | \ | ||
601 | MAC_PHYCFG2_GMODE_MASK_50610 | \ | ||
602 | MAC_PHYCFG2_GMODE_COMP_50610 | \ | ||
603 | MAC_PHYCFG2_ACT_MASK_50610 | \ | ||
604 | MAC_PHYCFG2_ACT_COMP_50610 | \ | ||
605 | MAC_PHYCFG2_QUAL_MASK_50610 | \ | ||
606 | MAC_PHYCFG2_QUAL_COMP_50610) | ||
607 | #define MAC_PHYCFG2_AC131_LED_MODES \ | ||
608 | (MAC_PHYCFG2_EMODE_MASK_AC131 | \ | ||
609 | MAC_PHYCFG2_EMODE_COMP_AC131 | \ | ||
610 | MAC_PHYCFG2_FMODE_MASK_AC131 | \ | ||
611 | MAC_PHYCFG2_FMODE_COMP_AC131 | \ | ||
612 | MAC_PHYCFG2_GMODE_MASK_AC131 | \ | ||
613 | MAC_PHYCFG2_GMODE_COMP_AC131 | \ | ||
614 | MAC_PHYCFG2_ACT_MASK_AC131 | \ | ||
615 | MAC_PHYCFG2_ACT_COMP_AC131 | \ | ||
616 | MAC_PHYCFG2_QUAL_MASK_AC131 | \ | ||
617 | MAC_PHYCFG2_QUAL_COMP_AC131) | ||
618 | #define MAC_PHYCFG2_RTL8211C_LED_MODES \ | ||
619 | (MAC_PHYCFG2_EMODE_MASK_RT8211 | \ | ||
620 | MAC_PHYCFG2_EMODE_COMP_RT8211 | \ | ||
621 | MAC_PHYCFG2_FMODE_MASK_RT8211 | \ | ||
622 | MAC_PHYCFG2_FMODE_COMP_RT8211 | \ | ||
623 | MAC_PHYCFG2_GMODE_MASK_RT8211 | \ | ||
624 | MAC_PHYCFG2_GMODE_COMP_RT8211 | \ | ||
625 | MAC_PHYCFG2_ACT_MASK_RT8211 | \ | ||
626 | MAC_PHYCFG2_ACT_COMP_RT8211 | \ | ||
627 | MAC_PHYCFG2_QUAL_MASK_RT8211 | \ | ||
628 | MAC_PHYCFG2_QUAL_COMP_RT8211) | ||
629 | #define MAC_PHYCFG2_RTL8201E_LED_MODES \ | ||
630 | (MAC_PHYCFG2_EMODE_MASK_RT8201 | \ | ||
631 | MAC_PHYCFG2_EMODE_COMP_RT8201 | \ | ||
632 | MAC_PHYCFG2_FMODE_MASK_RT8201 | \ | ||
633 | MAC_PHYCFG2_FMODE_COMP_RT8201 | \ | ||
634 | MAC_PHYCFG2_GMODE_MASK_RT8201 | \ | ||
635 | MAC_PHYCFG2_GMODE_COMP_RT8201 | \ | ||
636 | MAC_PHYCFG2_ACT_MASK_RT8201 | \ | ||
637 | MAC_PHYCFG2_ACT_COMP_RT8201 | \ | ||
638 | MAC_PHYCFG2_QUAL_MASK_RT8201 | \ | ||
639 | MAC_PHYCFG2_QUAL_COMP_RT8201) | ||
542 | #define MAC_EXT_RGMII_MODE 0x000005a8 | 640 | #define MAC_EXT_RGMII_MODE 0x000005a8 |
543 | #define MAC_RGMII_MODE_TX_ENABLE 0x00000001 | 641 | #define MAC_RGMII_MODE_TX_ENABLE 0x00000001 |
544 | #define MAC_RGMII_MODE_TX_LOWPWR 0x00000002 | 642 | #define MAC_RGMII_MODE_TX_LOWPWR 0x00000002 |
@@ -1792,6 +1890,11 @@ | |||
1792 | 1890 | ||
1793 | #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ | 1891 | #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ |
1794 | 1892 | ||
1893 | #define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010 | ||
1894 | #define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE 0x0020 | ||
1895 | #define MII_TG3_AUXCTL_PCTL_VREG_11V 0x0180 | ||
1896 | #define MII_TG3_AUXCTL_SHDWSEL_PWRCTL 0x0002 | ||
1897 | |||
1795 | #define MII_TG3_AUXCTL_MISC_WREN 0x8000 | 1898 | #define MII_TG3_AUXCTL_MISC_WREN 0x8000 |
1796 | #define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200 | 1899 | #define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200 |
1797 | #define MII_TG3_AUXCTL_MISC_RDSEL_MISC 0x7000 | 1900 | #define MII_TG3_AUXCTL_MISC_RDSEL_MISC 0x7000 |
@@ -2507,7 +2610,6 @@ struct tg3 { | |||
2507 | u32 tg3_flags3; | 2610 | u32 tg3_flags3; |
2508 | #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 | 2611 | #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 |
2509 | #define TG3_FLG3_ENABLE_APE 0x00000002 | 2612 | #define TG3_FLG3_ENABLE_APE 0x00000002 |
2510 | #define TG3_FLG3_5761_5784_AX_FIXES 0x00000004 | ||
2511 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 | 2613 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 |
2512 | #define TG3_FLG3_USE_PHYLIB 0x00000010 | 2614 | #define TG3_FLG3_USE_PHYLIB 0x00000010 |
2513 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 | 2615 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 |
@@ -2588,7 +2690,12 @@ struct tg3 { | |||
2588 | #define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ | 2690 | #define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ |
2589 | #define TG3_PHY_ID_BCM50610 0x143bd60 | 2691 | #define TG3_PHY_ID_BCM50610 0x143bd60 |
2590 | #define TG3_PHY_ID_BCMAC131 0x143bc70 | 2692 | #define TG3_PHY_ID_BCMAC131 0x143bc70 |
2591 | 2693 | #define TG3_PHY_ID_RTL8211C 0x001cc910 | |
2694 | #define TG3_PHY_ID_RTL8201E 0x00008200 | ||
2695 | #define TG3_PHY_OUI_MASK 0xfffffc00 | ||
2696 | #define TG3_PHY_OUI_1 0x00206000 | ||
2697 | #define TG3_PHY_OUI_2 0x0143bc00 | ||
2698 | #define TG3_PHY_OUI_3 0x03625c00 | ||
2592 | 2699 | ||
2593 | u32 led_ctrl; | 2700 | u32 led_ctrl; |
2594 | u32 phy_otp; | 2701 | u32 phy_otp; |