"eth1: Could not attach to PHY" on MPC8349e-MITX
Subsystems (3)
The Freescale MPC8349e-MITX reference board has two TSECs, the second of which (eth1) is attached to a Vitesse 7385 5-port switch.
Using the latest U-Boot, Kernel, and device tree, I cannot bring up eth1. When I try, I get this message:
[root@tintin root]# ifconfig eth1 up
0:01 not found
eth1: Could not attach to PHY
SIOCSIFFLAGS: No such device
Unfortunately, I don't even know what this means.
I believe my network configuration is correct. Here's what ifconfig says about eth1:
eth1 Link encap:Ethernet HWaddr 00:E0:0C:00:8C:02
inet addr:192.168.2.141 Bcast:192.168.255.255 Mask:255.255.0.0 BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Base address:0x4000
eth1 does work in U-boot, so I know it can be made to work (and I know the 7385's firmware is uploaded), I just don't know what needs to be done in Linux.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Timur,
is it possible that the PHY adress doesn't match the one specified in the dts ?
regards,
Andre
Quoted 25 lines · Timur Tabi
The Freescale MPC8349e-MITX reference board has two TSECs, the second of which (eth1) is attached to a Vitesse 7385 5-port switch.
Using the latest U-Boot, Kernel, and device tree, I cannot bring up eth1. When I try, I get this message:
[root@tintin root]# ifconfig eth1 up
0:01 not found
eth1: Could not attach to PHY
SIOCSIFFLAGS: No such deviceUnfortunately, I don't even know what this means.
I believe my network configuration is correct. Here's what ifconfig says about eth1:
eth1 Link encap:Ethernet HWaddr 00:E0:0C:00:8C:02
inet addr:192.168.2.141 Bcast:192.168.255.255 Mask:255.255.0.0 BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Base address:0x4000
Quoted 4 lines
eth1 does work in U-boot, so I know it can be made to work (and I know the 7385's firmware is uploaded), I just don't know what needs to be done in Linux.
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Quoted 4 lines · Andre Schwarz
Timur,
is it possible that the PHY adress doesn't match the one specified in the dts ?
What part of the DTS contains the PHY address? I have this:
mdio@24520 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-mdio";
reg = <0x24520 0x20>;
/* Vitesse 8201 */
phy1c: ethernet-phy@1c {
interrupt-parent = <&ipic>;
interrupts = <18 0x8>;
reg = <0x1c>;
device_type = "ethernet-phy";
};
};
enet1: ethernet@25000 {
cell-index = <1>;
device_type = "network";
model = "TSEC";
compatible = "gianfar";
reg = <0x25000 0x1000>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <35 0x8 36 0x8 37 0x8>;
phy-connection-type = "mii";
interrupt-parent = <&ipic>;
/* Vitesse 7385 isn't on the MDIO bus */
fixed-link = <1 1 1000 0 0>;
linux,network-index = <1>;
};Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 27 lines · Timur Tabi
Quoted 4 lines · Andre Schwarz
Timur,
is it possible that the PHY adress doesn't match the one specified in the dts ?
What part of the DTS contains the PHY address? I have this:
mdio@24520 { #address-cells = <1>; #size-cells = <0>; compatible = "fsl,gianfar-mdio"; reg = <0x24520 0x20>; /* Vitesse 8201 */ phy1c: ethernet-phy@1c { interrupt-parent = <&ipic>; interrupts = <18 0x8>; reg = <0x1c>; device_type = "ethernet-phy"; }; }; enet1: ethernet@25000 { cell-index = <1>; device_type = "network"; model = "TSEC";
Quoted 8 lines
compatible = "gianfar"; reg = <0x25000 0x1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <35 0x8 36 0x8 37 0x8>; phy-connection-type = "mii"; interrupt-parent = <&ipic>; /* Vitesse 7385 isn't on the MDIO bus */ fixed-link = <1 1 1000 0 0>;
^^^ That one. The Vitesse 7385 isn't on the MDIO bus, so the fixed link (drivers/net/phy/fixed.c) driver is used for this ethernet port.
Quoted 2 lines
linux,network-index = <1>; };
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
Quoted 27 lines · Timur Tabi
Quoted 5 lines · Andre Schwarz
Timur,
is it possible that the PHY adress doesn't match the one specified in the dts ?
What part of the DTS contains the PHY address? I have this:
mdio@24520 { #address-cells = <1>; #size-cells = <0>; compatible = "fsl,gianfar-mdio"; reg = <0x24520 0x20>; /* Vitesse 8201 */ phy1c: ethernet-phy@1c { interrupt-parent = <&ipic>; interrupts = <18 0x8>; reg = <0x1c>; device_type = "ethernet-phy"; }; }; enet1: ethernet@25000 { cell-index = <1>;
Quoted 9 lines
device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <0x25000 0x1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <35 0x8 36 0x8 37 0x8>; phy-connection-type = "mii"; interrupt-parent = <&ipic>;
Your PHY is not on the MDIO bus, i.e. can not be programmed or queried. Maybe your kernel lacks the mdio-less configuration ?
Quoted 6 lines
/* Vitesse 7385 isn't on the MDIO bus */ fixed-link = <1 1 1000 0 0>; linux,network-index = <1>; };
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
PATCH 1/1 powerpc/83xx: Enable FIXED_PHY in mpc834x_itx and mpc83xx defconfigs
In reply to Timur TabiThis is needed so that Vitesse 7385 5-port switch could work on MPC8349E-mITX boards.
---
Quoted 6 lines · Timur Tabi
The Freescale MPC8349e-MITX reference board has two TSECs, the second of which (eth1) is attached to a Vitesse 7385 5-port switch.
Using the latest U-Boot, Kernel, and device tree, I cannot bring up eth1. When I try, I get this message:
Quoted 6 lines
[root@tintin root]# ifconfig eth1 up
0:01 not found
eth1: Could not attach to PHY
SIOCSIFFLAGS: No such deviceUnfortunately, I don't even know what this means.
The FIXED_PHY driver isn't enabled in the defconfig. Following patch should fix the issue.
arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 2 +- arch/powerpc/configs/mpc83xx_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/configs/83xx/mpc834x_itx_defconfig +1 -1
@@ -723,7 +723,7 @@ CONFIG_CICADA_PHY=y # CONFIG_BROADCOM_PHY is not set # CONFIG_ICPLUS_PHY is not set # CONFIG_REALTEK_PHY is not set -# CONFIG_FIXED_PHY is not set +CONFIG_FIXED_PHY=y # CONFIG_MDIO_BITBANG is not set # CONFIG_NET_ETHERNET is not set CONFIG_NETDEV_1000=y
arch/powerpc/configs/mpc83xx_defconfig +1 -1
@@ -682,7 +682,7 @@ CONFIG_VITESSE_PHY=y # CONFIG_BROADCOM_PHY is not set CONFIG_ICPLUS_PHY=y # CONFIG_REALTEK_PHY is not set -# CONFIG_FIXED_PHY is not set +CONFIG_FIXED_PHY=y # CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y
Signature · 1 line
1.5.6.5
Re: [PATCH] powerpc/83xx: Enable FIXED_PHY in mpc834x_itx and mpc83xx defconfigs
Quoted 6 lines · Anton Vorontsov
The
FIXED_PHYdriver isn't enabled in the defconfig. Following patch should fix the issue.arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 2 +- arch/powerpc/configs/mpc83xx_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Kumar, please apply.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Kumar Gala
AppliedRe: [PATCH] powerpc/83xx: Enable FIXED_PHY in mpc834x_itx and mpc83xx defconfigs
In reply to Anton VorontsovQuoted 5 lines · Anton Vorontsov
This is needed so that Vitesse 7385 5-port switch could work on MPC8349E-mITX boards.
Signed-off-by Anton Vorontsov <[email protected]>---
applied to merge.
Guys, can you put a [for 2.6.28] or something if a patch is intended for .28.. this way I hopefully pay a bit more attention.
- k