nhi.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Thunderbolt Cactus Ridge driver - NHI driver
  4. *
  5. * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
  6. */
  7. #ifndef DSL3510_H_
  8. #define DSL3510_H_
  9. #include <linux/thunderbolt.h>
  10. enum nhi_fw_mode {
  11. NHI_FW_SAFE_MODE,
  12. NHI_FW_AUTH_MODE,
  13. NHI_FW_EP_MODE,
  14. NHI_FW_CM_MODE,
  15. };
  16. enum nhi_mailbox_cmd {
  17. NHI_MAILBOX_SAVE_DEVS = 0x05,
  18. NHI_MAILBOX_DISCONNECT_PCIE_PATHS = 0x06,
  19. NHI_MAILBOX_DRV_UNLOADS = 0x07,
  20. NHI_MAILBOX_DISCONNECT_PA = 0x10,
  21. NHI_MAILBOX_DISCONNECT_PB = 0x11,
  22. NHI_MAILBOX_ALLOW_ALL_DEVS = 0x23,
  23. };
  24. int nhi_mailbox_cmd(struct tb_nhi *nhi, enum nhi_mailbox_cmd cmd, u32 data);
  25. enum nhi_fw_mode nhi_mailbox_mode(struct tb_nhi *nhi);
  26. /*
  27. * PCI IDs used in this driver from Win Ridge forward. There is no
  28. * need for the PCI quirk anymore as we will use ICM also on Apple
  29. * hardware.
  30. */
  31. #define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_NHI 0x157d
  32. #define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_BRIDGE 0x157e
  33. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_NHI 0x15bf
  34. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_BRIDGE 0x15c0
  35. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_NHI 0x15d2
  36. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_BRIDGE 0x15d3
  37. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_NHI 0x15d9
  38. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_BRIDGE 0x15da
  39. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_USBONLY_NHI 0x15dc
  40. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_USBONLY_NHI 0x15dd
  41. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_USBONLY_NHI 0x15de
  42. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_BRIDGE 0x15e7
  43. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_NHI 0x15e8
  44. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_BRIDGE 0x15ea
  45. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_NHI 0x15eb
  46. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_BRIDGE 0x15ef
  47. #endif