Quoting Andrew Lunn <and...@lunn.ch>:

Hi Andrew,

+static int mt7530_isolate_ephy(struct dsa_switch *ds,
+                              struct device_node *ephy_node)
+{
+       struct phy_device *phydev = of_phy_find_device(ephy_node);
+       int ret;
+
+       if (!phydev)
+               return 0;
+
+       ret = phy_modify(phydev, MII_BMCR, 0, (BMCR_ISOLATE | BMCR_PDOWN));

genphy_suspend() does what you want.

In case my device has AT8033 PHY which act as a RGMII-to-SGMII converter for the
SFP cage.

Qoute of the AR8031/33 datasheet:

The AR8033 device supports the low power mode with software power-down.
To enter the standard IEEE power-down mode, set the bit[11] POWER_DOWN of
Control register - copper page or Control register — fiber page to 1.
In this mode, AR8033 ignores all MAC interface signals except the MDC/MDIO and
does not respond to any activity on the media side. AR8033 cannot wake up on its
own and is only waken up by setting the POWER_DOWN bit to 0.


Does "standard IEEE power-down mode" describ this behavior that in power-down
mode the RGMII are also put in tri-state?

Reading the datasheet does not give me any clues.
Putting RGMII signals in tri-state is important in this case.


+       if (ret)
+               dev_err(ds->dev, "Failed to put phy %s in isolation mode!\n",
+                       ephy_node->full_name);
+       else
+               dev_info(ds->dev, "Phy %s in isolation mode!\n",
+                        ephy_node->full_name);

No need to clog up the system with yet more kernel messages.

OK, I remove it.


   Andrew

Greats,

René



Reply via email to