netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	fugang.duan@nxp.com, Chris Healy <Chris.Healy@zii.aero>
Subject: Re: [PATCH net-next v2 2/3] net: ethernet: fec: Allow configuration of MDIO bus speed
Date: Sat, 18 Apr 2020 16:23:36 +0200	[thread overview]
Message-ID: <20200418142336.GB804711@lunn.ch> (raw)
In-Reply-To: <3cb32a99-c684-03fd-c471-1d061ca97d4b@gmail.com>

On Fri, Apr 17, 2020 at 05:34:56PM -0700, Florian Fainelli wrote:
> Hi Andrew,
> 
> On 4/17/2020 5:03 PM, Andrew Lunn wrote:
> > MDIO busses typically operate at 2.5MHz. However many devices can
> > operate at faster speeds. This then allows more MDIO transactions per
> > second, useful for Ethernet switch statistics, or Ethernet PHY TDR
> > data. Allow the bus speed to be configured, using the standard
> > "clock-frequency" property, which i2c busses use to indicate the bus
> > speed.
> > 
> > Suggested-by: Chris Healy <Chris.Healy@zii.aero>
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> 
> This does look good to me, however if we go down that road, it looks like we
> should also support a 'mdio-max-frequency' per MDIO child node in order to
> scale up and down the frequency accordingly.

Hi Florian

I don't see how that would work. Each device on the bus needs to be
able to receiver the transaction in order to decode the device
address, and then either discard it, or act on it. So the same as I2C
where the device address is part of the transaction. You need the bus
to run as fast as the slowest device on the bus. So a bus property is
the simplest. You could have per device properties, and during the bus
scan, figure out what the slowest device is, but that seems to add
complexity for no real gain. I2C does not have this either.

If MDIO was more like SPI, with per device chip select lines, then a
per device frequency would make sense.

	   Andrew

  reply	other threads:[~2020-04-18 14:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18  0:03 [PATCH net-next v2 0/3] FEC MDIO speedups Andrew Lunn
2020-04-18  0:03 ` [PATCH net-next v2 1/3] net: ethernet: fec: Replace interrupt driven MDIO with polled IO Andrew Lunn
2020-04-18 13:55   ` [EXT] " Andy Duan
2020-04-18 22:39     ` Chris Healy
2020-04-19  0:35       ` Andrew Lunn
2020-04-19  6:22       ` Andy Duan
2020-04-19 20:47       ` Andrew Lunn
2020-04-18 16:21   ` Fabio Estevam
2020-04-18 21:06   ` Florian Fainelli
2020-04-18  0:03 ` [PATCH net-next v2 2/3] net: ethernet: fec: Allow configuration of MDIO bus speed Andrew Lunn
2020-04-18  0:34   ` Florian Fainelli
2020-04-18 14:23     ` Andrew Lunn [this message]
2020-04-18 16:01       ` Florian Fainelli
2020-04-18 16:49         ` Andrew Lunn
2020-04-18 21:07           ` Florian Fainelli
2020-04-18 21:08   ` Florian Fainelli
2020-04-18  0:03 ` [PATCH net-next v2 3/3] net: ethernet: fec: Allow the MDIO preamble to be disabled Andrew Lunn
2020-04-18  0:39   ` Florian Fainelli
2020-04-18 14:27     ` Andrew Lunn
2020-04-18 16:02       ` Florian Fainelli
2020-04-18 21:09   ` Florian Fainelli

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=20200418142336.GB804711@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Chris.Healy@zii.aero \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=hkallweit1@gmail.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 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).