* Disabling autoneg and enforcing speed/duplex
@ 2014-02-06 12:00 Gerlando Falauto
[not found] ` <52F3796B.8050809-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Gerlando Falauto @ 2014-02-06 12:00 UTC (permalink / raw)
To: devicetree@vger.kernel.org, netdev@vger.kernel.org
Cc: Grant Likely, Sebastian Hesselbarth, Brunck, Holger,
Florian Fainelli
Hi,
I'm using the Kirkwood Ethernet controller (mv643xx_eth.c) with a
Marvell 88E3018 PHY which needs to be set in forced 100Base-TX mode.
Thanks to Sebastian's addition of DT support to the ethernet driver, I
can easily set speed and duplex within the ethernet's port node,
therefore leaving the phy unmanaged -- this works fine (I guess this
mode is set on the phy by the bootloader or by strap settings).
However, this PHY has an erratum whose workaround requires some
registers be written -- I believe the natural solution would be to start
managing the PHY (i.e. set "phy-handle") and implement the proper
workaround within drivers/net/phy/marvell.c. Making the PHY managed does
however enable autoneg and therefore break everything.
Which brings me to my question: shouldn't there be a way to specify some
forced settings within the PHY's node for such cases?
Only thing I found vaguely resembling what I'm looking for is Florian's
patch introducing "max-speed" in the PHY -- not quite the same thing
though. Which, if I understand it correctly, implements it as a property
of the PHY, whereas ePAPR specifies it as a property of the ethernet
device (which makes sense, since you might want to connect a 10/100 MII
to a 10/100/1000 PHY and therefore have the MII restrict the
capabilities of the PHY).
Or perhaps I'm missing some important bits here?
Thanks!
Gerlando
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Disabling autoneg and enforcing speed/duplex
[not found] ` <52F3796B.8050809-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
@ 2014-02-06 14:50 ` Rob Herring
2014-02-06 15:00 ` Gerlando Falauto
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2014-02-06 14:50 UTC (permalink / raw)
To: Gerlando Falauto
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Grant Likely,
Sebastian Hesselbarth, Brunck, Holger
On Thu, Feb 6, 2014 at 6:00 AM, Gerlando Falauto
<gerlando.falauto-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org> wrote:
> Hi,
>
> I'm using the Kirkwood Ethernet controller (mv643xx_eth.c) with a Marvell
> 88E3018 PHY which needs to be set in forced 100Base-TX mode.
>
> Thanks to Sebastian's addition of DT support to the ethernet driver, I can
> easily set speed and duplex within the ethernet's port node, therefore
> leaving the phy unmanaged -- this works fine (I guess this mode is set on
> the phy by the bootloader or by strap settings).
>
> However, this PHY has an erratum whose workaround requires some registers be
> written -- I believe the natural solution would be to start managing the PHY
> (i.e. set "phy-handle") and implement the proper workaround within
> drivers/net/phy/marvell.c. Making the PHY managed does however enable
> autoneg and therefore break everything.
>
> Which brings me to my question: shouldn't there be a way to specify some
> forced settings within the PHY's node for such cases?
>
> Only thing I found vaguely resembling what I'm looking for is Florian's
> patch introducing "max-speed" in the PHY -- not quite the same thing though.
> Which, if I understand it correctly, implements it as a property of the PHY,
> whereas ePAPR specifies it as a property of the ethernet device (which makes
> sense, since you might want to connect a 10/100 MII to a 10/100/1000 PHY and
> therefore have the MII restrict the capabilities of the PHY).
You shouldn't need a property in this case. The driver knows what the
h/w is limited to and can configure the phy based on that. It is when
both sides should support a higher speed and you need to limit it for
some other reason like errata or board level configuration.
> Or perhaps I'm missing some important bits here?
Does this patch help you:
https://lkml.org/lkml/2014/1/15/533
Rob
>
> Thanks!
> Gerlando
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Disabling autoneg and enforcing speed/duplex
2014-02-06 14:50 ` Rob Herring
@ 2014-02-06 15:00 ` Gerlando Falauto
0 siblings, 0 replies; 3+ messages in thread
From: Gerlando Falauto @ 2014-02-06 15:00 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, Grant Likely,
Sebastian Hesselbarth, Brunck, Holger
Hi Rob,
thanks for your reply.
On 02/06/2014 03:50 PM, Rob Herring wrote:
> On Thu, Feb 6, 2014 at 6:00 AM, Gerlando Falauto
> <gerlando.falauto@keymile.com> wrote:
>> Hi,
>>
>> I'm using the Kirkwood Ethernet controller (mv643xx_eth.c) with a Marvell
>> 88E3018 PHY which needs to be set in forced 100Base-TX mode.
>>
>> Thanks to Sebastian's addition of DT support to the ethernet driver, I can
>> easily set speed and duplex within the ethernet's port node, therefore
>> leaving the phy unmanaged -- this works fine (I guess this mode is set on
>> the phy by the bootloader or by strap settings).
>>
>> However, this PHY has an erratum whose workaround requires some registers be
>> written -- I believe the natural solution would be to start managing the PHY
>> (i.e. set "phy-handle") and implement the proper workaround within
>> drivers/net/phy/marvell.c. Making the PHY managed does however enable
>> autoneg and therefore break everything.
>>
>> Which brings me to my question: shouldn't there be a way to specify some
>> forced settings within the PHY's node for such cases?
>>
>> Only thing I found vaguely resembling what I'm looking for is Florian's
>> patch introducing "max-speed" in the PHY -- not quite the same thing though.
>> Which, if I understand it correctly, implements it as a property of the PHY,
>> whereas ePAPR specifies it as a property of the ethernet device (which makes
>> sense, since you might want to connect a 10/100 MII to a 10/100/1000 PHY and
>> therefore have the MII restrict the capabilities of the PHY).
>
> You shouldn't need a property in this case. The driver knows what the
> h/w is limited to and can configure the phy based on that.
I see, you're right.
> It is when
> both sides should support a higher speed and you need to limit it for
> some other reason like errata or board level configuration.
Which is exactly my case. The phy should be configured to work in
100Base-TX mode, full duplex.
>> Or perhaps I'm missing some important bits here?
>
> Does this patch help you:
>
> https://lkml.org/lkml/2014/1/15/533
I think so... So I guess I should jest set all
phy-mii-advertise-10full = <0>;
...
phy-mii-advertise-100full = <1>;
...
is that right?
I'll test it and let you know.
Thanks!
Gerlando
>
> Rob
>
>>
>> Thanks!
>> Gerlando
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-06 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 12:00 Disabling autoneg and enforcing speed/duplex Gerlando Falauto
[not found] ` <52F3796B.8050809-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
2014-02-06 14:50 ` Rob Herring
2014-02-06 15:00 ` Gerlando Falauto
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).