Skip to contentSkip to conversation

ARM: dts: ls1021a: output PPS signal on FIPER2

PATCH Applied Yangbo Lu 4 participants 9 messages May 22, 2020 – Jun 18, 2020 Device tree bindings

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH v3 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 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.

---
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(-)
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
Acked-by on v3 1/1
#1 lore raw
Quoted 13 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 desired periodic pulses. The value should programmed is, desired_period - tclk_period

Quoted 6 lines

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.

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

author
#2 lore raw
In reply to Yangbo Lu

Hi Shawn,

Will you help to merge the patch?
Thanks.

Best regards,
Yangbo Lu

Quoted 50 lines

-----Original Message-----
From: Yangbo Lu <[email protected]>
Sent: Friday, May 22, 2020 9:31 AM
To: [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Richard Cochran <[email protected]>
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.

---
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(-)
arch/arm/boot/dts/ls1021a.dtsi +1 -2
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;
 		};
--
Quoted 1 line

2.7.4

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

#3 lore raw
In reply to Yangbo Lu
Quoted 40 lines

-----Original Message-----
From: Yangbo Lu <[email protected]>
Sent: Thursday, May 21, 2020 8:31 PM
To: [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Richard Cochran <[email protected]>
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.

---
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(-)
arch/arm/boot/dts/ls1021a.dtsi +0 -0
index 760a68c..b2ff27a 100644

arch/arm/boot/dts/ls1021a.dtsi line 775

Quoted 5 lines
arch/arm/boot/dts/ls1021a.dtsi +1 -1
@@ -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?

Quoted 5 lines
arch/arm/boot/dts/ls1021a.dtsi +0 -1
 			fsl,max-adj     = <499999999>;
 			fsl,extts-fifo;
 		};
--

2.7.4

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

author
#4 lore raw

Hi Leo,

Quoted 44 lines

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Tuesday, June 9, 2020 6:20 AM
To: Y.b. Lu <[email protected]>; [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 15 lines

-----Original Message-----
From: Yangbo Lu <[email protected]>
Sent: Thursday, May 21, 2020 8:31 PM
To: [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Richard Cochran <[email protected]>
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.

Quoted 5 lines

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

Quoted 13 lines

patch is to generate 1 second periodic pulses with value 999999995 programmed which is more desired by user.

---
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(-)
Quoted 13 lines

arch/arm/boot/dts/ls1021a.dtsi line 775

Quoted 10 lines
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>;

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.

Quoted 6 lines
Quoted 6 lines
arch/arm/boot/dts/ls1021a.dtsi +0 -1
 			fsl,max-adj     = <499999999>;
 			fsl,extts-fifo;
 		};
--

2.7.4

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

#5 lore raw
Quoted 74 lines

-----Original Message-----
From: Y.b. Lu <[email protected]>
Sent: Monday, June 8, 2020 9:30 PM
To: Leo Li <[email protected]>; [email protected]
Cc: Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Hi Leo,

Quoted 24 lines

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Tuesday, June 9, 2020 6:20 AM
To: Y.b. Lu <[email protected]>; [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 14 lines

-----Original Message-----
From: Yangbo Lu <[email protected]>
Sent: Thursday, May 21, 2020 8:31 PM
To: [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Richard Cochran <[email protected]>
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

Quoted 1 line
Quoted 1 line

value reaches zero. It reloads the down counter in the cycle following a

pulse.

Quoted 21 lines
Quoted 7 lines

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

Quoted 13 lines

patch is to generate 1 second periodic pulses with value 999999995 programmed which is more desired by user.

---
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(-)
Quoted 13 lines

arch/arm/boot/dts/ls1021a.dtsi line 775

Quoted 10 lines
(quoted diff) +0 -0

b/arch/arm/boot/dts/ls1021a.dtsi index 760a68c..b2ff27a 100644

arch/arm/boot/dts/ls1021a.dtsi +1 -1
@@ -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?

Quoted 5 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#6 lore raw

Hi Leo,

Quoted 82 lines

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Wednesday, June 10, 2020 6:00 AM
To: Y.b. Lu <[email protected]>; [email protected]
Cc: Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 72 lines

-----Original Message-----
From: Y.b. Lu <[email protected]>
Sent: Monday, June 8, 2020 9:30 PM
To: Leo Li <[email protected]>; [email protected]
Cc: Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Hi Leo,

Quoted 24 lines

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Tuesday, June 9, 2020 6:20 AM
To: Y.b. Lu <[email protected]>; [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 14 lines

-----Original Message-----
From: Yangbo Lu <[email protected]>
Sent: Thursday, May 21, 2020 8:31 PM
To: [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Richard Cochran <[email protected]>
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

Quoted 1 line
Quoted 1 line

value reaches zero. It reloads the down counter in the cycle following a

pulse.

Quoted 34 lines
Quoted 7 lines

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

Quoted 18 lines

patch is to generate 1 second periodic pulses with value 999999995 programmed which is more desired by user.

---
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(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/ls1021a.dtsi index 760a68c..b2ff27a 100644

arch/arm/boot/dts/ls1021a.dtsi line 775

Quoted 5 lines
arch/arm/boot/dts/ls1021a.dtsi +1 -1
@@ -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?

Quoted 8 lines
Quoted 5 lines

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.

Quoted 3 lines

Regards,
Leo

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

author
#7 lore raw

Hi Shawn and Leo,

Will you help to merge this patch?
Thanks.

Best regards,
Yangbo Lu

Quoted 99 lines

-----Original Message-----
From: Y.b. Lu
Sent: Wednesday, June 10, 2020 11:18 AM
To: Leo Li <[email protected]>; [email protected]
Cc: Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Hi Leo,

Quoted 35 lines

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Wednesday, June 10, 2020 6:00 AM
To: Y.b. Lu <[email protected]>; [email protected]
Cc: Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 25 lines

-----Original Message-----
From: Y.b. Lu <[email protected]>
Sent: Monday, June 8, 2020 9:30 PM
To: Leo Li <[email protected]>; [email protected]
Cc: Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Hi Leo,

Quoted 15 lines

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Tuesday, June 9, 2020 6:20 AM
To: Y.b. Lu <[email protected]>; [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo <[email protected]>; Richard Cochran <[email protected]>
Subject: RE: [v3] ARM: dts: ls1021a: output PPS signal on FIPER2

Quoted 5 lines

-----Original Message-----
From: Yangbo Lu <[email protected]>
Sent: Thursday, May 21, 2020 8:31 PM
To: [email protected]
Cc: Y.b. Lu <[email protected]>; Shawn Guo

<[email protected]>;

Quoted 53 lines
Quoted 52 lines
Quoted 9 lines
Quoted 9 lines

Leo Li <[email protected]>; Richard Cochran <[email protected]>
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

Quoted 1 line
Quoted 1 line

value reaches zero. It reloads the down counter in the cycle following a

pulse.

Quoted 21 lines
Quoted 7 lines

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

Quoted 13 lines

patch is to generate 1 second periodic pulses with value 999999995 programmed which is more desired by user.

---
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(-)
Quoted 13 lines

arch/arm/boot/dts/ls1021a.dtsi line 775

Quoted 10 lines
(quoted diff) +0 -0

b/arch/arm/boot/dts/ls1021a.dtsi index 760a68c..b2ff27a 100644

arch/arm/boot/dts/ls1021a.dtsi +1 -1
@@ -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.

Quoted 10 lines
Quoted 2 lines

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.

Quoted 3 lines

Regards,
Leo

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

Applied
#8 lore raw
In reply to Yangbo Lu
Quoted 13 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 desired periodic pulses. The value should programmed is, desired_period - tclk_period

Quoted 6 lines

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.

Applied, thanks.

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