public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] U-boot timeout with KSZ8021 phy
@ 2013-07-11 19:13 Alexandre Pereira da Silva
  2013-07-11 19:55 ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Pereira da Silva @ 2013-07-11 19:13 UTC (permalink / raw)
  To: u-boot

Hi,

I am trying to make my ethernet work with u-boot on a custom IMX28 board.

This board uses the micrel KSZ8021 phy.

The network works fine on linux but won't work properly on u-boot.

Here is the output:
=> dhcp
BOOTP broadcast 1
DHCP client bound to address 192.168.1.103
Using FEC device
TFTP from server 192.168.1.54; our IP address is 192.168.1.103
Filename 'uImage'.
Load address: 0x42000000
Loading: T T T T

I am using the apx4devkit board configuration as a base for my port,
but adapted the phy setting to the KSZ8021 needed value. If that phy
configuration value is wrong, it doesn't even get an IP address from
DHCP.

Marek's patch about cache didn't help much in my case.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-11 19:13 [U-Boot] U-boot timeout with KSZ8021 phy Alexandre Pereira da Silva
@ 2013-07-11 19:55 ` Marek Vasut
  2013-07-11 20:13   ` Alexandre Pereira da Silva
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2013-07-11 19:55 UTC (permalink / raw)
  To: u-boot

Dear Alexandre Pereira da Silva,

> Hi,
> 
> I am trying to make my ethernet work with u-boot on a custom IMX28 board.
> 
> This board uses the micrel KSZ8021 phy.
> 
> The network works fine on linux but won't work properly on u-boot.
> 
> Here is the output:
> => dhcp
> BOOTP broadcast 1
> DHCP client bound to address 192.168.1.103
> Using FEC device
> TFTP from server 192.168.1.54; our IP address is 192.168.1.103
> Filename 'uImage'.
> Load address: 0x42000000
> Loading: T T T T
> 
> I am using the apx4devkit board configuration

Seems unmaintained :-(

> as a base for my port,
> but adapted the phy setting to the KSZ8021 needed value. If that phy
> configuration value is wrong, it doesn't even get an IP address from
> DHCP.
> 
> Marek's patch about cache didn't help much in my case.

Try "dcache off" on command line, do you have any luck then ?

Also try copying the network section from M28EVK, as M28EVK uses KSZ8021 PHYs. I 
also noticed the M28EVK resets the PHYs, so maybe you need to handle that ? On 
M28EVK this is handled in board/denx/m28evk/m28evk.c

Moreover, check if your CLKCTRL ENET settings are correct, that's also handled 
in the same function as the PHY reset on M28EVK I think (or at least in the same 
section).

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-11 19:55 ` Marek Vasut
@ 2013-07-11 20:13   ` Alexandre Pereira da Silva
  2013-07-11 20:36     ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Pereira da Silva @ 2013-07-11 20:13 UTC (permalink / raw)
  To: u-boot

On Thu, Jul 11, 2013 at 4:55 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Alexandre Pereira da Silva,
>
>> Hi,
>>
>> I am trying to make my ethernet work with u-boot on a custom IMX28 board.
>>
>> This board uses the micrel KSZ8021 phy.
>>
>> The network works fine on linux but won't work properly on u-boot.
>>
>> Here is the output:
>> => dhcp
>> BOOTP broadcast 1
>> DHCP client bound to address 192.168.1.103
>> Using FEC device
>> TFTP from server 192.168.1.54; our IP address is 192.168.1.103
>> Filename 'uImage'.
>> Load address: 0x42000000
>> Loading: T T T T
>>
>> I am using the apx4devkit board configuration
>
> Seems unmaintained :-(
>
>> as a base for my port,
>> but adapted the phy setting to the KSZ8021 needed value. If that phy
>> configuration value is wrong, it doesn't even get an IP address from
>> DHCP.
>>
>> Marek's patch about cache didn't help much in my case.
>
> Try "dcache off" on command line, do you have any luck then ?

dcache off doesn't help either.

> Also try copying the network section from M28EVK, as M28EVK uses KSZ8021 PHYs. I
> also noticed the M28EVK resets the PHYs, so maybe you need to handle that ? On
> M28EVK this is handled in board/denx/m28evk/m28evk.c

By mistake, I forgot to add reset pin for the phy, so I am leaving the
phy always enabled.

I did try using M28EVK and MX28EVK board ports as well, but none worked so far.

Do I have do anything special for the NC pins of IMX280?

> Moreover, check if your CLKCTRL ENET settings are correct, that's also handled
> in the same function as the PHY reset on M28EVK I think (or at least in the same
> section).

That doesn't seem to be wrong. I see a clean 50MHZ clock on that pin.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-11 20:13   ` Alexandre Pereira da Silva
@ 2013-07-11 20:36     ` Marek Vasut
  2013-07-12  3:53       ` Alexandre Pereira da Silva
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2013-07-11 20:36 UTC (permalink / raw)
  To: u-boot

Dear Alexandre Pereira da Silva,

> On Thu, Jul 11, 2013 at 4:55 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Alexandre Pereira da Silva,
> > 
> >> Hi,
> >> 
> >> I am trying to make my ethernet work with u-boot on a custom IMX28
> >> board.
> >> 
> >> This board uses the micrel KSZ8021 phy.
> >> 
> >> The network works fine on linux but won't work properly on u-boot.
> >> 
> >> Here is the output:
> >> => dhcp
> >> BOOTP broadcast 1
> >> DHCP client bound to address 192.168.1.103
> >> Using FEC device
> >> TFTP from server 192.168.1.54; our IP address is 192.168.1.103
> >> Filename 'uImage'.
> >> Load address: 0x42000000
> >> Loading: T T T T
> >> 
> >> I am using the apx4devkit board configuration
> > 
> > Seems unmaintained :-(
> > 
> >> as a base for my port,
> >> but adapted the phy setting to the KSZ8021 needed value. If that phy
> >> configuration value is wrong, it doesn't even get an IP address from
> >> DHCP.
> >> 
> >> Marek's patch about cache didn't help much in my case.
> > 
> > Try "dcache off" on command line, do you have any luck then ?
> 
> dcache off doesn't help either.
> 
> > Also try copying the network section from M28EVK, as M28EVK uses KSZ8021
> > PHYs. I also noticed the M28EVK resets the PHYs, so maybe you need to
> > handle that ? On M28EVK this is handled in board/denx/m28evk/m28evk.c
> 
> By mistake, I forgot to add reset pin for the phy, so I am leaving the
> phy always enabled.

You really should reset it upon boot, it might be in some confused state.

> I did try using M28EVK and MX28EVK board ports as well, but none worked so
> far.

Can you elaborate?

> Do I have do anything special for the NC pins of IMX280?

No, just make sure your ethernet pinmux is correct too.

> > Moreover, check if your CLKCTRL ENET settings are correct, that's also
> > handled in the same function as the PHY reset on M28EVK I think (or at
> > least in the same section).
> 
> That doesn't seem to be wrong. I see a clean 50MHZ clock on that pin.

Make sure to check the direction too, it can go either from phy to fec or the 
other way IIRC.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-11 20:36     ` Marek Vasut
@ 2013-07-12  3:53       ` Alexandre Pereira da Silva
  2013-07-12  4:06         ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Pereira da Silva @ 2013-07-12  3:53 UTC (permalink / raw)
  To: u-boot

On Thu, Jul 11, 2013 at 5:36 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Alexandre Pereira da Silva,
>
>> On Thu, Jul 11, 2013 at 4:55 PM, Marek Vasut <marex@denx.de> wrote:
>
> Make sure to check the direction too, it can go either from phy to fec or the
> other way IIRC.

Ok, it seems this was caused by a bad tftp server and not by the board itself.

I can confirm KSZ8021 is functional, after defining CONFIG_PHYLIB to mx28evk.h

Thanks

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-12  3:53       ` Alexandre Pereira da Silva
@ 2013-07-12  4:06         ` Marek Vasut
  2013-07-12  4:37           ` Alexandre Pereira da Silva
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2013-07-12  4:06 UTC (permalink / raw)
  To: u-boot

Dear Alexandre Pereira da Silva,

> On Thu, Jul 11, 2013 at 5:36 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Alexandre Pereira da Silva,
> > 
> >> On Thu, Jul 11, 2013 at 4:55 PM, Marek Vasut <marex@denx.de> wrote:
> > Make sure to check the direction too, it can go either from phy to fec or
> > the other way IIRC.
> 
> Ok, it seems this was caused by a bad tftp server and not by the board
> itself.
> 
> I can confirm KSZ8021 is functional, after defining CONFIG_PHYLIB to
> mx28evk.h

OK, good to hear! Btw. the MX28EVK uses LAN8720 PHY, it is the M28EVK that uses 
the Micrel PHY.

btw. I suspect you should really split away your platform into separate space 
instead of hacking around various boards ;-)

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-12  4:06         ` Marek Vasut
@ 2013-07-12  4:37           ` Alexandre Pereira da Silva
  2013-07-12  4:40             ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Pereira da Silva @ 2013-07-12  4:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 12, 2013 at 1:06 AM, Marek Vasut <marex@denx.de> wrote:
> Dear Alexandre Pereira da Silva,
>
>> On Thu, Jul 11, 2013 at 5:36 PM, Marek Vasut <marex@denx.de> wrote:
>> > Dear Alexandre Pereira da Silva,
>> >
>> >> On Thu, Jul 11, 2013 at 4:55 PM, Marek Vasut <marex@denx.de> wrote:
>> > Make sure to check the direction too, it can go either from phy to fec or
>> > the other way IIRC.
>>
>> Ok, it seems this was caused by a bad tftp server and not by the board
>> itself.
>>
>> I can confirm KSZ8021 is functional, after defining CONFIG_PHYLIB to
>> mx28evk.h
>
> OK, good to hear! Btw. the MX28EVK uses LAN8720 PHY, it is the M28EVK that uses
> the Micrel PHY.
>
> btw. I suspect you should really split away your platform into separate space
> instead of hacking around various boards ;-)

Yes, I will do that, but the first priority was to get it working :-)

Thanks for your help solving this issue.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] U-boot timeout with KSZ8021 phy
  2013-07-12  4:37           ` Alexandre Pereira da Silva
@ 2013-07-12  4:40             ` Marek Vasut
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2013-07-12  4:40 UTC (permalink / raw)
  To: u-boot

Dear Alexandre Pereira da Silva,

> On Fri, Jul 12, 2013 at 1:06 AM, Marek Vasut <marex@denx.de> wrote:
> > Dear Alexandre Pereira da Silva,
> > 
> >> On Thu, Jul 11, 2013 at 5:36 PM, Marek Vasut <marex@denx.de> wrote:
> >> > Dear Alexandre Pereira da Silva,
> >> > 
> >> >> On Thu, Jul 11, 2013 at 4:55 PM, Marek Vasut <marex@denx.de> wrote:
> >> > Make sure to check the direction too, it can go either from phy to fec
> >> > or the other way IIRC.
> >> 
> >> Ok, it seems this was caused by a bad tftp server and not by the board
> >> itself.
> >> 
> >> I can confirm KSZ8021 is functional, after defining CONFIG_PHYLIB to
> >> mx28evk.h
> > 
> > OK, good to hear! Btw. the MX28EVK uses LAN8720 PHY, it is the M28EVK
> > that uses the Micrel PHY.
> > 
> > btw. I suspect you should really split away your platform into separate
> > space instead of hacking around various boards ;-)
> 
> Yes, I will do that, but the first priority was to get it working :-)
> 
> Thanks for your help solving this issue.

No problem, nice to hear it works ;-)

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-12  4:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 19:13 [U-Boot] U-boot timeout with KSZ8021 phy Alexandre Pereira da Silva
2013-07-11 19:55 ` Marek Vasut
2013-07-11 20:13   ` Alexandre Pereira da Silva
2013-07-11 20:36     ` Marek Vasut
2013-07-12  3:53       ` Alexandre Pereira da Silva
2013-07-12  4:06         ` Marek Vasut
2013-07-12  4:37           ` Alexandre Pereira da Silva
2013-07-12  4:40             ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox