I have trouble with second ethernet. I need to have two separete networks connected to device. At first I tried to use esw device, which works as expected. I can connect from both ports and it works as it should.
When I tried to separate interfaces, I swapped aliases from ethernet0 = &esw; to ethernet0 = &fec0; ethernet1 = &fec1;. Then I replaced esw
Is there a reason why you didn’t define any phy-handle in your fec1 node? What kind of phy did you assemble on your board?
It seems that your fec doesn’t find any connected phy or at least it doesn’t know where to look at. Could you check if you can define the phy-handle with a mdio subnode according to the official documentation or the example of &fec1? You would find the documentation for the devicetree bindings here:
Documentation/devicetree/bindings/net/fsl-fec.txt
Documentation/devicetree/bindings/net/phy.txt
Also if you comment the next time, could you send your device tree files?
I tried to your advice, but I don’t know how to set phy-handler correctly. I am tring to use KSZ8041NL as PHY, connected as recommended here. Could you help?
Note: When I try to use ifconfig eth0 up, the device outputs only ifconfig: SIOCSIFFLAGS: Connection timed out now.