Discussion:
"eth1: Could not attach to PHY" on MPC8349e-MITX
Timur Tabi
2008-12-04 17:15:32 UTC
Permalink
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:

[***@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.
--
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Andre Schwarz
2008-12-04 17:41:54 UTC
Permalink
Timur,

is it possible that the PHY adress doesn't match the one specified in
the dts ?

regards,
Andre
Post by 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
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
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.
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Timur Tabi
2008-12-04 17:47:26 UTC
Permalink
Post by 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:

***@24520 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-mdio";
reg = <0x24520 0x20>;

/* Vitesse 8201 */
phy1c: ethernet-***@1c {
interrupt-parent = <&ipic>;
interrupts = <18 0x8>;
reg = <0x1c>;
device_type = "ethernet-phy";
};
};

enet1: ***@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>;
};
--
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Anton Vorontsov
2008-12-04 17:56:34 UTC
Permalink
Post by Timur Tabi
Post by Andre Schwarz
Timur,
is it possible that the PHY adress doesn't match the one specified in
the dts ?
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-mdio";
reg = <0x24520 0x20>;
/* Vitesse 8201 */
interrupt-parent = <&ipic>;
interrupts = <18 0x8>;
reg = <0x1c>;
device_type = "ethernet-phy";
};
};
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>;
^^^ 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.
Post by Timur Tabi
linux,network-index = <1>;
};
--
Anton Vorontsov
email: ***@gmail.com
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Andre Schwarz
2008-12-04 17:56:40 UTC
Permalink
Post by Timur Tabi
Post by Andre Schwarz
Timur,
is it possible that the PHY adress doesn't match the one specified in
the dts ?
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-mdio";
reg = <0x24520 0x20>;
/* Vitesse 8201 */
interrupt-parent = <&ipic>;
interrupts = <18 0x8>;
reg = <0x1c>;
device_type = "ethernet-phy";
};
};
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>;
Your PHY is not on the MDIO bus, i.e. can not be programmed or queried.
Maybe your kernel lacks the mdio-less configuration ?
Post by Timur Tabi
/* 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
Anton Vorontsov
2008-12-04 17:52:31 UTC
Permalink
This is needed so that Vitesse 7385 5-port switch could work on
MPC8349E-mITX boards.

Signed-off-by: Anton Vorontsov <***@ru.mvista.com>
---
Post by 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
0:01 not found
eth1: Could not attach to PHY
SIOCSIFFLAGS: No such device
Unfortunately, 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(-)

diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index e55ff7c..07a674f 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
@@ -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
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 15eb30c..d582014 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -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
--
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Timur Tabi
2008-12-04 19:18:23 UTC
Permalink
Post by Anton Vorontsov
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(-)
Acked-by: Timur Tabi <***@freescale.com>

Kumar, please apply.
--
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Kumar Gala
2008-12-05 00:48:36 UTC
Permalink
Post by Anton Vorontsov
This is needed so that Vitesse 7385 5-port switch could work on
MPC8349E-mITX boards.
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...