IBM/AMCC 440EP ethernet question
I found one part of the problem. The 0x8100 I was writing included the reset bit. When I take that out I can set the command register and read it back. We can now get a link 10Mbps, 100Mbps doesn't work. Auto-negotiate sometimes doesn't work, and sometimes ends up at 10Mbps speed even though both sides should do 100Mbps. We are making progress now at least.
I went through the register definitions and bit field definitions again to see if any I am using aren't right for the 440ep, and I noticed that EMAC_TRTR_128 is 0x01000000 for both 440gx_enet.h and 405gp_enet.h in U-Boot. For the EP, only the 5 most significant bits aren't reserved, and the value in my user manual for EMAC_TRTR_128 is binary 00001. Seems likely that it's the same for other 440s and 405s, and someone made a typo. From the most significant end of the register, 00001... = 0000 1000 = 0x08 != 0x01. It's page 897 of ppc440ep_um.pdf, and that's the only user manual I've got. If anyone has another 440 or 405 user manual handy and would like to check this out I'd appreciate it. Otherwise I'll download a couple other user manuals and if they match mine I'll figure out how to submit a bug report.
Thanks,
Miles
Quoted 22 lines · Miles Gazic
I'm using a 440EP with MII mode selected, and a Broadcom AC101L phy. Autonegotiation was failing, so as an experiment, I tried replacing the start of autonegotiation in
440gx_enet.c, with setting the speed manually. I did amiiphy_writetoPHY_BMCR(the control register) with0x8100(which should specify 10mbps, full duplex). Themiiphy_writereturns 0 which means it doesn't think it failed, but when I look at the value in the control register as spit out bymiiphy_dump, it is still0x3000(which is 100mbps and half-duplex), which is the same value I always see there.I don't think this is just a U-boot problem because I can duplicate what's happening using just a Abatron BDI2000. When I write a
0x81002400into theEMAC_STACRregister (which should set the control register of the phy to0x8100), and then write a0x00001400intoEMAC_STACR(which should request a read of the same register), and then look at theEMAC_STACRregister in the debugger, it has the same0x3000as I see in U-Boot. It seems likely to me though that if anyone has gotten the 440EP to work with MII in U-Boot, then they might be able to shed some light on what is going wrong for me.Any advice is appreciated,
Miles
Quoted 8 lines · Miles Gazic
I went through the register definitions and bit field definitions again to see if any I am using aren't right for the 440ep, and I noticed that
EMAC_TRTR_128is0x01000000for both440gx_enet.hand405gp_enet.hin U-Boot. For the EP, only the 5 most significant bits aren't reserved, and the value in my user manual forEMAC_TRTR_128is binary 00001. Seems likely that it's the same for other 440s and 405s, and someone made a typo. From the most significant end of the register, 00001... = 0000 1000 =0x08!=0x01.
My user manual says the same, and I believe that this is just a typo in 405gp_enet.h (as the other definitions match the user manual.) That said, I've found many errors in multiple versions of the 440EP User Manual so I've been going with more what works than what the User Manual says (in fact when trying to use the Nand Flash Controller we had to set some reserved bits.)
Quoted 5 lines
It's page 897 of ppc440ep_um.pdf, and that's the only
user manual I've got. If anyone has another 440 or 405 user manual handy and would like to check this out I'd appreciate it. Otherwise I'll download a couple other user manuals and if they match mine I'll figure out how to submit a bug report.
My most current user manual is Version 1.1 Dated December 3, 2004.
Regards,
Signature · 2 lines
Bradley Remedios bremedios at gmail.com