mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <f.fainelli@gmail.com>, <hkallweit1@gmail.com>,
	<davem@davemloft.net>, <robh@kernel.org>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: phy: DP83822: Add ability to advertise Fiber connection
Date: Thu, 14 May 2020 16:43:25 -0500	[thread overview]
Message-ID: <2ccba0e1-d7f1-86ae-d67c-5e9f4a3b0c4f@ti.com> (raw)
In-Reply-To: <20200514185217.GX499265@lunn.ch>

Andrew

On 5/14/20 1:52 PM, Andrew Lunn wrote:
>> +static int dp83822_config_init(struct phy_device *phydev)
>> +{
>> +	struct dp83822_private *dp83822 = phydev->priv;
>> +	int err = 0;
>> +
>> +	if (dp83822->fx_enabled) {
>> +		linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
>> +				 phydev->supported);
>> +		linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
>> +				 phydev->advertising);
>> +
>> +		/*  Auto negotiation is not available in fiber mode */
>> +		phydev->autoneg = AUTONEG_DISABLE;
>> +		phydev->speed = SPEED_100;
>> +		phydev->duplex = DUPLEX_FULL;
> Hi Dan
>
> This is normally determined by reading the ability registers,
> genphy_read_abilities(). When strapped to fibre mode, does it still
> indicate all the usual copper capabilities, which it can not actually
> do?

Auto negotiation is not available when in Fiber mode for this PHY.  The 
Speed is locked at 100Mbps for fiber.

Duplex can be either FULL or HALF so that should be removed.

I am verifying with the PHY team on the BMSR register but I do not see 
any bits for FX there.

If we remove these settings then I will need to read the PHY_STS 
register to manage the speed and mode of the fiber.  This register 
reports the PHY link status regardless of the mode.

Dan


>
> 	Andrew

      reply	other threads:[~2020-05-14 21:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 17:30 [PATCH net-next 0/2] DP83822 Fiber enablement Dan Murphy
2020-05-14 17:30 ` [PATCH net-next 1/2] dt-bindings: net: dp83822: Add TI dp83822 phy Dan Murphy
2020-05-14 18:39   ` Andrew Lunn
2020-05-14 19:38     ` Dan Murphy
2020-05-14 20:50       ` Andrew Lunn
2020-05-14 20:51         ` Dan Murphy
2020-05-14 21:04           ` Andrew Lunn
2020-05-28 17:48   ` Rob Herring
2020-05-14 17:30 ` [PATCH net-next 2/2] net: phy: DP83822: Add ability to advertise Fiber connection Dan Murphy
2020-05-14 18:52   ` Andrew Lunn
2020-05-14 21:43     ` Dan Murphy [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=2ccba0e1-d7f1-86ae-d67c-5e9f4a3b0c4f@ti.com \
    --to=dmurphy@ti.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®