[PATCH] Add Broadcom PHY support

STALE7211d

10 messages, 5 authors, 2006-12-05 · open the first message on its own page

[PATCH] Add Broadcom PHY support

From: Amy Fong <hidden>
Date: 2006-09-15 20:15:56

[PATCH] Add Broadcom PHY support

This patch adds a driver to support the bcm5421s and bcm5461s PHY

Kernel version:  linux-2.6.18-rc6

Signed-off-by: Amy Fong <redacted>

Re: [PATCH] Add Broadcom PHY support

From: Jeff Garzik <hidden>
Date: 2006-09-19 04:39:56

Amy Fong wrote:
[PATCH] Add Broadcom PHY support

This patch adds a driver to support the bcm5421s and bcm5461s PHY

Kernel version:  linux-2.6.18-rc6

Signed-off-by: Amy Fong <redacted>
And... where are the users of this phy driver?

	Jeff


Re: [PATCH] Add Broadcom PHY support

From: Amy Fong <hidden>
Date: 2006-09-19 13:36:18

[ Charset ISO-8859-1 unsupported, converting... ]
Amy Fong wrote:
quoted
[PATCH] Add Broadcom PHY support

This patch adds a driver to support the bcm5421s and bcm5461s PHY

Kernel version:  linux-2.6.18-rc6

Signed-off-by: Amy Fong <redacted>
And... where are the users of this phy driver?

	Jeff
This phy driver is used by the WRS's sbc8560 (bcm5421s) and sbc843x (bcm5461s) via the gianfar driver.

Amy

Re: [PATCH] Add Broadcom PHY support

From: Maciej W. Rozycki <hidden>
Date: 2006-09-19 13:43:57

On Tue, 19 Sep 2006, Amy Fong wrote:
quoted
And... where are the users of this phy driver?
[...]
This phy driver is used by the WRS's sbc8560 (bcm5421s) and sbc843x 
(bcm5461s) via the gianfar driver.
 And sb1250-mac.c would be happy to use it too.

  Maciej

Re: [PATCH] Add Broadcom PHY support

From: Jeff Garzik <hidden>
Date: 2006-09-19 16:46:00

Maciej W. Rozycki wrote:
On Tue, 19 Sep 2006, Amy Fong wrote:
quoted
quoted
And... where are the users of this phy driver?
[...]
quoted
This phy driver is used by the WRS's sbc8560 (bcm5421s) and sbc843x 
(bcm5461s) via the gianfar driver.
 And sb1250-mac.c would be happy to use it too.
"would be happy to" != "is using".   I don't want to add a phy driver 
until there are already active users in the kernel.

	Jeff


Re: [PATCH] Add Broadcom PHY support

From: Maciej W. Rozycki <hidden>
Date: 2006-09-19 17:10:19

On Tue, 19 Sep 2006, Jeff Garzik wrote:
quoted
 And sb1250-mac.c would be happy to use it too.
"would be happy to" != "is using".   I don't want to add a phy driver until
there are already active users in the kernel.
 Fair enough, but Amy may be looking forward to seeing yet another piece 
of code using the new driver. ;-)

  Maciej

Re: [PATCH] Add Broadcom PHY support

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-12-04 21:16:51

On Fri, 2006-09-15 at 16:15 -0400, Amy Fong wrote:
[PATCH] Add Broadcom PHY support

This patch adds a driver to support the bcm5421s and bcm5461s PHY

Kernel version:  linux-2.6.18-rc6

Signed-off-by: Amy Fong 
Some 5421's need special initialisation (see drivers/net/sungem_phy.c),
might be worth having them there too. I was also wondering... for
spidernet, we need to enable the fiber mode on the PHY. Does phylib has
an API for that ?

I'd like to look into moving sungem and spidernet over to phylib.

Ben.

Re: [PATCH] Add Broadcom PHY support

From: Amy Fong <hidden>
Date: 2006-12-05 05:55:36

On Fri, 2006-09-15 at 16:15 -0400, Amy Fong wrote:
quoted
[PATCH] Add Broadcom PHY support

This patch adds a driver to support the bcm5421s and bcm5461s PHY

Kernel version:  linux-2.6.18-rc6

Signed-off-by: Amy Fong 
Some 5421's need special initialisation (see drivers/net/sungem_phy.c),
might be worth having them there too. I was also wondering... for
spidernet, we need to enable the fiber mode on the PHY. Does phylib has
an API for that ?

I'd like to look into moving sungem and spidernet over to phylib.

Ben.

I believe that this fiber enabling can be done by defining config_init in the phy_driver struct.

struct phy_driver {
<snip>
        /* Called to initialize the PHY,
	 * including after a reset */
	int (*config_init)(struct phy_device *phydev);
<snip>
};

ie.

static struct phy_driver bcm5421s_driver = {
<snip>
	.config_init = bcm5421s_phy_config,
<snip>
};

int bcm5421s_phy_config(struct phy_device *phydev)
{
...
	/* enable fiber mode here... */
...
}

Amy

Re: [PATCH] Add Broadcom PHY support

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-12-05 06:03:14

I believe that this fiber enabling can be done by defining config_init in the phy_driver struct.

struct phy_driver {
<snip>
        /* Called to initialize the PHY,
	 * including after a reset */
	int (*config_init)(struct phy_device *phydev);
<snip>
};
Well... I don't know for sure... thing is, enabling the fiber mode is a
rather platform specific thing. So it's the MAC driver that knows wether
it wants it on a PHY and should call into the driver.

It's difficult to abstract all possible PHY config options tho... some
MACs might want to enable low power, some don't because they have issues
with it, that sort of thing, though.

Not sure what the best solution is at this point... Maybe an ascii
string to pass the PHY driver is the most flexible, though a bit yucky,
or we try to have a list of all the possible configuration options in
phy.h and people just add new ones that they need as they add support
for them...

Sounds grossly like an in-kernel ioctl tho...

Ben.

Re: [PATCH] Add Broadcom PHY support

From: Andy Fleming <hidden>
Date: 2006-12-05 19:50:44

On Dec 5, 2006, at 00:03, Benjamin Herrenschmidt wrote:
quoted
I believe that this fiber enabling can be done by defining  
config_init in the phy_driver struct.

struct phy_driver {
<snip>
        /* Called to initialize the PHY,
	 * including after a reset */
	int (*config_init)(struct phy_device *phydev);
<snip>
};
Well... I don't know for sure... thing is, enabling the fiber mode  
is a
rather platform specific thing. So it's the MAC driver that knows  
wether
it wants it on a PHY and should call into the driver.

It's difficult to abstract all possible PHY config options tho... some
MACs might want to enable low power, some don't because they have  
issues
with it, that sort of thing, though.

Not sure what the best solution is at this point... Maybe an ascii
string to pass the PHY driver is the most flexible, though a bit  
yucky,
or we try to have a list of all the possible configuration options in
phy.h and people just add new ones that they need as they add support
for them...

Sounds grossly like an in-kernel ioctl tho...

Each phy_device structure now has a dev_flags field that can be  
modified by the controller's code upon connecting.  The PHY driver  
can then check that field for PHY-specific, platform-specific  
interactions.  For instance, on the newer CDS, there's a Marvell PHY  
which requires configurable resistance changes to work in RGMII  
mode.  So there's a flag for that.  Basically, each PHY driver  
specifies its own flags, and the platform code is currently  
responsible for setting those flags appropriately.  A string might be  
more flexible, but I'm operating on the hope that there shouldn't be  
too many of these.

For Fiber mode, or other such changes, we might want to add another  
field, like the interface field, to describe standard external  
interfaces.  The call to phy_connect() is beginning to get a bit  
long, though.

Andy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help