Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 2008 09:47:56 +0800
From:      "Sepherosa Ziehau" <sepherosa@gmail.com>
To:        "Bruce M. Simpson" <bms@freebsd.org>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: How to support an Ethernet PHY without ID registers?
Message-ID:  <ea7b9c170810141847r1febc650ocbbb2a459fe0f7bc@mail.gmail.com>
In-Reply-To: <48F067EF.7010901@FreeBSD.org>
References:  <48EBB3D6.600@incunabulum.net> <ea7b9c170810072051i637f6963v209a3fd1d9c123fa@mail.gmail.com> <48F067EF.7010901@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 11, 2008 at 4:46 PM, Bruce M. Simpson <bms@freebsd.org> wrote:
> Sepherosa Ziehau wrote:
>>
>> Are you sure you could read from BMSR?  Return invalid value from BMSR
>> is the usual cause of miibus attaching/probing failure.  For ID1/ID2
>> reading, you could just fake some values in npe(4)'s miibus_readreg
>> implementation.
>>
>
> Thanks for the tip (from you and Pyun). I had to spoof the BMSR read to get
> npe(4) to attach just to begin with. For whatever reason the chip doesn't
> seem to respond on any of the PHY IDs which the Linux folk are using (5 and
> 4 for npe0 (-B) and npe1 (-C) respectively).
>
> I noticed the ucLinux folk needed a similar patch to force driver attach
> under Linux w/the IXP:
> http://mailman.uclinux.org/pipermail/uclinux-dev/2005-March/031419.html
>
> The switch pretty much disappears after npe(4) attaches, I don't see any
> activity lights or link lights at that point. This seems to happen after any
> mii register access.
>
> If I frob things to allow rlswitch to attach, by using hints and hacking
> if_npe.c, I can get dumps of the PHY register space, but it's all ones,
> suggesting that it failed at xScale register level -- that would suggest the
> PHY IDs are *wrong*, or something else isn't right.
>
> Pyun also suggested trying to manually take the PHYs out of power-down mode.
> I tried that with a code snippet I sent him, but still no dice. I can't even
> be sure that the PHYs are being addressed right.

Realtek's 8211[BC] PHY has a "page selector" register (0x1f), BMSR and
other GMII standard registers are in page0.  Does the PHY you are
working with has something like the "page selector"?

Best Regards,
sephe

-- 
Live Free or Die



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ea7b9c170810141847r1febc650ocbbb2a459fe0f7bc>