Our system will have an external Ethernet connector for doing updates and communication. As we have special / high EMC requirements we want to be able to fully disable the Ethernet as long as it is not switched on by an external trigger e.g. an GPIO.
Is it possible to switch off the PHY of the Ethernet interface or is it always active? If yes, is that already possible with the current Linux version or do we need any modifications to the kernel/device tree?
Disable/Enable Ethernet
-
-
As far as I know, ethernet and the PHY is only activated in U-Boot, if there is a command that uses ethernet, for example tftp. Normally the PHY should be brought back again to standby mode when U-Boot stops. Again it is only activated if Linux activates the port, e.g. by an ifconfig up. Unfortunately, the regular Yocto configuration always starts Ethernet automatically. Maybe this can be avoided by shutting down the appropriate service with systemctl.
So if no-one starts Ethernet in U-Boot and no-one starts Ethernet in Linux, the PHY should be rather deeply in stand-by.
Your F&S Support Team
-
It is possible to shut down the ethernet link with "ifconfig eth0 down". That way, the PHY should power down and disable further communication.
You might want to disable the automatic link up + dhcp for wired connections, as Yocto adds that policy under /lib/systemd/network/80-wired.network. If you do this, you will need to run the commands "ifconfig eth0 up" and "udhcpc -i eth0" manually.
I just tested that the genphy_suspend function from the ethernet PHY driver in the kernel gets called, when "ifconfig eth0 down" is issued. This way the generic power down over the mdio communication can be done.
Your F&S Support Team