netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Olivier Dautricourt <olivier.dautricourt@orolia.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 0/3] Patch series for a PTP Grandmaster use case using stmmac/gmac3 ptp clock
Date: Thu, 14 May 2020 06:53:25 -0700	[thread overview]
Message-ID: <20200514135325.GB18838@localhost> (raw)
In-Reply-To: <20200514102808.31163-1-olivier.dautricourt@orolia.com>

On Thu, May 14, 2020 at 12:28:05PM +0200, Olivier Dautricourt wrote:
> This patch series covers a use case where an embedded system is
> disciplining an internal clock to a GNSS signal, which provides a
> stable frequency, and wants to act as a PTP Grandmaster by disciplining
> a ptp clock to this internal clock.

Have you seen the new GM patch series on the linuxptp-devel mailing
list?  You may find it interesting...
 
> In our setup a 10Mhz oscillator is frequency adjusted so that a derived
> pps from that oscillator is in phase with the pps generated by 
> a gnss receiver.
> 
> An other derived clock from the same disciplined oscillator is used as
> ptp_clock for the ethernet mac.
> 
> The internal pps of the system is forwarded to one of the auxiliary inputs
> of the MAC.
> 
> Initially the mac time registers are considered random.
> We want the mac nanosecond field to be 0 on the auxiliary pps input edge.
> 
> 
> PATCH 1/3: 
> 	The stmmac gmac3 version used in the setup is patched to retrieve a
> 	timestamp at the rising edge of the aux input and to forward
> 	it to userspace.
> 
> * What matters here is that we get the subsecond offset between the aux 
> edge and the edge of the PHC's pps. *
> 
> 
> PATCH 2,3/3:
> 
> 	We want the ptp clock to be in time with our aux pps input.
> 	Since the ptp clock is derived from the system oscillator, we
> 	don't want to do frequency adjustements.
> 
> 	The stmmac driver is patched to allow to set the coarse correction
> 	mode which avoid to adjust the frequency of the mac continuously
> 	(the default behavior), but instead, have just one
> 	time adjustment.

You can use the new ts2phc program (in the linuxptp-devel patch
series, soon to be merged) by configuring it to use the nullf servo.

Thanks,
Richard


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

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 10:28 [PATCH 0/3] Patch series for a PTP Grandmaster use case using stmmac/gmac3 ptp clock Olivier Dautricourt
2020-05-14 10:28 ` [PATCH 1/3] net: stmmac: gmac3: add auxiliary snapshot support Olivier Dautricourt
2020-05-14 10:28 ` [PATCH 2/3] net: uapi: Add HWTSTAMP_FLAGS_ADJ_FINE/ADJ_COARSE Olivier Dautricourt
2020-05-14 13:38   ` Richard Cochran
2020-05-14 15:20     ` Olivier Dautricourt
2020-05-15  0:29       ` Richard Cochran
2020-05-14 10:28 ` [PATCH 3/3] net: stmmac: Support coarse mode through ioctl Olivier Dautricourt
2020-05-27  3:55   ` Richard Cochran
2020-06-03 16:12     ` Olivier Dautricourt
2020-05-14 13:53 ` Richard Cochran [this message]
2020-05-14 15:09   ` [PATCH 0/3] Patch series for a PTP Grandmaster use case using stmmac/gmac3 ptp clock Olivier Dautricourt
2020-05-15  0:37     ` Richard Cochran
2020-05-15 13:26       ` Julien Beraud
2020-05-15 23:30         ` Richard Cochran
2020-05-25 10:00           ` Olivier Dautricourt
2020-05-27  4:05         ` Richard Cochran
2020-06-03 15:17           ` Olivier Dautricourt

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=20200514135325.GB18838@localhost \
    --to=richardcochran@gmail.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=netdev@vger.kernel.org \
    --cc=olivier.dautricourt@orolia.com \
    --cc=peppe.cavallaro@st.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 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).