* [U-Boot-Users] Uboot (AT91 tree) macb in MII mode
@ 2008-04-14 8:10 Sander Vermin
2008-04-14 9:08 ` Stelian Pop
0 siblings, 1 reply; 6+ messages in thread
From: Sander Vermin @ 2008-04-14 8:10 UTC (permalink / raw)
To: u-boot
Hi All,
I have been struggling the last week to get the macb Ethernet driver in
MII mode.
[in short]
I have communication over the MDIO interface, my activity led blinks but
no ehternet.
[the long story]
I have a custom board build out of the schematics of the AT91SAM9260EK
board. On my boar I did not use the DM9161 but the KS8721chip. On the
ATMEL board the PHY works in RMII mode, on my board I used MII mode like
this board from OLIMEX [1].
Olimex was kind enough to make Uboot nandflash build working with there
board, And deliver sources I cant compile, due to an error: Hardware
float vs software float. But I want a dataflash version because I am
using a BGA chip with nandflash bug.
In my current setup I use the latest git of the AT91 tree with the
following defines:
#define CONFIG_MACB 1
#define CONFIG_MII 1
#undef CONFIG_RMII
#define CONFIG_NET_MULTI 1
#define CONFIG_NET_RETRY_COUNT 5000
#define CONFIG_RESET_PHY_R 1
With this config I have the MDIO interface working, when I try to ping
or TFTP I only get time outs / host not alive errors.
Is there someone out there how has the MII mode working?
Best regards,
Sander
[1] http://www.olimex.com/dev/sam9-L9260.html (schematics on the bottom
of the page)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Uboot (AT91 tree) macb in MII mode
2008-04-14 8:10 [U-Boot-Users] Uboot (AT91 tree) macb in MII mode Sander Vermin
@ 2008-04-14 9:08 ` Stelian Pop
2008-04-14 9:19 ` Sander Vermin
0 siblings, 1 reply; 6+ messages in thread
From: Stelian Pop @ 2008-04-14 9:08 UTC (permalink / raw)
To: u-boot
Le lundi 14 avril 2008 ? 10:10 +0200, Sander Vermin a ?crit :
> Hi All,
>
> I have been struggling the last week to get the macb Ethernet driver in
> MII mode.
>
> [in short]
> I have communication over the MDIO interface, my activity led blinks but
> no ehternet.
>
> [the long story]
> I have a custom board build out of the schematics of the AT91SAM9260EK
> board. On my boar I did not use the DM9161 but the KS8721chip. On the
> ATMEL board the PHY works in RMII mode, on my board I used MII mode like
> this board from OLIMEX [1].
Do you have a working Linux kernel with a working network interface ?
The Linux and U-Boot macb driver and PIO configuration is very close,
and if you manage to make it work under Linux you'll probably have
little trouble finding out the problem.
> Olimex was kind enough to make Uboot nandflash build working with there
> board, And deliver sources I cant compile, due to an error: Hardware
> float vs software float. But I want a dataflash version because I am
> using a BGA chip with nandflash bug.
I don't see what NAND has to do with ethernet here.
> In my current setup I use the latest git of the AT91 tree with the
> following defines:
> #define CONFIG_MACB 1
> #define CONFIG_MII 1
> #undef CONFIG_RMII
> #define CONFIG_NET_MULTI 1
> #define CONFIG_NET_RETRY_COUNT 5000
> #define CONFIG_RESET_PHY_R 1
>
> With this config I have the MDIO interface working, when I try to ping
> or TFTP I only get time outs / host not alive errors.
Does the board send anything at all ? Try sniffing the net wire (using
tcpdump for example).
Also, what cross chain are you using ? I have seen strange network
errors when using recent compilers which after investigation were -Os
optimisation errors. (using the latest CodeSourcery toolchain for
example).
> Is there someone out there how has the MII mode working?
If I'm correct, Olimex has. So closer inspection of their code may
reveal some information.
Stelian.
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Uboot (AT91 tree) macb in MII mode
2008-04-14 9:08 ` Stelian Pop
@ 2008-04-14 9:19 ` Sander Vermin
2008-04-14 9:41 ` Stelian Pop
0 siblings, 1 reply; 6+ messages in thread
From: Sander Vermin @ 2008-04-14 9:19 UTC (permalink / raw)
To: u-boot
Stelian Pop schreef:
> Le lundi 14 avril 2008 ? 10:10 +0200, Sander Vermin a ?crit :
>
>> Hi All,
>>
>> I have been struggling the last week to get the macb Ethernet driver in
>> MII mode.
>>
>> [in short]
>> I have communication over the MDIO interface, my activity led blinks but
>> no ehternet.
>>
>> [the long story]
>> I have a custom board build out of the schematics of the AT91SAM9260EK
>> board. On my boar I did not use the DM9161 but the KS8721chip. On the
>> ATMEL board the PHY works in RMII mode, on my board I used MII mode like
>> this board from OLIMEX [1].
>>
>
> Do you have a working Linux kernel with a working network interface ?
> The Linux and U-Boot macb driver and PIO configuration is very close,
> and if you manage to make it work under Linux you'll probably have
> little trouble finding out the problem.
>
Are all settings of uboot overwritten by linux? I am not to comfortable
hacking in the Linux kernel and I had the focus on Uboot.
>> Olimex was kind enough to make Uboot nandflash build working with there
>> board, And deliver sources I cant compile, due to an error: Hardware
>> float vs software float. But I want a dataflash version because I am
>> using a BGA chip with nandflash bug.
>>
>
> I don't see what NAND has to do with ethernet here.
>
The AT91SAM9260 BGA chip has a bug, that booting from NAND has problems.
>
>> In my current setup I use the latest git of the AT91 tree with the
>> following defines:
>> #define CONFIG_MACB 1
>> #define CONFIG_MII 1
>> #undef CONFIG_RMII
>> #define CONFIG_NET_MULTI 1
>> #define CONFIG_NET_RETRY_COUNT 5000
>> #define CONFIG_RESET_PHY_R 1
>>
>> With this config I have the MDIO interface working, when I try to ping
>> or TFTP I only get time outs / host not alive errors.
>>
>
> Does the board send anything at all ? Try sniffing the net wire (using
> tcpdump for example).
>
> Also, what cross chain are you using ? I have seen strange network
> errors when using recent compilers which after investigation were -Os
> optimisation errors. (using the latest CodeSourcery toolchain for
> example).
>
I am using the compilers from buildroot.
>
>> Is there someone out there how has the MII mode working?
>>
>
> If I'm correct, Olimex has. So closer inspection of their code may
> reveal some information.
>
> Stelian.
>
Olimex has indeed, but that is a old version of uboot, the old ETHER
driver and not the new. I inspected the initialization code on the ARM
side, that was the same. The rest of te code is completely different, so
spotting differences is difficult.
Sander
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Uboot (AT91 tree) macb in MII mode
2008-04-14 9:19 ` Sander Vermin
@ 2008-04-14 9:41 ` Stelian Pop
2008-04-14 9:52 ` Sander Vermin
0 siblings, 1 reply; 6+ messages in thread
From: Stelian Pop @ 2008-04-14 9:41 UTC (permalink / raw)
To: u-boot
Le lundi 14 avril 2008 ? 11:19 +0200, Sander Vermin a ?crit :
> > Do you have a working Linux kernel with a working network interface ?
> > The Linux and U-Boot macb driver and PIO configuration is very close,
> > and if you manage to make it work under Linux you'll probably have
> > little trouble finding out the problem.
> >
> Are all settings of uboot overwritten by linux?
Almost all the settings are overwritten, yes.
> I am not to comfortable
> hacking in the Linux kernel and I had the focus on Uboot.
So you do not have a working Linux kernel. This was my question.
> >> Olimex was kind enough to make Uboot nandflash build working with there
> >> board, And deliver sources I cant compile, due to an error: Hardware
> >> float vs software float. But I want a dataflash version because I am
> >> using a BGA chip with nandflash bug.
> >>
> >
> > I don't see what NAND has to do with ethernet here.
> >
> The AT91SAM9260 BGA chip has a bug, that booting from NAND has problems.
Ok, but this has nothing to do with the Ethernet, right ? If the
ethernet is supposed to work with their U-Boot version, it will probably
work as well if you configure U-Boot to boot from dataflash instead of
NAND flash.
> > Also, what cross chain are you using ? I have seen strange network
> > errors when using recent compilers which after investigation were -Os
> > optimisation errors. (using the latest CodeSourcery toolchain for
> > example).
> >
> I am using the compilers from buildroot.
This doesn't learn us anything about the gcc version you're using.
The official toolchain for U-Boot is the DENX ELDK:
http://www.denx.de/wiki/DULG/ELDK . I don't really think this is your
issue, but when nothing works it may make sense to put yourself in a
well known configuration.
> Olimex has indeed, but that is a old version of uboot, the old ETHER
> driver and not the new. I inspected the initialization code on the ARM
> side, that was the same. The rest of te code is completely different, so
> spotting differences is difficult.
Ah, I understand. However, there must be a difference somewhere. I'm not
sure about this board, but on the SAM boards a software reset has to be
performed once the PHY address is configured to activate the PHY (look
into at91sam9260.c). Maybe your board needs something equivalent ?
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Uboot (AT91 tree) macb in MII mode
2008-04-14 9:41 ` Stelian Pop
@ 2008-04-14 9:52 ` Sander Vermin
2008-04-14 11:28 ` Stelian Pop
0 siblings, 1 reply; 6+ messages in thread
From: Sander Vermin @ 2008-04-14 9:52 UTC (permalink / raw)
To: u-boot
Stelian Pop schreef:
> Le lundi 14 avril 2008 ? 11:19 +0200, Sander Vermin a ?crit :
>
>
>>> Do you have a working Linux kernel with a working network interface ?
>>> The Linux and U-Boot macb driver and PIO configuration is very close,
>>> and if you manage to make it work under Linux you'll probably have
>>> little trouble finding out the problem.
>>>
>>>
>> Are all settings of uboot overwritten by linux?
>>
>
> Almost all the settings are overwritten, yes.
>
>
Oke, olimex has a demo linux with working ethernet.. I can try to put
this on my board with my current uboot.
>> I am not to comfortable
>> hacking in the Linux kernel and I had the focus on Uboot.
>>
>
> So you do not have a working Linux kernel. This was my question.
>
>
>>>> Olimex was kind enough to make Uboot nandflash build working with there
>>>> board, And deliver sources I cant compile, due to an error: Hardware
>>>> float vs software float. But I want a dataflash version because I am
>>>> using a BGA chip with nandflash bug.
>>>>
>>>>
>>> I don't see what NAND has to do with ethernet here.
>>>
>>>
>> The AT91SAM9260 BGA chip has a bug, that booting from NAND has problems.
>>
>
> Ok, but this has nothing to do with the Ethernet, right ? If the
> ethernet is supposed to work with their U-Boot version, it will probably
> work as well if you configure U-Boot to boot from dataflash instead of
> NAND flash.
>
>
>>> Also, what cross chain are you using ? I have seen strange network
>>> errors when using recent compilers which after investigation were -Os
>>> optimisation errors. (using the latest CodeSourcery toolchain for
>>> example).
>>>
>>>
>> I am using the compilers from buildroot.
>>
>
> This doesn't learn us anything about the gcc version you're using.
>
> The official toolchain for U-Boot is the DENX ELDK:
> http://www.denx.de/wiki/DULG/ELDK . I don't really think this is your
> issue, but when nothing works it may make sense to put yourself in a
> well known configuration.
>
>
Is there some pre compiled arm version?
>> Olimex has indeed, but that is a old version of uboot, the old ETHER
>> driver and not the new. I inspected the initialization code on the ARM
>> side, that was the same. The rest of te code is completely different, so
>> spotting differences is difficult.
>>
>
> Ah, I understand. However, there must be a difference somewhere. I'm not
> sure about this board, but on the SAM boards a software reset has to be
> performed once the PHY address is configured to activate the PHY (look
> into at91sam9260.c). Maybe your board needs something equivalent ?
>
>
Currently I am using the at91sam9260ek config with the options above edited.
Sander
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Uboot (AT91 tree) macb in MII mode
2008-04-14 9:52 ` Sander Vermin
@ 2008-04-14 11:28 ` Stelian Pop
0 siblings, 0 replies; 6+ messages in thread
From: Stelian Pop @ 2008-04-14 11:28 UTC (permalink / raw)
To: u-boot
Le lundi 14 avril 2008 ? 11:52 +0200, Sander Vermin a ?crit :
> >
> > The official toolchain for U-Boot is the DENX ELDK:
> > http://www.denx.de/wiki/DULG/ELDK . I don't really think this is your
> > issue, but when nothing works it may make sense to put yourself in a
> > well known configuration.
> >
> >
> Is there some pre compiled arm version?
ftp://ftp.denx.de/pub/eldk/4.1/arm-linux-x86/iso
ARM support in latest ELDK (4.2) seems to lag a bit ...
> >> Olimex has indeed, but that is a old version of uboot, the old ETHER
> >> driver and not the new. I inspected the initialization code on the ARM
> >> side, that was the same. The rest of te code is completely different, so
> >> spotting differences is difficult.
> >>
> >
> > Ah, I understand. However, there must be a difference somewhere. I'm not
> > sure about this board, but on the SAM boards a software reset has to be
> > performed once the PHY address is configured to activate the PHY (look
> > into at91sam9260.c). Maybe your board needs something equivalent ?
> >
> >
> Currently I am using the at91sam9260ek config with the options above edited.
This means that you're doing the soft-reset sequence I told you above
(in boards/atmel/at91sam9260ek/at91sam9260ek.c). Maybe your board
doesn't need this, try commenting out the relevant code in
at91sam9260ek_macb_hw_init() (keep only the gpio set_A/B_periph().
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-14 11:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 8:10 [U-Boot-Users] Uboot (AT91 tree) macb in MII mode Sander Vermin
2008-04-14 9:08 ` Stelian Pop
2008-04-14 9:19 ` Sander Vermin
2008-04-14 9:41 ` Stelian Pop
2008-04-14 9:52 ` Sander Vermin
2008-04-14 11:28 ` Stelian Pop
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.