rtl8367.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Platform data definition for the Realtek RTL8367 ethernet switch driver
  3. *
  4. * Copyright (C) 2011 Gabor Juhos <[email protected]>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation.
  9. */
  10. #ifndef _RTL8367_H
  11. #define _RTL8367_H
  12. #define RTL8367_DRIVER_NAME "rtl8367"
  13. enum rtl8367_port_speed {
  14. RTL8367_PORT_SPEED_10 = 0,
  15. RTL8367_PORT_SPEED_100,
  16. RTL8367_PORT_SPEED_1000,
  17. };
  18. struct rtl8367_port_ability {
  19. int force_mode;
  20. int nway;
  21. int txpause;
  22. int rxpause;
  23. int link;
  24. int duplex;
  25. enum rtl8367_port_speed speed;
  26. };
  27. enum rtl8367_extif_mode {
  28. RTL8367_EXTIF_MODE_DISABLED = 0,
  29. RTL8367_EXTIF_MODE_RGMII,
  30. RTL8367_EXTIF_MODE_MII_MAC,
  31. RTL8367_EXTIF_MODE_MII_PHY,
  32. RTL8367_EXTIF_MODE_TMII_MAC,
  33. RTL8367_EXTIF_MODE_TMII_PHY,
  34. RTL8367_EXTIF_MODE_GMII,
  35. RTL8367_EXTIF_MODE_RGMII_33V,
  36. };
  37. struct rtl8367_extif_config {
  38. unsigned int txdelay;
  39. unsigned int rxdelay;
  40. enum rtl8367_extif_mode mode;
  41. struct rtl8367_port_ability ability;
  42. };
  43. struct rtl8367_platform_data {
  44. unsigned gpio_sda;
  45. unsigned gpio_sck;
  46. void (*hw_reset)(bool active);
  47. struct rtl8367_extif_config *extif0_cfg;
  48. struct rtl8367_extif_config *extif1_cfg;
  49. };
  50. #endif /* _RTL8367_H */