All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm@ti.com>
To: Yegor Yefremov <yegorslists@googlemail.com>,
	Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev <netdev@vger.kernel.org>, <mpa@pengutronix.de>,
	<lsorense@csclub.uwaterloo.ca>, Daniel Mack <zonque@gmail.com>
Subject: Re: am335x: cpsw: phy ignores max-speed setting
Date: Fri, 7 Nov 2014 21:41:33 +0530	[thread overview]
Message-ID: <545CEF35.9080405@ti.com> (raw)
In-Reply-To: <CAGm1_ktReQ5aOJGbvyEB3xQDanCnj_XkwUEWLtB=+sMseZX_pA@mail.gmail.com>

On Friday 07 November 2014 12:41 PM, Yegor Yefremov wrote:
> On Thu, Nov 6, 2014 at 5:58 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> On 11/06/2014 08:25 AM, Yegor Yefremov wrote:
>>> I' m trying to override max-speed setting for both CPSW connected
>>> PHYs. This is my DTS section for configuring CPSW:
>>>
>>> &mac {
>>>         pinctrl-names = "default", "sleep";
>>>         pinctrl-0 = <&cpsw_default>;
>>>         pinctrl-1 = <&cpsw_sleep>;
>>>         dual_emac = <1>;
>>>
>>>         status = "okay";
>>> };
>>>
>>> &davinci_mdio {
>>>         pinctrl-names = "default", "sleep";
>>>         pinctrl-0 = <&davinci_mdio_default>;
>>>         pinctrl-1 = <&davinci_mdio_sleep>;
>>>
>>>         status = "okay";
>>> };
>>>
>>> &cpsw_emac0 {
>>>         phy_id = <&davinci_mdio>, <0>;
>>>         phy-mode = "rgmii-id";
>>>         dual_emac_res_vlan = <1>;
>>>         max-speed = <100>;
>>> };
>>>
>>> &cpsw_emac1 {
>>>         phy_id = <&davinci_mdio>, <1>;
>>>         phy-mode = "rgmii-id";
>>>         dual_emac_res_vlan = <2>;
>>>         max-speed = <100>;
>>> };
>>>
>>> But in drivers/net/phy/phy_device.c->of_set_phy_supported() routine I
>>> don't get through node check, i.e. node == NULL. Any idea why?
>>
>> Yes, because the 'max-speed' property is placed at the Ethernet MAC node
>> level, not the PHY node as of_set_phy_supported() expect its.
>>
>> This driver does not appear to use the standard Ethernet PHY device tree
>> node, so I am not sure what are your options here.
> 
> The SoC has a complex structure, i.e. Ethernet controller has a switch
> inside with two slaves.
> 
> A workaround would be perhaps to handle this option in cpsw driver.
> 
> Mugunthan, what do you think about this?

Yes, CPSW is different from what linux networking is designed for, it
has two ethernet slave and acts as a Layer 2 switch.

* If you need on a run time basis you can change the supported speed via
ethtool advertise interface
* If needed on boot for nfs then need to think of how it can be achieved
in cpsw driver. Will have a look and update this thread.

Regards
Mugunthan V N

  reply	other threads:[~2014-11-07 16:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 16:25 am335x: cpsw: phy ignores max-speed setting Yegor Yefremov
2014-11-06 16:51 ` Dave Taht
2014-11-06 17:28   ` Eric Dumazet
2014-11-06 19:19   ` Joe Perches
     [not found]     ` <CAA93jw7PTOGdYrmFGSY5zat=MpVsdmESVwpK_tVO=sLeDSWpRA@mail.gmail.com>
2014-11-11 19:08       ` Joe Perches
2014-11-06 16:58 ` Florian Fainelli
2014-11-07  7:11   ` Yegor Yefremov
2014-11-07 16:11     ` Mugunthan V N [this message]
2014-11-07 16:27       ` Yegor Yefremov
2014-11-06 19:20 ` Lennart Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545CEF35.9080405@ti.com \
    --to=mugunthanvnm@ti.com \
    --cc=f.fainelli@gmail.com \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=mpa@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=yegorslists@googlemail.com \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.