80003es2lan.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright(c) 1999 - 2018 Intel Corporation. */
  3. #ifndef _E1000E_80003ES2LAN_H_
  4. #define _E1000E_80003ES2LAN_H_
  5. #define E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL 0x00
  6. #define E1000_KMRNCTRLSTA_OFFSET_INB_CTRL 0x02
  7. #define E1000_KMRNCTRLSTA_OFFSET_HD_CTRL 0x10
  8. #define E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE 0x1F
  9. #define E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS 0x0008
  10. #define E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS 0x0800
  11. #define E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING 0x0010
  12. #define E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT 0x0004
  13. #define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT 0x0000
  14. #define E1000_KMRNCTRLSTA_OPMODE_E_IDLE 0x2000
  15. #define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C
  16. #define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004
  17. #define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gig Carry Extend Padding */
  18. #define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000
  19. #define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8
  20. #define DEFAULT_TIPG_IPGT_10_100_80003ES2LAN 0x9
  21. /* GG82563 PHY Specific Status Register (Page 0, Register 16 */
  22. #define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Reversal Dis */
  23. #define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060
  24. #define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI */
  25. #define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX */
  26. #define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Auto crossover */
  27. /* PHY Specific Control Register 2 (Page 0, Register 26) */
  28. #define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 /* 1=Reverse Auto-Neg */
  29. /* MAC Specific Control Register (Page 2, Register 21) */
  30. /* Tx clock speed for Link Down and 1000BASE-T for the following speeds */
  31. #define GG82563_MSCR_TX_CLK_MASK 0x0007
  32. #define GG82563_MSCR_TX_CLK_10MBPS_2_5 0x0004
  33. #define GG82563_MSCR_TX_CLK_100MBPS_25 0x0005
  34. #define GG82563_MSCR_TX_CLK_1000MBPS_25 0x0007
  35. #define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */
  36. /* DSP Distance Register (Page 5, Register 26)
  37. * 0 = <50M
  38. * 1 = 50-80M
  39. * 2 = 80-100M
  40. * 3 = 110-140M
  41. * 4 = >140M
  42. */
  43. #define GG82563_DSPD_CABLE_LENGTH 0x0007
  44. /* Kumeran Mode Control Register (Page 193, Register 16) */
  45. #define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800
  46. /* Max number of times Kumeran read/write should be validated */
  47. #define GG82563_MAX_KMRN_RETRY 0x5
  48. /* Power Management Control Register (Page 193, Register 20) */
  49. /* 1=Enable SERDES Electrical Idle */
  50. #define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001
  51. /* In-Band Control Register (Page 194, Register 18) */
  52. #define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding */
  53. #endif