All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: Dinh Nguyen <dinguyen@kernel.org>,
	thor.thayer@linux.intel.com, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/3] ARM64: dts: stratix10: Add stmmac ptp_ref clock
Date: Wed, 22 May 2019 07:47:49 -0700	[thread overview]
Message-ID: <c5363d7f1de4a24b31662f034d5241eba4fa0dc6.camel@linux.intel.com> (raw)
In-Reply-To: <06397243-94ea-47db-16c1-a4c11e08c3b1@kernel.org>

On Tue, 2019-05-21 at 15:27 -0500, Dinh Nguyen wrote:
> 
> On 5/21/19 8:09 AM, Dalon L Westergreen wrote:
> > On Mon, 2019-05-20 at 11:39 -0500, Thor Thayer wrote:
> > > On 5/15/19 11:20 AM, Dalon Westergreen wrote:
> > > > Add the default stmmac ptp_ref clock for stratix10.  The stmmac
> > > > driver defaults the ptp_ref clock to the main stmmac clock
> > > > if the ptp_ref clock is not set in the devicetree.  This is
> > > > inappropriate for the stratix10.  The default ptp_ref clock is
> > > > STRATIX10_PERI_EMAC_PTP_CLK in the clock manager.
> > > > 
> > > > Signed-off-by: Dalon Westergreen <
> > > > dalon.westergreen@linux.intel.com
> > > > 
> > > > 
> > > > ---
> > > >   arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 12 ++++++------
> > > >   1 file changed, 6 insertions(+), 6 deletions(-)
> > > > 
> > > > diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> > > > b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> > > > index adedd563125a..f464e7ba3402 100644
> > > > --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> > > > +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> > > > @@ -160,8 +160,8 @@
> > > >   			mac-address = [00 00 00 00 00 00];
> > > >   			resets = <&rst EMAC0_RESET>, <&rst
> > > > EMAC0_OCP_RESET>;
> > > >   			reset-names = "stmmaceth", "stmmaceth-ocp";
> > > > -			clocks = <&clkmgr STRATIX10_EMAC0_CLK>;
> > > > -			clock-names = "stmmaceth";
> > > > +			clocks = <&clkmgr STRATIX10_EMAC0_CLK>, <&clkmgr
> > > > STRATIX10_PERI_EMAC_PTP_CLK>;
> > > > +			clock-names = "stmmaceth", "ptp_ref";
> > > >   			tx-fifo-depth = <16384>;
> > > >   			rx-fifo-depth = <16384>;
> > > >   			snps,multicast-filter-bins = <256>;
> > > > @@ -176,8 +176,8 @@
> > > >   			mac-address = [00 00 00 00 00 00];
> > > >   			resets = <&rst EMAC1_RESET>, <&rst
> > > > EMAC1_OCP_RESET>;
> > > >   			reset-names = "stmmaceth", "stmmaceth-ocp";
> > > > -			clocks = <&clkmgr STRATIX10_EMAC1_CLK>;
> > > > -			clock-names = "stmmaceth";
> > > > +			clocks = <&clkmgr STRATIX10_EMAC1_CLK>, <&clkmgr
> > > > STRATIX10_PERI_EMAC_PTP_CLK>;
> > > > +			clock-names = "stmmaceth", "ptp_ref";
> > > >   			tx-fifo-depth = <16384>;
> > > >   			rx-fifo-depth = <16384>;
> > > >   			snps,multicast-filter-bins = <256>;
> > > > @@ -192,8 +192,8 @@
> > > >   			mac-address = [00 00 00 00 00 00];
> > > >   			resets = <&rst EMAC2_RESET>, <&rst
> > > > EMAC2_OCP_RESET>;
> > > >   			reset-names = "stmmaceth", "stmmaceth-ocp";
> > > > -			clocks = <&clkmgr STRATIX10_EMAC2_CLK>;
> > > > -			clock-names = "stmmaceth";
> > > > +			clocks = <&clkmgr STRATIX10_EMAC2_CLK>, <&clkmgr
> > > > STRATIX10_PERI_EMAC_PTP_CLK>;
> > > > +			clock-names = "stmmaceth", "ptp_ref";
> > > >   			tx-fifo-depth = <16384>;
> > > >   			rx-fifo-depth = <16384>;
> > > >   			snps,multicast-filter-bins = <256>;
> > > > 
> > > 
> > > Should STRATIX10_EMAC_PTP_CLK be used instead of 
> > > STRATIX10_PERI_EMAC_PTP_CLK since this is the gate of the clkgmr?
> > > 
> > 
> > Either can be used, but the default in the hps configuration is the
> > peripheral pll output and not the main pll output.
> > 
> 
> I think it should be the emac_ptp_clk. If you look at the clock tree,
> the emac_ptp_clk(50 MHz) and is derived from the peri_emac_ptp_clk(200
> MHz).
> 
> You can look at the clock tree by doing a 'cat
> /sys/kernel/debug/clk/clk_summary'.
> 
> Dinh
> 
I dont disagree, but this devicetree is a representation of what was implemented
in the devkit no?  Should we first request that this is changed in the design?
or should i set this to STRATIX10_EMAC_PTP_CLK and overide it in the top level
socdk devicetree?

dalon

  reply	other threads:[~2019-05-22 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 16:20 [PATCH 1/3] ARM: dts: cyclone5: Add stmmac ptp_ref clock Dalon Westergreen
2019-05-15 16:20 ` [PATCH 2/3] ARM: dts: arria10: " Dalon Westergreen
2019-05-20 16:10   ` Thor Thayer
2019-05-15 16:20 ` [PATCH 3/3] ARM64: dts: stratix10: " Dalon Westergreen
2019-05-20 16:39   ` Thor Thayer
2019-05-21 13:09     ` Dalon L Westergreen
2019-05-21 20:27       ` Dinh Nguyen
2019-05-22 14:47         ` Dalon L Westergreen [this message]
2019-05-20 16:09 ` [PATCH 1/3] ARM: dts: cyclone5: " Thor Thayer
  -- strict thread matches above, loose matches on Subject: below --
2018-12-13 23:03 dwesterg
2018-12-13 23:03 ` [PATCH 3/3] ARM64: dts: stratix10: " dwesterg

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=c5363d7f1de4a24b31662f034d5241eba4fa0dc6.camel@linux.intel.com \
    --to=dalon.westergreen@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=thor.thayer@linux.intel.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.