Skip to contentSkip to conversation

ARM: dts: ls1021a: output PPS signal on FIPER2

PATCH Superseded Yangbo Lu 2 participants 3 messages May 19, 2020 – May 22, 2020 Device tree bindings

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH v2 1/1 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 a 1 PPS event, the value (10^9 nanoseconds) - TCLK_PERIOD should be programmed. It should be 999999995 since TCLK_PERIOD is 5.

This patch is to output PPS signal on FIPER2 which is more desired by user.

---
Changes for v2:
- Added more discription in commit message.

---
 arch/arm/boot/dts/ls1021a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ls1021a.dtsi +1 -1
index 760a68c..b2ff27a 100644
@@ -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;
 		};
Signature · 7 lines
2.7.4


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw
Quoted 12 lines · 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 a 1 PPS event, the value (10^9 nanoseconds) - TCLK_PERIOD should be programmed. It should be 999999995 since TCLK_PERIOD is 5.

Quoted 2 lines

This patch is to output PPS signal on FIPER2 which is more desired by user.

I think it wouldn't hurt to spell out the effect of this change:
Before, the period of FIPER2 was 100 microseconds. Now, the period of FIPER2 is one second.

Thanks,
Richard

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#2 lore raw
Quoted 21 lines

-----Original Message-----
From: Richard Cochran <[email protected]>
Sent: Wednesday, May 20, 2020 12:15 AM
To: Y.b. Lu <[email protected]>
Cc: [email protected]; Shawn Guo <[email protected]>; Leo Li <[email protected]>
Subject: Re: [v2] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 12 lines · 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 a 1 PPS event, the value (10^9 nanoseconds) - TCLK_PERIOD should be programmed. It should be 999999995 since TCLK_PERIOD is 5.

Quoted 6 lines
Quoted 2 lines

This patch is to output PPS signal on FIPER2 which is more desired by user.

I think it wouldn't hurt to spell out the effect of this change:
Before, the period of FIPER2 was 100 microseconds. Now, the period of FIPER2 is one second.

Yes. I sent out the v3 to mentioned the effect of the change. Thanks!

Quoted 3 lines

Thanks,
Richard

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel