phy.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /****************************************************************************
  3. * Driver for Solarflare network controllers and boards
  4. * Copyright 2007-2010 Solarflare Communications Inc.
  5. */
  6. #ifndef EF4_PHY_H
  7. #define EF4_PHY_H
  8. /****************************************************************************
  9. * 10Xpress (SFX7101) PHY
  10. */
  11. extern const struct ef4_phy_operations falcon_sfx7101_phy_ops;
  12. void tenxpress_set_id_led(struct ef4_nic *efx, enum ef4_led_mode mode);
  13. /****************************************************************************
  14. * AMCC/Quake QT202x PHYs
  15. */
  16. extern const struct ef4_phy_operations falcon_qt202x_phy_ops;
  17. /* These PHYs provide various H/W control states for LEDs */
  18. #define QUAKE_LED_LINK_INVAL (0)
  19. #define QUAKE_LED_LINK_STAT (1)
  20. #define QUAKE_LED_LINK_ACT (2)
  21. #define QUAKE_LED_LINK_ACTSTAT (3)
  22. #define QUAKE_LED_OFF (4)
  23. #define QUAKE_LED_ON (5)
  24. #define QUAKE_LED_LINK_INPUT (6) /* Pin is an input. */
  25. /* What link the LED tracks */
  26. #define QUAKE_LED_TXLINK (0)
  27. #define QUAKE_LED_RXLINK (8)
  28. void falcon_qt202x_set_led(struct ef4_nic *p, int led, int state);
  29. /****************************************************************************
  30. * Transwitch CX4 retimer
  31. */
  32. extern const struct ef4_phy_operations falcon_txc_phy_ops;
  33. #define TXC_GPIO_DIR_INPUT 0
  34. #define TXC_GPIO_DIR_OUTPUT 1
  35. void falcon_txc_set_gpio_dir(struct ef4_nic *efx, int pin, int dir);
  36. void falcon_txc_set_gpio_val(struct ef4_nic *efx, int pin, int val);
  37. #endif