diff mbox series

ARM: dts: ls1021a: output PPS signal on FIPER2

Message ID 20200427035655.18157-1-yangbo.lu@nxp.com (mailing list archive)
State Mainlined
Commit 5656bb3857c4904d1dec6e1b8f876c1c0337274e
Headers show
Series ARM: dts: ls1021a: output PPS signal on FIPER2 | expand

Commit Message

Yangbo Lu April 27, 2020, 3:56 a.m. UTC
Output PPS signal on FIPER2 (Fixed Period Interval Pulse)
which is more desired by user.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shawn Guo May 13, 2020, 8:22 a.m. UTC | #1
On Mon, Apr 27, 2020 at 11:56:55AM +0800, Yangbo Lu wrote:
> Output PPS signal on FIPER2 (Fixed Period Interval Pulse)
> which is more desired by user.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
>  arch/arm/boot/dts/ls1021a.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
> index 760a68c..b2ff27a 100644
> --- a/arch/arm/boot/dts/ls1021a.dtsi
> +++ b/arch/arm/boot/dts/ls1021a.dtsi
> @@ -772,7 +772,7 @@
>  			fsl,tmr-prsc    = <2>;
>  			fsl,tmr-add     = <0xaaaaaaab>;
>  			fsl,tmr-fiper1  = <999999995>;
> -			fsl,tmr-fiper2  = <99990>;
> +			fsl,tmr-fiper2  = <999999995>;

Not sure code change matches patch subject and commit log.  The change
is about changing fsl,tmr-fiper2 setting from one value to another.

Shawn

>  			fsl,max-adj     = <499999999>;
>  			fsl,extts-fifo;
>  		};
> -- 
> 2.7.4
>
Yangbo Lu May 14, 2020, 3:13 a.m. UTC | #2
Hi Shawn,

> -----Original Message-----
> From: Shawn Guo <shawnguo@kernel.org>
> Sent: Wednesday, May 13, 2020 4:23 PM
> To: Y.b. Lu <yangbo.lu@nxp.com>
> Cc: linux-arm-kernel@lists.infradead.org; Leo Li <leoyang.li@nxp.com>;
> Richard Cochran <richardcochran@gmail.com>
> Subject: Re: [PATCH] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> On Mon, Apr 27, 2020 at 11:56:55AM +0800, Yangbo Lu wrote:
> > Output PPS signal on FIPER2 (Fixed Period Interval Pulse)
> > which is more desired by user.
> >
> > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > ---
> >  arch/arm/boot/dts/ls1021a.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
> > index 760a68c..b2ff27a 100644
> > --- a/arch/arm/boot/dts/ls1021a.dtsi
> > +++ b/arch/arm/boot/dts/ls1021a.dtsi
> > @@ -772,7 +772,7 @@
> >  			fsl,tmr-prsc    = <2>;
> >  			fsl,tmr-add     = <0xaaaaaaab>;
> >  			fsl,tmr-fiper1  = <999999995>;
> > -			fsl,tmr-fiper2  = <99990>;
> > +			fsl,tmr-fiper2  = <999999995>;
> 
> Not sure code change matches patch subject and commit log.  The change
> is about changing fsl,tmr-fiper2 setting from one value to another.

The calculation refers to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt. It looks complicated.
But to be simple, to get 1PPS signal (period is 1s) on FIPER2, the value should be set as,
fiper2 = <desired period> - <tclk-period> = 1000000000ns - 5ns = 999999995.

Thanks.
> 
> Shawn
> 
> >  			fsl,max-adj     = <499999999>;
> >  			fsl,extts-fifo;
> >  		};
> > --
> > 2.7.4
> >
Shawn Guo May 17, 2020, 1:54 p.m. UTC | #3
On Thu, May 14, 2020 at 03:13:45AM +0000, Y.b. Lu wrote:
> Hi Shawn,
> 
> > -----Original Message-----
> > From: Shawn Guo <shawnguo@kernel.org>
> > Sent: Wednesday, May 13, 2020 4:23 PM
> > To: Y.b. Lu <yangbo.lu@nxp.com>
> > Cc: linux-arm-kernel@lists.infradead.org; Leo Li <leoyang.li@nxp.com>;
> > Richard Cochran <richardcochran@gmail.com>
> > Subject: Re: [PATCH] ARM: dts: ls1021a: output PPS signal on FIPER2
> > 
> > On Mon, Apr 27, 2020 at 11:56:55AM +0800, Yangbo Lu wrote:
> > > Output PPS signal on FIPER2 (Fixed Period Interval Pulse)
> > > which is more desired by user.
> > >
> > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > > ---
> > >  arch/arm/boot/dts/ls1021a.dtsi | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
> > > index 760a68c..b2ff27a 100644
> > > --- a/arch/arm/boot/dts/ls1021a.dtsi
> > > +++ b/arch/arm/boot/dts/ls1021a.dtsi
> > > @@ -772,7 +772,7 @@
> > >  			fsl,tmr-prsc    = <2>;
> > >  			fsl,tmr-add     = <0xaaaaaaab>;
> > >  			fsl,tmr-fiper1  = <999999995>;
> > > -			fsl,tmr-fiper2  = <99990>;
> > > +			fsl,tmr-fiper2  = <999999995>;
> > 
> > Not sure code change matches patch subject and commit log.  The change
> > is about changing fsl,tmr-fiper2 setting from one value to another.
> 
> The calculation refers to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt. It looks complicated.
> But to be simple, to get 1PPS signal (period is 1s) on FIPER2, the value should be set as,
> fiper2 = <desired period> - <tclk-period> = 1000000000ns - 5ns = 999999995.

Please update commit log to include how new value comes.

Shawn
Yangbo Lu May 19, 2020, 2:58 a.m. UTC | #4
> -----Original Message-----
> From: Shawn Guo <shawnguo@kernel.org>
> Sent: Sunday, May 17, 2020 9:54 PM
> To: Y.b. Lu <yangbo.lu@nxp.com>
> Cc: linux-arm-kernel@lists.infradead.org; Leo Li <leoyang.li@nxp.com>;
> Richard Cochran <richardcochran@gmail.com>
> Subject: Re: [PATCH] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> On Thu, May 14, 2020 at 03:13:45AM +0000, Y.b. Lu wrote:
> > Hi Shawn,
> >
> > > -----Original Message-----
> > > From: Shawn Guo <shawnguo@kernel.org>
> > > Sent: Wednesday, May 13, 2020 4:23 PM
> > > To: Y.b. Lu <yangbo.lu@nxp.com>
> > > Cc: linux-arm-kernel@lists.infradead.org; Leo Li <leoyang.li@nxp.com>;
> > > Richard Cochran <richardcochran@gmail.com>
> > > Subject: Re: [PATCH] ARM: dts: ls1021a: output PPS signal on FIPER2
> > >
> > > On Mon, Apr 27, 2020 at 11:56:55AM +0800, Yangbo Lu wrote:
> > > > Output PPS signal on FIPER2 (Fixed Period Interval Pulse)
> > > > which is more desired by user.
> > > >
> > > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > > > ---
> > > >  arch/arm/boot/dts/ls1021a.dtsi | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm/boot/dts/ls1021a.dtsi
> b/arch/arm/boot/dts/ls1021a.dtsi
> > > > index 760a68c..b2ff27a 100644
> > > > --- a/arch/arm/boot/dts/ls1021a.dtsi
> > > > +++ b/arch/arm/boot/dts/ls1021a.dtsi
> > > > @@ -772,7 +772,7 @@
> > > >  			fsl,tmr-prsc    = <2>;
> > > >  			fsl,tmr-add     = <0xaaaaaaab>;
> > > >  			fsl,tmr-fiper1  = <999999995>;
> > > > -			fsl,tmr-fiper2  = <99990>;
> > > > +			fsl,tmr-fiper2  = <999999995>;
> > >
> > > Not sure code change matches patch subject and commit log.  The change
> > > is about changing fsl,tmr-fiper2 setting from one value to another.
> >
> > The calculation refers to
> Documentation/devicetree/bindings/ptp/ptp-qoriq.txt. It looks complicated.
> > But to be simple, to get 1PPS signal (period is 1s) on FIPER2, the value should
> be set as,
> > fiper2 = <desired period> - <tclk-period> = 1000000000ns - 5ns =
> 999999995.
> 
> Please update commit log to include how new value comes.

Sent out v2. Thanks!

> 
> Shawn
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 760a68c..b2ff27a 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -772,7 +772,7 @@ 
 			fsl,tmr-prsc    = <2>;
 			fsl,tmr-add     = <0xaaaaaaab>;
 			fsl,tmr-fiper1  = <999999995>;
-			fsl,tmr-fiper2  = <99990>;
+			fsl,tmr-fiper2  = <999999995>;
 			fsl,max-adj     = <499999999>;
 			fsl,extts-fifo;
 		};