All of lore.kernel.org
 help / color / mirror / Atom feed
* [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
@ 2020-05-22  1:30 Yangbo Lu
  2020-05-22  2:43 ` Richard Cochran
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yangbo Lu @ 2020-05-22  1:30 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Richard Cochran, Li Yang, Shawn Guo, Yangbo Lu

The timer fixed interval period pulse generator register
is used to generate periodic pulses. The down count
register loads the value programmed in the fixed period
interval (FIPER). At every tick of the timer accumulator
overflow, the counter decrements by the value of
TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
counter value reaches zero. It reloads the down counter
in the cycle following a pulse.

To use the TMR_FIPER register to generate desired periodic
pulses. The value should programmed is,
desired_period - tclk_period

Current tmr-fiper2 value is to generate 100us periodic pulses.
(But the value should have been 99995, not 99990. The tclk_period is 5.)
This patch is to generate 1 second periodic pulses with value
999999995 programmed which is more desired by user.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
Changes for v2:
	- Added more discription in commit message.
Changes for v3:
	- Mentioned effect of the change in commit message.
---
 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>;
 			fsl,max-adj     = <499999999>;
 			fsl,extts-fifo;
 		};
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-05-22  1:30 [v3] ARM: dts: ls1021a: output PPS signal on FIPER2 Yangbo Lu
@ 2020-05-22  2:43 ` Richard Cochran
  2020-06-08  3:28 ` Y.b. Lu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Richard Cochran @ 2020-05-22  2:43 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: Shawn Guo, linux-arm-kernel, Li Yang

On Fri, May 22, 2020 at 09:30:52AM +0800, Yangbo Lu wrote:
> The timer fixed interval period pulse generator register
> is used to generate periodic pulses. The down count
> register loads the value programmed in the fixed period
> interval (FIPER). At every tick of the timer accumulator
> overflow, the counter decrements by the value of
> TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
> counter value reaches zero. It reloads the down counter
> in the cycle following a pulse.
> 
> To use the TMR_FIPER register to generate desired periodic
> pulses. The value should programmed is,
> desired_period - tclk_period
> 
> Current tmr-fiper2 value is to generate 100us periodic pulses.
> (But the value should have been 99995, not 99990. The tclk_period is 5.)
> This patch is to generate 1 second periodic pulses with value
> 999999995 programmed which is more desired by user.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Acked-by: Richard Cochran <richardcochran@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-05-22  1:30 [v3] ARM: dts: ls1021a: output PPS signal on FIPER2 Yangbo Lu
  2020-05-22  2:43 ` Richard Cochran
@ 2020-06-08  3:28 ` Y.b. Lu
  2020-06-08 22:19 ` Leo Li
  2020-06-18  7:31 ` Shawn Guo
  3 siblings, 0 replies; 9+ messages in thread
From: Y.b. Lu @ 2020-06-08  3:28 UTC (permalink / raw)
  To: linux-arm-kernel, Shawn Guo; +Cc: Richard Cochran, Leo Li

Hi Shawn,

Will you help to merge the patch?
Thanks.

Best regards,
Yangbo Lu

> -----Original Message-----
> From: Yangbo Lu <yangbo.lu@nxp.com>
> Sent: Friday, May 22, 2020 9:31 AM
> To: linux-arm-kernel@lists.infradead.org
> Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>; Leo Li
> <leoyang.li@nxp.com>; Richard Cochran <richardcochran@gmail.com>
> Subject: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> The timer fixed interval period pulse generator register
> is used to generate periodic pulses. The down count
> register loads the value programmed in the fixed period
> interval (FIPER). At every tick of the timer accumulator
> overflow, the counter decrements by the value of
> TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
> counter value reaches zero. It reloads the down counter
> in the cycle following a pulse.
> 
> To use the TMR_FIPER register to generate desired periodic
> pulses. The value should programmed is,
> desired_period - tclk_period
> 
> Current tmr-fiper2 value is to generate 100us periodic pulses.
> (But the value should have been 99995, not 99990. The tclk_period is 5.)
> This patch is to generate 1 second periodic pulses with value
> 999999995 programmed which is more desired by user.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
> Changes for v2:
> 	- Added more discription in commit message.
> Changes for v3:
> 	- Mentioned effect of the change in commit message.
> ---
>  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>;
>  			fsl,max-adj     = <499999999>;
>  			fsl,extts-fifo;
>  		};
> --
> 2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-05-22  1:30 [v3] ARM: dts: ls1021a: output PPS signal on FIPER2 Yangbo Lu
  2020-05-22  2:43 ` Richard Cochran
  2020-06-08  3:28 ` Y.b. Lu
@ 2020-06-08 22:19 ` Leo Li
  2020-06-09  2:29   ` Y.b. Lu
  2020-06-18  7:31 ` Shawn Guo
  3 siblings, 1 reply; 9+ messages in thread
From: Leo Li @ 2020-06-08 22:19 UTC (permalink / raw)
  To: Y.b. Lu, linux-arm-kernel; +Cc: Richard Cochran, Shawn Guo, Y.b. Lu



> -----Original Message-----
> From: Yangbo Lu <yangbo.lu@nxp.com>
> Sent: Thursday, May 21, 2020 8:31 PM
> To: linux-arm-kernel@lists.infradead.org
> Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>; Leo
> Li <leoyang.li@nxp.com>; Richard Cochran <richardcochran@gmail.com>
> Subject: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> The timer fixed interval period pulse generator register is used to generate
> periodic pulses. The down count register loads the value programmed in the
> fixed period interval (FIPER). At every tick of the timer accumulator overflow,
> the counter decrements by the value of TMR_CTRL[TCLK_PERIOD]. It
> generates a pulse when the down counter value reaches zero. It reloads the
> down counter in the cycle following a pulse.
> 
> To use the TMR_FIPER register to generate desired periodic pulses. The
> value should programmed is, desired_period - tclk_period
> 
> Current tmr-fiper2 value is to generate 100us periodic pulses.
> (But the value should have been 99995, not 99990. The tclk_period is 5.) This
> patch is to generate 1 second periodic pulses with value
> 999999995 programmed which is more desired by user.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
> Changes for v2:
> 	- Added more discription in commit message.
> Changes for v3:
> 	- Mentioned effect of the change in commit message.
> ---
>  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>;

I noticed that the fiper2 is now the same as fiper1.  Can we just use fiper1 to generate the 1s pulse?  Or both of them have to be used?

>  			fsl,max-adj     = <499999999>;
>  			fsl,extts-fifo;
>  		};
> --
> 2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-06-08 22:19 ` Leo Li
@ 2020-06-09  2:29   ` Y.b. Lu
  2020-06-09 21:59     ` Leo Li
  0 siblings, 1 reply; 9+ messages in thread
From: Y.b. Lu @ 2020-06-09  2:29 UTC (permalink / raw)
  To: Leo Li, linux-arm-kernel; +Cc: Richard Cochran, Shawn Guo

Hi Leo,

> -----Original Message-----
> From: Leo Li <leoyang.li@nxp.com>
> Sent: Tuesday, June 9, 2020 6:20 AM
> To: Y.b. Lu <yangbo.lu@nxp.com>; linux-arm-kernel@lists.infradead.org
> Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>;
> Richard Cochran <richardcochran@gmail.com>
> Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> 
> 
> > -----Original Message-----
> > From: Yangbo Lu <yangbo.lu@nxp.com>
> > Sent: Thursday, May 21, 2020 8:31 PM
> > To: linux-arm-kernel@lists.infradead.org
> > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>; Leo
> > Li <leoyang.li@nxp.com>; Richard Cochran <richardcochran@gmail.com>
> > Subject: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> >
> > The timer fixed interval period pulse generator register is used to generate
> > periodic pulses. The down count register loads the value programmed in the
> > fixed period interval (FIPER). At every tick of the timer accumulator overflow,
> > the counter decrements by the value of TMR_CTRL[TCLK_PERIOD]. It
> > generates a pulse when the down counter value reaches zero. It reloads the
> > down counter in the cycle following a pulse.
> >
> > To use the TMR_FIPER register to generate desired periodic pulses. The
> > value should programmed is, desired_period - tclk_period
> >
> > Current tmr-fiper2 value is to generate 100us periodic pulses.
> > (But the value should have been 99995, not 99990. The tclk_period is 5.)
> This
> > patch is to generate 1 second periodic pulses with value
> > 999999995 programmed which is more desired by user.
> >
> > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > ---
> > Changes for v2:
> > 	- Added more discription in commit message.
> > Changes for v3:
> > 	- Mentioned effect of the change in commit message.
> > ---
> >  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>;
> 
> I noticed that the fiper2 is now the same as fiper1.  Can we just use fiper1 to
> generate the 1s pulse?  Or both of them have to be used?

PPS signal is frequently used by users. And more than 1 channel may be needed.
I think we can configure two PPS signals on fiper1/fiper2 in default.
For specific periodic pulse, user can configure the period wanted by themselves.
Thanks.

> 
> >  			fsl,max-adj     = <499999999>;
> >  			fsl,extts-fifo;
> >  		};
> > --
> > 2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-06-09  2:29   ` Y.b. Lu
@ 2020-06-09 21:59     ` Leo Li
  2020-06-10  3:18       ` Y.b. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Li @ 2020-06-09 21:59 UTC (permalink / raw)
  To: Y.b. Lu, linux-arm-kernel; +Cc: Richard Cochran, Shawn Guo



> -----Original Message-----
> From: Y.b. Lu <yangbo.lu@nxp.com>
> Sent: Monday, June 8, 2020 9:30 PM
> To: Leo Li <leoyang.li@nxp.com>; linux-arm-kernel@lists.infradead.org
> Cc: Shawn Guo <shawnguo@kernel.org>; Richard Cochran
> <richardcochran@gmail.com>
> Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> Hi Leo,
> 
> > -----Original Message-----
> > From: Leo Li <leoyang.li@nxp.com>
> > Sent: Tuesday, June 9, 2020 6:20 AM
> > To: Y.b. Lu <yangbo.lu@nxp.com>; linux-arm-kernel@lists.infradead.org
> > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>;
> > Richard Cochran <richardcochran@gmail.com>
> > Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> >
> >
> >
> > > -----Original Message-----
> > > From: Yangbo Lu <yangbo.lu@nxp.com>
> > > Sent: Thursday, May 21, 2020 8:31 PM
> > > To: linux-arm-kernel@lists.infradead.org
> > > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>;
> > > Leo Li <leoyang.li@nxp.com>; Richard Cochran
> > > <richardcochran@gmail.com>
> > > Subject: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> > >
> > > The timer fixed interval period pulse generator register is used to
> > > generate periodic pulses. The down count register loads the value
> > > programmed in the fixed period interval (FIPER). At every tick of
> > > the timer accumulator overflow, the counter decrements by the value
> > > of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
> counter
> > > value reaches zero. It reloads the down counter in the cycle following a
> pulse.
> > >
> > > To use the TMR_FIPER register to generate desired periodic pulses.
> > > The value should programmed is, desired_period - tclk_period
> > >
> > > Current tmr-fiper2 value is to generate 100us periodic pulses.
> > > (But the value should have been 99995, not 99990. The tclk_period is
> > > 5.)
> > This
> > > patch is to generate 1 second periodic pulses with value
> > > 999999995 programmed which is more desired by user.
> > >
> > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > > ---
> > > Changes for v2:
> > > 	- Added more discription in commit message.
> > > Changes for v3:
> > > 	- Mentioned effect of the change in commit message.
> > > ---
> > >  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>;
> >
> > I noticed that the fiper2 is now the same as fiper1.  Can we just use
> > fiper1 to generate the 1s pulse?  Or both of them have to be used?
> 
> PPS signal is frequently used by users. And more than 1 channel may be
> needed.
> I think we can configure two PPS signals on fiper1/fiper2 in default.
> For specific periodic pulse, user can configure the period wanted by
> themselves.

If this is an application specific setting, wouldn't it be better to be part of the board dts instead of the SoC dtsi?

Regards,
Leo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-06-09 21:59     ` Leo Li
@ 2020-06-10  3:18       ` Y.b. Lu
  2020-06-17  4:23         ` Y.b. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Y.b. Lu @ 2020-06-10  3:18 UTC (permalink / raw)
  To: Leo Li, linux-arm-kernel; +Cc: Richard Cochran, Shawn Guo

Hi Leo,

> -----Original Message-----
> From: Leo Li <leoyang.li@nxp.com>
> Sent: Wednesday, June 10, 2020 6:00 AM
> To: Y.b. Lu <yangbo.lu@nxp.com>; linux-arm-kernel@lists.infradead.org
> Cc: Shawn Guo <shawnguo@kernel.org>; Richard Cochran
> <richardcochran@gmail.com>
> Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> 
> 
> > -----Original Message-----
> > From: Y.b. Lu <yangbo.lu@nxp.com>
> > Sent: Monday, June 8, 2020 9:30 PM
> > To: Leo Li <leoyang.li@nxp.com>; linux-arm-kernel@lists.infradead.org
> > Cc: Shawn Guo <shawnguo@kernel.org>; Richard Cochran
> > <richardcochran@gmail.com>
> > Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> >
> > Hi Leo,
> >
> > > -----Original Message-----
> > > From: Leo Li <leoyang.li@nxp.com>
> > > Sent: Tuesday, June 9, 2020 6:20 AM
> > > To: Y.b. Lu <yangbo.lu@nxp.com>; linux-arm-kernel@lists.infradead.org
> > > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>;
> > > Richard Cochran <richardcochran@gmail.com>
> > > Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Yangbo Lu <yangbo.lu@nxp.com>
> > > > Sent: Thursday, May 21, 2020 8:31 PM
> > > > To: linux-arm-kernel@lists.infradead.org
> > > > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>;
> > > > Leo Li <leoyang.li@nxp.com>; Richard Cochran
> > > > <richardcochran@gmail.com>
> > > > Subject: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> > > >
> > > > The timer fixed interval period pulse generator register is used to
> > > > generate periodic pulses. The down count register loads the value
> > > > programmed in the fixed period interval (FIPER). At every tick of
> > > > the timer accumulator overflow, the counter decrements by the value
> > > > of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
> > counter
> > > > value reaches zero. It reloads the down counter in the cycle following a
> > pulse.
> > > >
> > > > To use the TMR_FIPER register to generate desired periodic pulses.
> > > > The value should programmed is, desired_period - tclk_period
> > > >
> > > > Current tmr-fiper2 value is to generate 100us periodic pulses.
> > > > (But the value should have been 99995, not 99990. The tclk_period is
> > > > 5.)
> > > This
> > > > patch is to generate 1 second periodic pulses with value
> > > > 999999995 programmed which is more desired by user.
> > > >
> > > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > > > ---
> > > > Changes for v2:
> > > > 	- Added more discription in commit message.
> > > > Changes for v3:
> > > > 	- Mentioned effect of the change in commit message.
> > > > ---
> > > >  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>;
> > >
> > > I noticed that the fiper2 is now the same as fiper1.  Can we just use
> > > fiper1 to generate the 1s pulse?  Or both of them have to be used?
> >
> > PPS signal is frequently used by users. And more than 1 channel may be
> > needed.
> > I think we can configure two PPS signals on fiper1/fiper2 in default.
> > For specific periodic pulse, user can configure the period wanted by
> > themselves.
> 
> If this is an application specific setting, wouldn't it be better to be part of the
> board dts instead of the SoC dtsi?

These provide the default setting to the 1588 timer regardless the boards.
I don't think we need to copy them to each board dts file.
Thanks.

> 
> Regards,
> Leo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-06-10  3:18       ` Y.b. Lu
@ 2020-06-17  4:23         ` Y.b. Lu
  0 siblings, 0 replies; 9+ messages in thread
From: Y.b. Lu @ 2020-06-17  4:23 UTC (permalink / raw)
  To: Leo Li, Shawn Guo, linux-arm-kernel; +Cc: Richard Cochran

Hi Shawn and Leo,

Will you help to merge this patch?
Thanks.

Best regards,
Yangbo Lu

> -----Original Message-----
> From: Y.b. Lu
> Sent: Wednesday, June 10, 2020 11:18 AM
> To: Leo Li <leoyang.li@nxp.com>; linux-arm-kernel@lists.infradead.org
> Cc: Shawn Guo <shawnguo@kernel.org>; Richard Cochran
> <richardcochran@gmail.com>
> Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> 
> Hi Leo,
> 
> > -----Original Message-----
> > From: Leo Li <leoyang.li@nxp.com>
> > Sent: Wednesday, June 10, 2020 6:00 AM
> > To: Y.b. Lu <yangbo.lu@nxp.com>; linux-arm-kernel@lists.infradead.org
> > Cc: Shawn Guo <shawnguo@kernel.org>; Richard Cochran
> > <richardcochran@gmail.com>
> > Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> >
> >
> >
> > > -----Original Message-----
> > > From: Y.b. Lu <yangbo.lu@nxp.com>
> > > Sent: Monday, June 8, 2020 9:30 PM
> > > To: Leo Li <leoyang.li@nxp.com>; linux-arm-kernel@lists.infradead.org
> > > Cc: Shawn Guo <shawnguo@kernel.org>; Richard Cochran
> > > <richardcochran@gmail.com>
> > > Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> > >
> > > Hi Leo,
> > >
> > > > -----Original Message-----
> > > > From: Leo Li <leoyang.li@nxp.com>
> > > > Sent: Tuesday, June 9, 2020 6:20 AM
> > > > To: Y.b. Lu <yangbo.lu@nxp.com>; linux-arm-kernel@lists.infradead.org
> > > > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo <shawnguo@kernel.org>;
> > > > Richard Cochran <richardcochran@gmail.com>
> > > > Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Yangbo Lu <yangbo.lu@nxp.com>
> > > > > Sent: Thursday, May 21, 2020 8:31 PM
> > > > > To: linux-arm-kernel@lists.infradead.org
> > > > > Cc: Y.b. Lu <yangbo.lu@nxp.com>; Shawn Guo
> <shawnguo@kernel.org>;
> > > > > Leo Li <leoyang.li@nxp.com>; Richard Cochran
> > > > > <richardcochran@gmail.com>
> > > > > Subject: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
> > > > >
> > > > > The timer fixed interval period pulse generator register is used to
> > > > > generate periodic pulses. The down count register loads the value
> > > > > programmed in the fixed period interval (FIPER). At every tick of
> > > > > the timer accumulator overflow, the counter decrements by the value
> > > > > of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
> > > counter
> > > > > value reaches zero. It reloads the down counter in the cycle following a
> > > pulse.
> > > > >
> > > > > To use the TMR_FIPER register to generate desired periodic pulses.
> > > > > The value should programmed is, desired_period - tclk_period
> > > > >
> > > > > Current tmr-fiper2 value is to generate 100us periodic pulses.
> > > > > (But the value should have been 99995, not 99990. The tclk_period is
> > > > > 5.)
> > > > This
> > > > > patch is to generate 1 second periodic pulses with value
> > > > > 999999995 programmed which is more desired by user.
> > > > >
> > > > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > > > > ---
> > > > > Changes for v2:
> > > > > 	- Added more discription in commit message.
> > > > > Changes for v3:
> > > > > 	- Mentioned effect of the change in commit message.
> > > > > ---
> > > > >  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>;
> > > >
> > > > I noticed that the fiper2 is now the same as fiper1.  Can we just use
> > > > fiper1 to generate the 1s pulse?  Or both of them have to be used?
> > >
> > > PPS signal is frequently used by users. And more than 1 channel may be
> > > needed.
> > > I think we can configure two PPS signals on fiper1/fiper2 in default.
> > > For specific periodic pulse, user can configure the period wanted by
> > > themselves.
> >
> > If this is an application specific setting, wouldn't it be better to be part of the
> > board dts instead of the SoC dtsi?
> 
> These provide the default setting to the 1588 timer regardless the boards.
> I don't think we need to copy them to each board dts file.
> Thanks.
> 
> >
> > Regards,
> > Leo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2
  2020-05-22  1:30 [v3] ARM: dts: ls1021a: output PPS signal on FIPER2 Yangbo Lu
                   ` (2 preceding siblings ...)
  2020-06-08 22:19 ` Leo Li
@ 2020-06-18  7:31 ` Shawn Guo
  3 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2020-06-18  7:31 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: Richard Cochran, linux-arm-kernel, Li Yang

On Fri, May 22, 2020 at 09:30:52AM +0800, Yangbo Lu wrote:
> The timer fixed interval period pulse generator register
> is used to generate periodic pulses. The down count
> register loads the value programmed in the fixed period
> interval (FIPER). At every tick of the timer accumulator
> overflow, the counter decrements by the value of
> TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down
> counter value reaches zero. It reloads the down counter
> in the cycle following a pulse.
> 
> To use the TMR_FIPER register to generate desired periodic
> pulses. The value should programmed is,
> desired_period - tclk_period
> 
> Current tmr-fiper2 value is to generate 100us periodic pulses.
> (But the value should have been 99995, not 99990. The tclk_period is 5.)
> This patch is to generate 1 second periodic pulses with value
> 999999995 programmed which is more desired by user.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-18  7:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22  1:30 [v3] ARM: dts: ls1021a: output PPS signal on FIPER2 Yangbo Lu
2020-05-22  2:43 ` Richard Cochran
2020-06-08  3:28 ` Y.b. Lu
2020-06-08 22:19 ` Leo Li
2020-06-09  2:29   ` Y.b. Lu
2020-06-09 21:59     ` Leo Li
2020-06-10  3:18       ` Y.b. Lu
2020-06-17  4:23         ` Y.b. Lu
2020-06-18  7:31 ` Shawn Guo

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.