[ELDK] PPC 405EX ethernet in MII mode instead of RGMII?

Felix Radensky felix at embedded-sol.com
Tue May 5 21:30:51 CEST 2009


Hi, Nathan

Nathan French wrote:
> I'm bringing up a board that is similar to a Kilauea/Halakea but with a
> NatSemi DP83640 ethernet phy.  We've wired the phy up for MII mode and
> have it working with U-Boot after some slight modifications to U-Boot
> (setting the phy address and MII mode for EMAC0).
> 
> Now I've got linux running on the board.  I'm using a kernel config from
> AMCC.  I see that linux is seeing the phy at the right address (0x11)
> and configuring it for RGMII (not the mode we're using).  Here's a
> snippet from the kernel log:
> 
> ~ # grep MII /var/log/messages 
> Dec 31 18:00:13 kilauea user.info kernel:
> RGMII /plb/opb/emac-rgmii at ef600b00 initialized with MDIO support
> Dec 31 18:00:13 kilauea user.notice
> kernel: /plb/opb/emac-rgmii at ef600b00: input 0 in RGMII mode
> Dec 31 18:00:13 kilauea user.warn kernel: eth0: found Generic MII PHY
> (0x11)
> 
> I tried defining CONFIG_MII=y in my kernel config since it is disabled
> in the AMCC config.  I didn't see a change.
> 
> I took a quick look at arch/ppc/platforms/4xx/kilauea.c and it looks
> like the EMAC0 is hard-coded for RGMII.
> 
> I'm a little green with linux (developed a couple simple PCI drivers,
> nothing complicated) so I don't really know the right way to attack
> this.  Can someone point me in the right direction?
> 

You should modify your board's DTS file (Kilauea DTS is
${KERNEL_SRC}/arch/powerpc/boot/dts/kilauea.dts), and set

phy_mode = "mii"

in EMAC0 node.

You should then compile DTS using dtc tool:

${KERNEL_SRC}/arch/powerpc/boot/dtc -I dts -O dtb -o kilauea.dtb \
	${KERNEL_SRC}/arch/powerpc/boot/dts/kilauea.dts

The resulting dtb file should be either programmed into flash or put on
tftp server (depending on your boot setup).

Felix.



More information about the eldk mailing list