From: Andrew Lunn <andrew@lunn.ch>
To: Madalin-Cristian Bucur <madalin.bucur@nxp.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Fixed link for 10G
Date: Fri, 6 Jan 2017 17:24:20 +0100 [thread overview]
Message-ID: <20170106162420.GA341@lunn.ch> (raw)
In-Reply-To: <AM2PR04MB11228A96940B1E409CEC6E04EC630@AM2PR04MB1122.eurprd04.prod.outlook.com>
On Fri, Jan 06, 2017 at 12:01:06PM +0000, Madalin-Cristian Bucur wrote:
> Hi Florian,
>
> I'm trying to add a fixed-link property that declares 10G speed
> for a XGMII PHY and I'm encountering some issues as the fixed
> link infrastructure does not seem to support this speed.
>
> I'm using this device tree snippet (using the legacy format, but it
> should not matter):
>
> ethernet@f2000 { /* 10GEC2 */
> fixed-link = <0 1 10000 0 0>;
> phy-connection-type = "xgmii";
> };
>
> and I get this error:
>
> [ 0.464238] swphy: unknown speed
> [ 0.467464] fsl_mac: probe of 1af2000.ethernet failed with error -22
>
> Looking at the code, fixed_phy_register() seems to check for speeds up
> to 1G and swphy only caters 1G and lower speeds, the swphy_decode_speed()
> returning -EINVAL for 10G, triggering the error printed above in
> swphy_validate_state().
>
> What would be the proper way to add support for the 10G fixed link speed?
Hi Madalin
I came across the same issue a couple of months ago. But i found a
different way to solve my problem.
Anyway, fixed-link emulates a PHY. It has the common PHY registers,
and sets the register values to indicate the device tree
configuration.
As you have found out, it only emulates 10/100/1000. For 10G, you need
to extend the emulation to include the 10G registers. Assuming the 10G
registers are standardised.
Andrew
prev parent reply other threads:[~2017-01-06 16:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 12:01 Fixed link for 10G Madalin-Cristian Bucur
2017-01-06 16:24 ` Andrew Lunn [this message]
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=20170106162420.GA341@lunn.ch \
--to=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
/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.