halmac_phy_8821c.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. ******************************************************************************/
  15. #include "../../halmac_type.h"
  16. #if HALMAC_USB_SUPPORT
  17. #include "halmac_usb_8821c.h"
  18. #endif
  19. #if HALMAC_PCIE_SUPPORT
  20. #include "halmac_pcie_8821c.h"
  21. #endif
  22. /**
  23. * ============ip sel item list============
  24. * HALMAC_IP_INTF_PHY
  25. * USB2 : usb2 phy, 1byte value
  26. * USB3 : usb3 phy, 2byte value
  27. * PCIE1 : pcie gen1 mdio, 2byte value
  28. * PCIE2 : pcie gen2 mdio, 2byte value
  29. * HALMAC_IP_SEL_MAC
  30. * USB2, USB3, PCIE1, PCIE2 : mac ip, 1byte value
  31. * HALMAC_IP_PCIE_DBI
  32. * USB2 USB3 : none
  33. * PCIE1, PCIE2 : pcie dbi, 1byte value
  34. */
  35. #if HALMAC_8821C_SUPPORT
  36. struct halmac_intf_phy_para usb2_phy_param_8821c[] = {
  37. /* {offset, value, ip sel, cut mask, platform mask} */
  38. {0xFFFF, 0x00,
  39. HALMAC_IP_INTF_PHY,
  40. HALMAC_INTF_PHY_CUT_ALL,
  41. HALMAC_INTF_PHY_PLATFORM_ALL},
  42. };
  43. struct halmac_intf_phy_para usb3_phy_param_8821c[] = {
  44. /* {offset, value, cut mask, platform mask} */
  45. {0xFFFF, 0x0000,
  46. HALMAC_IP_INTF_PHY,
  47. HALMAC_INTF_PHY_CUT_ALL,
  48. HALMAC_INTF_PHY_PLATFORM_ALL},
  49. };
  50. struct halmac_intf_phy_para pcie_gen1_phy_param_8821c[] = {
  51. /* {offset, value, ip sel, cut mask, platform mask} */
  52. {0x0009, 0x6380,
  53. HALMAC_IP_INTF_PHY,
  54. HALMAC_INTF_PHY_CUT_ALL,
  55. HALMAC_INTF_PHY_PLATFORM_ALL},
  56. {0xFFFF, 0x0000,
  57. HALMAC_IP_INTF_PHY,
  58. HALMAC_INTF_PHY_CUT_ALL,
  59. HALMAC_INTF_PHY_PLATFORM_ALL},
  60. };
  61. struct halmac_intf_phy_para pcie_gen2_phy_param_8821c[] = {
  62. /* {offset, value, ip sel, cut mask, platform mask} */
  63. {0xFFFF, 0x0000,
  64. HALMAC_IP_INTF_PHY,
  65. HALMAC_INTF_PHY_CUT_ALL,
  66. HALMAC_INTF_PHY_PLATFORM_ALL},
  67. };
  68. #endif /* HALMAC_8821C_SUPPORT */