rtl83xx-phy.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. // TODO: not really used
  3. struct rtl838x_phy_priv {
  4. char *name;
  5. };
  6. struct __attribute__ ((__packed__)) part {
  7. uint16_t start;
  8. uint8_t wordsize;
  9. uint8_t words;
  10. };
  11. struct __attribute__ ((__packed__)) fw_header {
  12. uint32_t magic;
  13. uint32_t phy;
  14. uint32_t checksum;
  15. uint32_t version;
  16. struct part parts[10];
  17. };
  18. // TODO: fixed path?
  19. #define FIRMWARE_838X_8380_1 "rtl838x_phy/rtl838x_8380.fw"
  20. #define FIRMWARE_838X_8214FC_1 "rtl838x_phy/rtl838x_8214fc.fw"
  21. #define FIRMWARE_838X_8218b_1 "rtl838x_phy/rtl838x_8218b.fw"
  22. /* External RTL8218B and RTL8214FC IDs are identical */
  23. #define PHY_ID_RTL8214C 0x001cc942
  24. #define PHY_ID_RTL8214FC 0x001cc981
  25. #define PHY_ID_RTL8218B_E 0x001cc981
  26. #define PHY_ID_RTL8218B_I 0x001cca40
  27. #define PHY_ID_RTL8390_GENERIC 0x001ccab0
  28. #define PHY_ID_RTL8393_I 0x001c8393
  29. #define RTL839X_SDS12_13_XSG0 (0xB800)
  30. #define RTL838X_SDS_MODE_SEL (0x0028)
  31. #define RTL838X_SDS_CFG_REG (0x0034)
  32. #define RTL838X_INT_MODE_CTRL (0x005c)
  33. #define RTL838X_DMY_REG31 (0x3b28)