netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Marek Vasut <marex@denx.de>
Cc: netdev@vger.kernel.org,
	Christoph Niedermaier <cniedermaier@dh-electronics.com>,
	"David S . Miller" <davem@davemloft.net>,
	NXP Linux Team <linux-imx@nxp.com>,
	Richard Leitner <richard.leitner@skidata.com>,
	Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH] net: fec: Fix PHY init after phy_reset_after_clk_enable()
Date: Fri, 4 Sep 2020 00:08:47 +0200	[thread overview]
Message-ID: <20200903220847.GI3112546@lunn.ch> (raw)
In-Reply-To: <02ce2afb-7b9f-ba35-63a5-7496c7a39e6e@denx.de>

> > b4 am 20200903043947.3272453-1-f.fainelli@gmail.com
> 
> That might be a fix for the long run, but I doubt there's any chance to
> backport it all to stable, is there ?

No. For stable we need something simpler.

> >>> I think a better fix for the original problem is for the SMSC PHY
> >>> driver to control the clock itself. If it clk_prepare_enables() the
> >>> clock, it knows it will not be shut off again by the FEC run time
> >>> power management.
> >>
> >> The FEC MAC is responsible for generating the clock, the PHY clock are
> >> not part of the clock framework as far as I can tell.
> > 
> > I'm not sure this is true. At least:
> > 
> > https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/imx6ul-kontron-n6x1x-s.dtsi#L123
> > 
> > and there are a few more examples:
> > 
> > imx6ul-14x14-evk.dtsi:			clocks = <&clks IMX6UL_CLK_ENET_REF>;
> > imx6ul-kontron-n6x1x-s.dtsi:			clocks = <&clks IMX6UL_CLK_ENET_REF>;
> > imx6ul-kontron-n6x1x-som-common.dtsi:			clocks = <&clks IMX6UL_CLK_ENET_REF>;
> > imx6ull-myir-mys-6ulx.dtsi:			clocks = <&clks IMX6UL_CLK_ENET_REF>;
> > imx6ul-phytec-phycore-som.dtsi:			clocks = <&clks IMX6UL_CLK_ENET_REF>;
> > 
> > Maybe it is just IMX6?
> 
> This is reference clock for the FEC inside the SoC, you probably want to
> control the clock going out of the SoC and into the PHY, which is
> different clock than the one described in the DT, right ?

I _think_ this is the external clock which is feed to the PHY. Why
else put it in the phy node in DT? And it has the name "rmii-ref"
which again suggests it is the RMII clock, not something internal to
the FEC.

To be sure, we would need to check the datasheet.

   Andrew

  reply	other threads:[~2020-09-03 22:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 20:27 [PATCH] net: fec: Fix PHY init after phy_reset_after_clk_enable() Marek Vasut
2020-09-03 21:00 ` Andrew Lunn
2020-09-03 21:36   ` Marek Vasut
2020-09-03 21:53     ` Andrew Lunn
2020-09-03 22:03       ` Marek Vasut
2020-09-03 22:08         ` Andrew Lunn [this message]
2020-09-03 22:45           ` Marek Vasut
2020-09-04 14:02             ` Andrew Lunn
2020-09-04 15:26               ` Marek Vasut
2020-09-04 19:02                 ` Richard Leitner
2020-09-04 19:23                   ` Marek Vasut
2020-09-09  8:38                     ` Richard Leitner
2020-09-26 18:52                       ` Marek Vasut
2020-09-28 13:03                         ` Richard Leitner
2020-10-06  9:15                           ` Marek Vasut
2020-09-09 12:24             ` Andrew Lunn

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=20200903220847.GI3112546@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cniedermaier@dh-electronics.com \
    --cc=davem@davemloft.net \
    --cc=linux-imx@nxp.com \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=richard.leitner@skidata.com \
    --cc=shawnguo@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).