microchipphy.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (C) 2015 Microchip Technology
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef _MICROCHIPPHY_H
  18. #define _MICROCHIPPHY_H
  19. #define LAN88XX_INT_MASK (0x19)
  20. #define LAN88XX_INT_MASK_MDINTPIN_EN_ (0x8000)
  21. #define LAN88XX_INT_MASK_SPEED_CHANGE_ (0x4000)
  22. #define LAN88XX_INT_MASK_LINK_CHANGE_ (0x2000)
  23. #define LAN88XX_INT_MASK_FDX_CHANGE_ (0x1000)
  24. #define LAN88XX_INT_MASK_AUTONEG_ERR_ (0x0800)
  25. #define LAN88XX_INT_MASK_AUTONEG_DONE_ (0x0400)
  26. #define LAN88XX_INT_MASK_POE_DETECT_ (0x0200)
  27. #define LAN88XX_INT_MASK_SYMBOL_ERR_ (0x0100)
  28. #define LAN88XX_INT_MASK_FAST_LINK_FAIL_ (0x0080)
  29. #define LAN88XX_INT_MASK_WOL_EVENT_ (0x0040)
  30. #define LAN88XX_INT_MASK_EXTENDED_INT_ (0x0020)
  31. #define LAN88XX_INT_MASK_RESERVED_ (0x0010)
  32. #define LAN88XX_INT_MASK_FALSE_CARRIER_ (0x0008)
  33. #define LAN88XX_INT_MASK_LINK_SPEED_DS_ (0x0004)
  34. #define LAN88XX_INT_MASK_MASTER_SLAVE_DONE_ (0x0002)
  35. #define LAN88XX_INT_MASK_RX__ER_ (0x0001)
  36. #define LAN88XX_INT_STS (0x1A)
  37. #define LAN88XX_INT_STS_INT_ACTIVE_ (0x8000)
  38. #define LAN88XX_INT_STS_SPEED_CHANGE_ (0x4000)
  39. #define LAN88XX_INT_STS_LINK_CHANGE_ (0x2000)
  40. #define LAN88XX_INT_STS_FDX_CHANGE_ (0x1000)
  41. #define LAN88XX_INT_STS_AUTONEG_ERR_ (0x0800)
  42. #define LAN88XX_INT_STS_AUTONEG_DONE_ (0x0400)
  43. #define LAN88XX_INT_STS_POE_DETECT_ (0x0200)
  44. #define LAN88XX_INT_STS_SYMBOL_ERR_ (0x0100)
  45. #define LAN88XX_INT_STS_FAST_LINK_FAIL_ (0x0080)
  46. #define LAN88XX_INT_STS_WOL_EVENT_ (0x0040)
  47. #define LAN88XX_INT_STS_EXTENDED_INT_ (0x0020)
  48. #define LAN88XX_INT_STS_RESERVED_ (0x0010)
  49. #define LAN88XX_INT_STS_FALSE_CARRIER_ (0x0008)
  50. #define LAN88XX_INT_STS_LINK_SPEED_DS_ (0x0004)
  51. #define LAN88XX_INT_STS_MASTER_SLAVE_DONE_ (0x0002)
  52. #define LAN88XX_INT_STS_RX_ER_ (0x0001)
  53. #define LAN88XX_EXT_PAGE_ACCESS (0x1F)
  54. #define LAN88XX_EXT_PAGE_SPACE_0 (0x0000)
  55. #define LAN88XX_EXT_PAGE_SPACE_1 (0x0001)
  56. #define LAN88XX_EXT_PAGE_SPACE_2 (0x0002)
  57. /* Extended Register Page 1 space */
  58. #define LAN88XX_EXT_MODE_CTRL (0x13)
  59. #define LAN88XX_EXT_MODE_CTRL_MDIX_MASK_ (0x000C)
  60. #define LAN88XX_EXT_MODE_CTRL_AUTO_MDIX_ (0x0000)
  61. #define LAN88XX_EXT_MODE_CTRL_MDI_ (0x0008)
  62. #define LAN88XX_EXT_MODE_CTRL_MDI_X_ (0x000C)
  63. /* MMD 3 Registers */
  64. #define LAN88XX_MMD3_CHIP_ID (32877)
  65. #define LAN88XX_MMD3_CHIP_REV (32878)
  66. #endif /* _MICROCHIPPHY_H */