Newby trying to get Ethernet going on MPC83xx series device.

Michael Bergandi mbergandi at gmail.com
Fri Feb 20 16:00:30 EST 2009


Hi Dushara,

Sorry, I'm a late comer here, but I might have an idea.  First off, I don't
see below what
kernel version you are using? I may have missed it somewhere.


> The devices are successfully probed, but I'm getting this error on the
> debug console:
>
> [    7.119389] mdio at 24520:00 not found
> [    7.161370] eth0: Could not attach to PHY
> [    7.209600] IP-Config: Failed to open eth0
> [    7.258879] IP-Config: Device `eth0' not found.


I have similar output on my MPC8313E RDB. In my case, eth0 shared lines with
the external USB OTG and its PHY. I modified the resister banks on the board
that essentially cuts off the interrupt to the eth0 PHY. So, I don't expect
it to find it. Here is the kernel output at init time:

24520:01 not found
eth0: Could not attach to PHY


My mdio & Ethernet nodes are as follows (commenting out device_type below is
> an experiment)
>
>                mdio at 24520 {
>                        /*device_type = "mdio";*/
>                        compatible = "fsl,gianfar-mdio";
>                        #address-cells = <1>;
>                        #size-cells = <0>;
>                        reg = <24520 20>;


Hmm, well, the first thing I catch is this is an old dts format. Depending
on your kernel version, you
may want to comply with the  dts v1 spec. The v1 spec is much more strict on
the format of the values
that are provided for the properties.

ex. reg = <0x24520 0x20> makes it very clear that these values are hex, not
decimal.

You will notice this ambiguity below with the 'interrupts' properties. Are
the values decimal or hex?
Turns out that the values are hex. You will find dts version specifier "
/dts-v1/; " at the top or just before
the root node in any dts file that meets the v1 spec.


>
>                        phy0: ethernet-phy at 0 {
>                                interrupt-parent = <&ipic>;
>                                interrupts = <3 8>;
>                                reg = <0>;
>                                device_type = "ethernet-phy";
>                        };
>                        phy1: ethernet-phy at 1 {
>                                interrupt-parent = <&ipic>;
>                                interrupts = <3 8>;
>                                reg = <1>;
>                                device_type = "ethernet-phy";
>                        };
>                };


Are you sure both PHY's use interrupt 3? I would think not.


               enet0: ethernet at 24000 {
>                        cell-index = <0>;
>                        device_type = "network";
>                        model = "TSEC";
>                        compatible = "gianfar";
>                        reg = <24000 1000>;
>                        local-mac-address = [ 00 00 00 00 00 00 ];
>                        interrupts = <20 8 21 8 22 8>;
>                        interrupt-parent = <&ipic>;
>                        phy-handle = <&phy0>;
>                        linux,network-index = <0>;
>                };
>
>                enet1: ethernet at 25000 {
>                        cell-index = <1>;
>                        device_type = "network";
>                        model = "TSEC";
>                        compatible = "gianfar";
>                        reg = <25000 1000>;
>                        local-mac-address = [ 00 00 00 00 00 00 ];
>                        interrupts = <23 8 24 8 25 8>;
>                        interrupt-parent = <&ipic>;
>                        phy-handle = <&phy1>;
>                        linux,network-index = <1>;
>                        phy-connection-type = "gmii";
>                };


Finally, I don't know which silicon rev that you are using, but I have seen
the enet0 and enet1 interrupts swapped.

As in the very latest silicon may have the interrupt lines switched between
them. You can find a statement to that
affect on this list somewhere. I am using a revB MPC8313E and I specify the
interrupts as you have them here.
However, the dts file for the mpc8313erdb in the 2.6.28 kernel has them
reversed. Presumably for a revC chip.

ex.
enet0: ethernet at 24000 {
...
        interrupts = <23 8 24 8 25 8>;
...
};

enet1: ethernet at 25000 {
...
        interrupts = <20 8 21 8 22 8>;
...
};



> BTW, I assume CCing all those who replied to me is accepted/expected
> conduct or should I avoid this and just write to the list?


Yes, you should cc those who have replied. It is expected --- well, at least
by me.


Also is top posting ok? I haven't figured out how to enable '>' on bloody
> Microsoft Outlook, for incoming plain text messages.


I'm a little new to this list, but in general top posting is frowned upon.
Unfortunately, I can't help you with the Outlook problem.
I can tell you that not being able to determine what part of a message came
when is extremely annoying. I hope you find a fix
for it. Or, you could try Thunderbird :)

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090220/ecc35b54/attachment.htm>


More information about the Linuxppc-dev mailing list