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 = <ð_wake_intn ð_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