* MPC8272 FCC2 MDIO on Port D and FS_ENET
@ 2008-02-11 19:45 Show Man
2008-02-11 21:26 ` NM
0 siblings, 1 reply; 4+ messages in thread
From: Show Man @ 2008-02-11 19:45 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2516 bytes --]
As part of the port of our device (MPC8271 based) from 2.6.23 using arch/ppc to 2.6.24 arch/powerpc, I've hit a road block in the past few days in trying to make FS_ENET (freescale)/CPM2 recognize the BCM5221 PHY, which means I can't get eth0 up and running.
It worked fine in 2.26.23 arch/ppc when configured as FEC_ENET.
As far as I can tell, the "dts" is fine for FCC2 (see below), with the proper pins connected to the device/phy:
mdio@10d60 {
device_type = "mdio";
compatible = "fsl,mpc8272ads-mdio-bitbang",
"fsl,mpc8272-mdio-bitbang",
"fsl,cpm2-mdio-bitbang";
reg = <10d60 14>;
#address-cells = <1>;
#size-cells = <0>;
fsl,mdio-pin = <1d>;
fsl,mdc-pin = <17>;
PHY0: ethernet-phy@0 {
interrupt-parent = <&PIC>;
interrupts = <31 8>;
reg = <4>;
device_type = "ethernet-phy";
};
};
ethernet@11320 {
device_type = "network";
compatible = "fsl,mpc8272-fcc-enet",
"fsl,cpm2-fcc-enet";
reg = <11320 20 8500 100 113b0 1>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <21 8>;
interrupt-parent = <&PIC>;
phy-handle = <&PHY0>;
linux,network-index = <0>;
fsl,cpm-command = <16200300>;
};
During my debugging, it appears to be that the PHY is not detected during
drivers/net/phy/phy_device.c: get_phy_device(..)
Basically, the phy_id is 0xFFFFFFFF.
I'm going to try to put a probe on the MDIO/MDC lines later on, but I was wondering whether anyone would have any ideas as to what could be wrong.
thanks
---------------------------------
Looking for the perfect gift? Give the gift of Flickr!
[-- Attachment #2: Type: text/html, Size: 7730 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MPC8272 FCC2 MDIO on Port D and FS_ENET
2008-02-11 19:45 MPC8272 FCC2 MDIO on Port D and FS_ENET Show Man
@ 2008-02-11 21:26 ` NM
2008-02-11 21:39 ` Scott Wood
0 siblings, 1 reply; 4+ messages in thread
From: NM @ 2008-02-11 21:26 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
My problem is solved now after probing the lines, MDC was not showing any activity.
So, after explicitly setting the PD23 (MDC) to : OUTPUT/GPIO in mpc8272_ads_pins and it worked in
I'd previously thought about that, but I was sure that this was being taken care of, but now that I'm thinking of it, I'm questioning my belief.
I think in the fs_enet/mii-bitbang.c: mdio_dir(..) it is supposed to take care of this. But why I had to explictly set it initially beats me. I wonder how this works in standard distribution.
thanks
---------------------------------
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail
[-- Attachment #2: Type: text/html, Size: 770 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MPC8272 FCC2 MDIO on Port D and FS_ENET
2008-02-11 21:26 ` NM
@ 2008-02-11 21:39 ` Scott Wood
2008-02-11 22:04 ` NM
0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2008-02-11 21:39 UTC (permalink / raw)
To: NM; +Cc: linuxppc-embedded
NM wrote:
> My problem is solved now after probing the lines, MDC was not showing
> any activity.
> So, after explicitly setting the PD23 (MDC) to : OUTPUT/GPIO in
> mpc8272_ads_pins and it worked in
>
> I'd previously thought about that, but I was sure that this was being
> taken care of, but now that I'm thinking of it, I'm questioning my belief.
> I think in the fs_enet/mii-bitbang.c: mdio_dir(..) it is supposed to
> take care of this.
No, the mdc pin is static; only bits which need to be changed
dynamically are dealt with in mii-bitbang.c. Either the firmware or the
platform code should set up static pins.
> But why I had to explictly set it initially beats me.
> I wonder how this works in standard distribution.
It's probably set up by u-boot normally, at least if you boot from ethernet.
-Scott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MPC8272 FCC2 MDIO on Port D and FS_ENET
2008-02-11 21:39 ` Scott Wood
@ 2008-02-11 22:04 ` NM
0 siblings, 0 replies; 4+ messages in thread
From: NM @ 2008-02-11 22:04 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]
Thanks Scott,
I do boot from U-BOOT, via Ethernet, but I'd never set the MDIO/MDC in U-BOOT. Actually, looking at the u-boot 's MPC8260ADS.h now, it is still setting the default 8272ADS boards' PC18/19 for MDC/MDIO - and my unit is using PD23/29.
I guess U-BOOT is probably working (for me) since it probably defaults to the defaults of PHY and maybe not checking for PHY errors???
I guess, it is probably worthwhile having the MDIO/MDC pins also set up explicitly in mpc8272_ads_pins as opposed to relying on the boot loader.
Scott Wood <scottwood@freescale.com> wrote: NM wrote:
> My problem is solved now after probing the lines, MDC was not showing
> any activity.
> So, after explicitly setting the PD23 (MDC) to : OUTPUT/GPIO in
> mpc8272_ads_pins and it worked in
>
> I'd previously thought about that, but I was sure that this was being
> taken care of, but now that I'm thinking of it, I'm questioning my belief.
> I think in the fs_enet/mii-bitbang.c: mdio_dir(..) it is supposed to
> take care of this.
No, the mdc pin is static; only bits which need to be changed
dynamically are dealt with in mii-bitbang.c. Either the firmware or the
platform code should set up static pins.
> But why I had to explictly set it initially beats me.
> I wonder how this works in standard distribution.
It's probably set up by u-boot normally, at least if you boot from ethernet.
-Scott
---------------------------------
Looking for the perfect gift? Give the gift of Flickr!
[-- Attachment #2: Type: text/html, Size: 1823 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-11 22:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 19:45 MPC8272 FCC2 MDIO on Port D and FS_ENET Show Man
2008-02-11 21:26 ` NM
2008-02-11 21:39 ` Scott Wood
2008-02-11 22:04 ` NM
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).