7066-fmd-add-2.5G-SGMII-mode-suport.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 95d12688fa875f7a00590aaf6de5f34d55531d68 Mon Sep 17 00:00:00 2001
  2. From: Madalin Bucur <madalin.bucur@freescale.com>
  3. Date: Thu, 14 Apr 2016 14:12:38 +0300
  4. Subject: [PATCH 66/70] fmd: add 2.5G SGMII mode suport
  5. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
  6. ---
  7. drivers/net/ethernet/freescale/sdk_dpaa/mac.c | 5 ++++-
  8. 1 file changed, 4 insertions(+), 1 deletion(-)
  9. --- a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
  10. +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
  11. @@ -74,6 +74,7 @@ static const char phy_str[][11] = {
  12. [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
  13. [PHY_INTERFACE_MODE_RTBI] = "rtbi",
  14. [PHY_INTERFACE_MODE_XGMII] = "xgmii",
  15. + [PHY_INTERFACE_MODE_SGMII_2500] = "sgmii-2500",
  16. };
  17. static phy_interface_t __pure __attribute__((nonnull)) str2phy(const char *str)
  18. @@ -100,6 +101,7 @@ static const uint16_t phy2speed[] = {
  19. [PHY_INTERFACE_MODE_RGMII_TXID] = SPEED_1000,
  20. [PHY_INTERFACE_MODE_RTBI] = SPEED_1000,
  21. [PHY_INTERFACE_MODE_XGMII] = SPEED_10000,
  22. + [PHY_INTERFACE_MODE_SGMII_2500] = SPEED_2500,
  23. };
  24. static struct mac_device * __cold
  25. @@ -335,7 +337,8 @@ static int __cold mac_probe(struct platf
  26. mac_dev->max_speed = mac_dev->speed;
  27. mac_dev->if_support = DTSEC_SUPPORTED;
  28. /* We don't support half-duplex in SGMII mode */
  29. - if (strstr(char_prop, "sgmii") || strstr(char_prop, "qsgmii"))
  30. + if (strstr(char_prop, "sgmii") || strstr(char_prop, "qsgmii") ||
  31. + strstr(char_prop, "sgmii-2500"))
  32. mac_dev->if_support &= ~(SUPPORTED_10baseT_Half |
  33. SUPPORTED_100baseT_Half);