704-net-phy-define-PSGMII-PHY-interface-mode.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From 3e1825e00dafb68eec25df389b63f3ab3d905b59 Mon Sep 17 00:00:00 2001
  2. From: Gabor Juhos <[email protected]>
  3. Date: Fri, 25 Dec 2020 08:02:47 +0100
  4. Subject: [PATCH] net: phy: define PSGMII PHY interface mode
  5. The PSGMII interface is similar to QSGMII. The main difference
  6. is that the PSGMII interface combines five SGMII lines into a
  7. single link while in QSGMII only four lines are combined.
  8. Similarly to the QSGMII, this interface mode might also needs
  9. special handling within the MAC driver.
  10. Add definitions for the PHY layer to allow to express this type
  11. of connection between the MAC and PHY.
  12. Signed-off-by: Gabor Juhos <[email protected]>
  13. ---
  14. Documentation/devicetree/bindings/net/ethernet-controller.yaml | 1 +
  15. drivers/net/phy/phylink.c | 1 +
  16. include/linux/phy.h | 3 +++
  17. 3 files changed, 5 insertions(+)
  18. --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
  19. +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
  20. @@ -64,6 +64,7 @@ properties:
  21. - mii
  22. - gmii
  23. - sgmii
  24. + - psgmii
  25. - qsgmii
  26. - tbi
  27. - rev-mii
  28. --- a/drivers/net/phy/phylink.c
  29. +++ b/drivers/net/phy/phylink.c
  30. @@ -629,6 +629,7 @@ static int phylink_parse_mode(struct phy
  31. switch (pl->link_config.interface) {
  32. case PHY_INTERFACE_MODE_SGMII:
  33. + case PHY_INTERFACE_MODE_PSGMII:
  34. case PHY_INTERFACE_MODE_QSGMII:
  35. phylink_set(pl->supported, 10baseT_Half);
  36. phylink_set(pl->supported, 10baseT_Full);
  37. --- a/include/linux/phy.h
  38. +++ b/include/linux/phy.h
  39. @@ -138,6 +138,7 @@ typedef enum {
  40. PHY_INTERFACE_MODE_XGMII,
  41. PHY_INTERFACE_MODE_XLGMII,
  42. PHY_INTERFACE_MODE_MOCA,
  43. + PHY_INTERFACE_MODE_PSGMII,
  44. PHY_INTERFACE_MODE_QSGMII,
  45. PHY_INTERFACE_MODE_TRGMII,
  46. PHY_INTERFACE_MODE_100BASEX,
  47. @@ -243,6 +244,8 @@ static inline const char *phy_modes(phy_
  48. return "xlgmii";
  49. case PHY_INTERFACE_MODE_MOCA:
  50. return "moca";
  51. + case PHY_INTERFACE_MODE_PSGMII:
  52. + return "psgmii";
  53. case PHY_INTERFACE_MODE_QSGMII:
  54. return "qsgmii";
  55. case PHY_INTERFACE_MODE_TRGMII: