This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DP83826E: DP83826E: Interrupt pin for Wake on LAN in embedded Linux

Part Number: DP83826E


I would like to use the interrupt pin of this chip as a system wake up source in Linux when a Wake on LAN (WoL) packet arrives.

The device driver (developed by TI) seems to be able to configure WoL and it handles interrupts, but I cannot figure out how to make use of this functionality. This is my current device node definition:

&mdio0 {
 #address-cells = <1>;
 #size-cells = <0>;

 dp83826: ethernet-phy@0 {
 compatible = "ethernet-phy-ieee802.3-c22";
 reg = <0x0>;
 interrupt-parent = <&gpio0>;
 interrupts = <RK_PD3 IRQ_TYPE_EDGE_FALLING>;
 pinctrl-names = "default";
 pinctrl-0 = <&eth_wake_intn &eth_phy_rstn>;
 reset-assert-us = <1000>;
 reset-deassert-us = <2000>;
 reset-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>;
 wakeup-source;
 };
};

where RK_PD3 is the GPIO I use to receive the interrupt generated by the PHY.

The problem is that the driver enables all interrupt sources so that information is does not need to be polled by the MAC. On the other hand, any of those interrupt sources will wake up the system and not only a Magic Packet, making the WoL configuration useless. Therefore I am wondering if I am missing some settings or properties.

What is the right configuration to make use of the PHY WoL mechanism?

Thanks and best regards,

Javier

  • Hi Javier,

    So my understanding of the situation is the you are trying to use WoL function on DP83826, but upon implementation of driver code, any interrupt otherwise enabled is also waking the PHY up. Is this correct? Would it be possible to only enable the WoL interrupt only by bitmasking [7:0] except for [1]?''

    Also, has WoL been configured properly via Reg 0x4A0?

    Sincerely,

    Gerome

  • Hello Gerome, thank you for your reply.


    Before configuring anything manually I would like to know if the driver is supposed to support PHY WoL when the system is in suspend-to-RAM. Because if it does not support that, any test will lead me to that conclusion after some extra effort. If this feature is indeed supported, I would need to know how to activate it from the device tree description.

    If I am not mistaken, the MAC should access the PHY by polling to keep the interrupt line free for WoL, but I did not find any example or application note to get that done.

    As I mentioned, the device driver was developed by Texas Instruments.

  • Hi Javier,

    I will check with the team on this. Please note that this week is Thanksgiving and responses will be delayed. Please expect a response by 11/30.

    Sincerely,

    Gerome

  • Ok, thank you for the info.

    Just in case they want to know if wake on LAN is active, it works in freeze mode (where the MAC power supplies are enabled) and ethtool confirms that wake on LAN is active and reacts to magic packets, so the issue goes down to the case where only the PHY is enabled (suspend-to-RAM).

  • Thank you for your query.

    Sincerely,

    Gerome

  • Hi Javier,

    Apologies for the delay. Regarding your last query, it is best to bring this up with the proper SoC vendor. I am only able to provide advice for PHY HW, and the driver; not necessarily the platform in which the driver operates upon. Regarding driver compatibility, it appears that the driver does have WoL functionality listed under DP83822_set/get_wol, and the registers should be the same between the devices.

    Sincerely,

    Gerome