* Using fixed_phy with gianfar
@ 2007-01-09 23:23 Ben Warren
2007-01-10 13:11 ` Vitaly Bordug
2007-01-10 22:41 ` Andy Fleming
0 siblings, 2 replies; 6+ messages in thread
From: Ben Warren @ 2007-01-09 23:23 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
My custom board has a couple of Ethernet switches attached via RvMII to
the 'Gianfar' controllers of an MPC8349 CPU. We're using SPI instead of
MDIO for control of the switches, and it looked like the 'fixed.c' PHY
driver was the right thing to use. BTW, I'm using a 2.6.19 kernel.
When I 'ifconfig up' one of the interfaces, the Gianfar driver tries to
find a device on the MDIO bus of the variety bus_id:phy_id, where both
bus_id and phy_id are numeric (defined in fsl_devices.h). The Fixed PHY
driver creates devices on the MDIO bus with a bus_id that is a string,
for example "fixed_1@100:1". Obviously, these will never match up. The
very crude hack I made to get things working was to modify the Gianfar
driver to match the "fixed" string.
I'm sure I'm missing something, and am wondering what the correct way to
do this is. Should I have board-specific code that creates PHY devices
conforming to the Gianfar expectations instead of calling
'fixed_mdio_register_device()', or something else?
thanks,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using fixed_phy with gianfar
2007-01-09 23:23 Using fixed_phy with gianfar Ben Warren
@ 2007-01-10 13:11 ` Vitaly Bordug
2007-01-10 14:22 ` Ben Warren
2007-01-10 22:41 ` Andy Fleming
1 sibling, 1 reply; 6+ messages in thread
From: Vitaly Bordug @ 2007-01-10 13:11 UTC (permalink / raw)
To: bwarren; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]
On Tue, 09 Jan 2007 18:23:58 -0500
Ben Warren wrote:
> Hello,
>
> My custom board has a couple of Ethernet switches attached via RvMII
> to the 'Gianfar' controllers of an MPC8349 CPU. We're using SPI
> instead of MDIO for control of the switches, and it looked like the
> 'fixed.c' PHY driver was the right thing to use. BTW, I'm using a
> 2.6.19 kernel.
>
> When I 'ifconfig up' one of the interfaces, the Gianfar driver tries
> to find a device on the MDIO bus of the variety bus_id:phy_id, where
> both bus_id and phy_id are numeric (defined in fsl_devices.h). The
> Fixed PHY driver creates devices on the MDIO bus with a bus_id that
> is a string, for example "fixed_1@100:1". Obviously, these will
> never match up. The very crude hack I made to get things working was
> to modify the Gianfar driver to match the "fixed" string.
>
> I'm sure I'm missing something, and am wondering what the correct way
> to do this is. Should I have board-specific code that creates PHY
> devices conforming to the Gianfar expectations instead of calling
> 'fixed_mdio_register_device()', or something else?
No, you do not miss - this is an issue. In fact MDIO bus was changed for numeric for gianfar-stuff, and has been remaining string for fs_enet. I think it makes sense to average this up, and will try to do that once will get 8349-mitx which is gianfar+ fixed user.
The point is that fixed should be updated to numeric MDIO address encoding. This has to come through netdev, so I'll try to get it fixed by the next merge window.
--
Sincerely, Vitaly
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using fixed_phy with gianfar
2007-01-10 13:11 ` Vitaly Bordug
@ 2007-01-10 14:22 ` Ben Warren
2007-01-10 16:04 ` Vitaly Bordug
0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2007-01-10 14:22 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded
Thanks Vitaly!
--- Vitaly Bordug <vbordug@ru.mvista.com> wrote:
> No, you do not miss - this is an issue. In fact MDIO
> bus was changed for numeric for gianfar-stuff, and
> has been remaining string for fs_enet. I think it
> makes sense to average this up, and will try to do
> that once will get 8349-mitx which is gianfar+ fixed
> user.
>
> The point is that fixed should be updated to numeric
> MDIO address encoding. This has to come through
> netdev, so I'll try to get it fixed by the next
> merge window.
>
> --
> Sincerely, Vitaly
>
Ideally (for me anyway), we'd be able to pass some
fixed phy information via the device tree, for example
speed and duplexity. This way a board could, for
example, connect to one switch via RvMII @100FD and
another via GMII @1000FD. Having parameters as
numeric limits this capability, but presumably a
simple encoding scheme could be make it work.
I'm sure you've already thought of this, though...
cheers,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using fixed_phy with gianfar
2007-01-10 14:22 ` Ben Warren
@ 2007-01-10 16:04 ` Vitaly Bordug
2007-01-10 17:01 ` Ben Warren
0 siblings, 1 reply; 6+ messages in thread
From: Vitaly Bordug @ 2007-01-10 16:04 UTC (permalink / raw)
To: Ben Warren; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
On Wed, 10 Jan 2007 06:22:40 -0800 (PST)
Ben Warren wrote:
> Thanks Vitaly!
>
> --- Vitaly Bordug <vbordug@ru.mvista.com> wrote:
>
> > No, you do not miss - this is an issue. In fact MDIO
> > bus was changed for numeric for gianfar-stuff, and
> > has been remaining string for fs_enet. I think it
> > makes sense to average this up, and will try to do
> > that once will get 8349-mitx which is gianfar+ fixed
> > user.
> >
> > The point is that fixed should be updated to numeric
> > MDIO address encoding. This has to come through
> > netdev, so I'll try to get it fixed by the next
> > merge window.
> >
> > --
> > Sincerely, Vitaly
> >
>
> Ideally (for me anyway), we'd be able to pass some
> fixed phy information via the device tree, for example
> speed and duplexity. This way a board could, for
> example, connect to one switch via RvMII @100FD and
> another via GMII @1000FD. Having parameters as
> numeric limits this capability, but presumably a
> simple encoding scheme could be make it work.
>
> I'm sure you've already thought of this, though...
Yes, I was thinking about something like 0:1001 or 0:101 where 1 at the end respects duplexity.
Putting it into devtree is good but we'll need to unify the interface first.
--
Sincerely, Vitaly
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using fixed_phy with gianfar
2007-01-10 16:04 ` Vitaly Bordug
@ 2007-01-10 17:01 ` Ben Warren
0 siblings, 0 replies; 6+ messages in thread
From: Ben Warren @ 2007-01-10 17:01 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded
Vitaly,
>
> Yes, I was thinking about something like 0:1001 or
> 0:101 where 1 at the end respects duplexity.
> Putting it into devtree is good but we'll need to
> unify the interface first.
>
I'm sure you're working on lots of other things right
now, so I'll go ahead and code something like this up
and will pass it to you. You can then
keep/modify/discard as you like.
regards,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using fixed_phy with gianfar
2007-01-09 23:23 Using fixed_phy with gianfar Ben Warren
2007-01-10 13:11 ` Vitaly Bordug
@ 2007-01-10 22:41 ` Andy Fleming
1 sibling, 0 replies; 6+ messages in thread
From: Andy Fleming @ 2007-01-10 22:41 UTC (permalink / raw)
To: bwarren; +Cc: linuxppc-embedded
On Jan 9, 2007, at 17:23, Ben Warren wrote:
> Hello,
>
> My custom board has a couple of Ethernet switches attached via
> RvMII to
> the 'Gianfar' controllers of an MPC8349 CPU. We're using SPI
> instead of
> MDIO for control of the switches, and it looked like the 'fixed.c' PHY
> driver was the right thing to use. BTW, I'm using a 2.6.19 kernel.
That sounds reasonable.
>
> When I 'ifconfig up' one of the interfaces, the Gianfar driver
> tries to
> find a device on the MDIO bus of the variety bus_id:phy_id, where both
> bus_id and phy_id are numeric (defined in fsl_devices.h). The
> Fixed PHY
> driver creates devices on the MDIO bus with a bus_id that is a string,
> for example "fixed_1@100:1". Obviously, these will never match
> up. The
> very crude hack I made to get things working was to modify the Gianfar
> driver to match the "fixed" string.
Yeah, that needs to be fixed.
*Adds to list*
Andy
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-01-10 22:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 23:23 Using fixed_phy with gianfar Ben Warren
2007-01-10 13:11 ` Vitaly Bordug
2007-01-10 14:22 ` Ben Warren
2007-01-10 16:04 ` Vitaly Bordug
2007-01-10 17:01 ` Ben Warren
2007-01-10 22:41 ` Andy Fleming
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).