r8152.h 970 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020 Realtek Semiconductor Corp. All rights reserved.
  4. */
  5. #ifndef __LINUX_R8152_H
  6. #define __LINUX_R8152_H
  7. #define RTL8152_REQT_READ 0xc0
  8. #define RTL8152_REQT_WRITE 0x40
  9. #define RTL8152_REQ_GET_REGS 0x05
  10. #define RTL8152_REQ_SET_REGS 0x05
  11. #define BYTE_EN_DWORD 0xff
  12. #define BYTE_EN_WORD 0x33
  13. #define BYTE_EN_BYTE 0x11
  14. #define BYTE_EN_SIX_BYTES 0x3f
  15. #define BYTE_EN_START_MASK 0x0f
  16. #define BYTE_EN_END_MASK 0xf0
  17. #define MCU_TYPE_PLA 0x0100
  18. #define MCU_TYPE_USB 0x0000
  19. /* Define these values to match your device */
  20. #define VENDOR_ID_REALTEK 0x0bda
  21. #define VENDOR_ID_MICROSOFT 0x045e
  22. #define VENDOR_ID_SAMSUNG 0x04e8
  23. #define VENDOR_ID_LENOVO 0x17ef
  24. #define VENDOR_ID_LINKSYS 0x13b1
  25. #define VENDOR_ID_NVIDIA 0x0955
  26. #define VENDOR_ID_TPLINK 0x2357
  27. #if IS_REACHABLE(CONFIG_USB_RTL8152)
  28. extern u8 rtl8152_get_version(struct usb_interface *intf);
  29. #endif
  30. #endif /* __LINUX_R8152_H */