linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer
@ 2015-08-12  4:01 Dongsheng Wang
  2015-08-12  4:01 ` [PATCH v3 2/2] ARM: dts: ls1021a: add wakeup device ftm0 node for ls1021a Dongsheng Wang
  2015-08-13 16:23 ` [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Stuart Yoder
  0 siblings, 2 replies; 4+ messages in thread
From: Dongsheng Wang @ 2015-08-12  4:01 UTC (permalink / raw)
  To: shawn.guo
  Cc: alison.wang, devicetree, linux-arm-kernel, linux-kernel, Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@freescale.com>

In freescale layerscape platform there is only FTM0 can be used as
alarm timer to wake up system. So add FTM0 description for devicetree
document.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
---
V3:
Include this patch in V3.

diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
index aa8c402..380a0b3d 100644
--- a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
+++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
@@ -1,5 +1,7 @@
 Freescale FlexTimer Module (FTM) Timer
 
+* Default FTM Timer
+
 Required properties:
 
 - compatible : should be "fsl,ftm-timer"
@@ -29,3 +31,26 @@ ftm: ftm@400b8000 {
 		<&clks VF610_CLK_FTM3_EXT_FIX_EN>;
 	big-endian;
 };
+
+* FTM Alarm Timer
+  The default FTM device contains eight FlexTimer modules. FlexTimer1 is in
+  on-domain(power is not switched off in deep sleep mode). Other seven FlexTimer
+  modules(flextimer2/3/4/5/6/7/8) are in off-domain (power is switched off in
+  deep sleep mode).
+
+Required properties:
+
+- compatible : should be "fsl,ftm-alarm".
+- reg : should contain base address and length of FTM timer 0 register.
+- interrupts : Should contain FTM 0 interrupt.
+- big-endian: One boolean property, the big endian mode will be in use if it is
+  present, or the little endian mode will be in use for all the device registers.
+
+Example:
+ftm0: ftm0@29d0000 {
+	compatible = "fsl,ftm-alarm";
+	reg = <0x0 0x29d0000 0x0 0x10000>;
+	interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+	big-endian;
+	status = "disabled";
+};
-- 
2.1.0.27.g96db324


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

* [PATCH v3 2/2] ARM: dts: ls1021a: add wakeup device ftm0 node for ls1021a
  2015-08-12  4:01 [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Dongsheng Wang
@ 2015-08-12  4:01 ` Dongsheng Wang
  2015-08-13 16:23 ` [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Stuart Yoder
  1 sibling, 0 replies; 4+ messages in thread
From: Dongsheng Wang @ 2015-08-12  4:01 UTC (permalink / raw)
  To: shawn.guo
  Cc: alison.wang, devicetree, linux-arm-kernel, linux-kernel, Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@freescale.com>

Add ftm0 node, cause of ftm0 can be set as a alarm before system going
to deep sleep.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
---
*V3*
- No changes.

*V2*
- Add my SoB.
- Use "ARM:" as subject prefix.

diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts
index 9c5e16b..f14731b 100644
--- a/arch/arm/boot/dts/ls1021a-qds.dts
+++ b/arch/arm/boot/dts/ls1021a-qds.dts
@@ -75,6 +75,10 @@
 	};
 };
 
+&ftm0 {
+	status = "okay";
+};
+
 &i2c0 {
 	status = "okay";
 
diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index c70bb27..7e9e122 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -332,6 +332,14 @@
 			status = "disabled";
 		};
 
+		ftm0: ftm0@29d0000 {
+			compatible = "fsl,ftm-alarm";
+			reg = <0x0 0x29d0000 0x0 0x10000>;
+			interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+			big-endian;
+			status = "disabled";
+		};
+
 		wdog0: watchdog@2ad0000 {
 			compatible = "fsl,imx21-wdt";
 			reg = <0x0 0x2ad0000 0x0 0x10000>;
-- 
2.1.0.27.g96db324


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

* Re: [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer
  2015-08-12  4:01 [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Dongsheng Wang
  2015-08-12  4:01 ` [PATCH v3 2/2] ARM: dts: ls1021a: add wakeup device ftm0 node for ls1021a Dongsheng Wang
@ 2015-08-13 16:23 ` Stuart Yoder
  2015-08-14  3:24   ` Wang Dongsheng
  1 sibling, 1 reply; 4+ messages in thread
From: Stuart Yoder @ 2015-08-13 16:23 UTC (permalink / raw)
  To: Dongsheng Wang
  Cc: shawn.guo, devicetree, linux-kernel, linux-arm-kernel, alison.wang

On Tue, Aug 11, 2015 at 11:01 PM, Dongsheng Wang
<dongsheng.wang@freescale.com> wrote:
> From: Wang Dongsheng <dongsheng.wang@freescale.com>
>
> In freescale layerscape platform there is only FTM0 can be used as
> alarm timer to wake up system. So add FTM0 description for devicetree
> document.

Suggestion:

In the Freescale Layerscape platform a flextimer module can be used
as an alarm timer to wake up the system.  Define a binding for this
alarm.

> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> ---
> V3:
> Include this patch in V3.
>
> diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> index aa8c402..380a0b3d 100644
> --- a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> +++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> @@ -1,5 +1,7 @@
>  Freescale FlexTimer Module (FTM) Timer
>
> +* Default FTM Timer
> +
>  Required properties:
>
>  - compatible : should be "fsl,ftm-timer"
> @@ -29,3 +31,26 @@ ftm: ftm@400b8000 {
>                 <&clks VF610_CLK_FTM3_EXT_FIX_EN>;
>         big-endian;
>  };
> +
> +* FTM Alarm Timer
> +  The default FTM device contains eight FlexTimer modules. FlexTimer1 is in
> +  on-domain(power is not switched off in deep sleep mode). Other seven FlexTimer
> +  modules(flextimer2/3/4/5/6/7/8) are in off-domain (power is switched off in
> +  deep sleep mode).

Suggestion:

  This binding describes a Flextimer (FTM) instance that can be used as an alarm
  to wake up a system in deep sleep.  The flextimer module with alarm
  support is in a power domain that remains awake when the SoC is in
  deep sleep mode.

(don't use flextimer1 in the binding...for all you know in the next SoC it
will be flextimer7 that has this capability)

> +Required properties:
> +
> +- compatible : should be "fsl,ftm-alarm".
> +- reg : should contain base address and length of FTM timer 0 register.

  "should contain the address and size of the FTM alarm module registers"

(don't use the number 0)

> +- interrupts : Should contain FTM 0 interrupt.

   "describes the FTM alarm interrupt"

> +- big-endian: One boolean property, the big endian mode will be in use if it is
> +  present, or the little endian mode will be in use for all the device registers.
> +
> +Example:
> +ftm0: ftm0@29d0000 {
> +       compatible = "fsl,ftm-alarm";
> +       reg = <0x0 0x29d0000 0x0 0x10000>;
> +       interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
> +       big-endian;
> +       status = "disabled";
> +};

Drop the number 0 from the names in your example.

Thanks,
Stuart

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

* RE: [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer
  2015-08-13 16:23 ` [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Stuart Yoder
@ 2015-08-14  3:24   ` Wang Dongsheng
  0 siblings, 0 replies; 4+ messages in thread
From: Wang Dongsheng @ 2015-08-14  3:24 UTC (permalink / raw)
  To: Stuart Yoder
  Cc: shawn.guo, devicetree, linux-kernel, linux-arm-kernel, Huan Wang

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3395 bytes --]

Thank Yoder,

Fix them in next version.

Regards,
-Dongsheng

> -----Original Message-----
> From: Stuart Yoder [mailto:b08248@gmail.com]
> Sent: Friday, August 14, 2015 12:23 AM
> To: Wang Dongsheng-B40534
> Cc: shawn.guo@linaro.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Wang Huan-B18965
> Subject: Re: [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm
> timer
> 
> On Tue, Aug 11, 2015 at 11:01 PM, Dongsheng Wang
> <dongsheng.wang@freescale.com> wrote:
> > From: Wang Dongsheng <dongsheng.wang@freescale.com>
> >
> > In freescale layerscape platform there is only FTM0 can be used as
> > alarm timer to wake up system. So add FTM0 description for devicetree
> > document.
> 
> Suggestion:
> 
> In the Freescale Layerscape platform a flextimer module can be used
> as an alarm timer to wake up the system.  Define a binding for this
> alarm.
> 
> > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> > ---
> > V3:
> > Include this patch in V3.
> >
> > diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> > index aa8c402..380a0b3d 100644
> > --- a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> > +++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> > @@ -1,5 +1,7 @@
> >  Freescale FlexTimer Module (FTM) Timer
> >
> > +* Default FTM Timer
> > +
> >  Required properties:
> >
> >  - compatible : should be "fsl,ftm-timer"
> > @@ -29,3 +31,26 @@ ftm: ftm@400b8000 {
> >                 <&clks VF610_CLK_FTM3_EXT_FIX_EN>;
> >         big-endian;
> >  };
> > +
> > +* FTM Alarm Timer
> > +  The default FTM device contains eight FlexTimer modules. FlexTimer1 is in
> > +  on-domain(power is not switched off in deep sleep mode). Other seven
> FlexTimer
> > +  modules(flextimer2/3/4/5/6/7/8) are in off-domain (power is switched off in
> > +  deep sleep mode).
> 
> Suggestion:
> 
>   This binding describes a Flextimer (FTM) instance that can be used as an alarm
>   to wake up a system in deep sleep.  The flextimer module with alarm
>   support is in a power domain that remains awake when the SoC is in
>   deep sleep mode.
> 
> (don't use flextimer1 in the binding...for all you know in the next SoC it
> will be flextimer7 that has this capability)
> 
> > +Required properties:
> > +
> > +- compatible : should be "fsl,ftm-alarm".
> > +- reg : should contain base address and length of FTM timer 0 register.
> 
>   "should contain the address and size of the FTM alarm module registers"
> 
> (don't use the number 0)
> 
> > +- interrupts : Should contain FTM 0 interrupt.
> 
>    "describes the FTM alarm interrupt"
> 
> > +- big-endian: One boolean property, the big endian mode will be in use if it
> is
> > +  present, or the little endian mode will be in use for all the device
> registers.
> > +
> > +Example:
> > +ftm0: ftm0@29d0000 {
> > +       compatible = "fsl,ftm-alarm";
> > +       reg = <0x0 0x29d0000 0x0 0x10000>;
> > +       interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
> > +       big-endian;
> > +       status = "disabled";
> > +};
> 
> Drop the number 0 from the names in your example.
> 
> Thanks,
> Stuart
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

end of thread, other threads:[~2015-08-14  3:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12  4:01 [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Dongsheng Wang
2015-08-12  4:01 ` [PATCH v3 2/2] ARM: dts: ls1021a: add wakeup device ftm0 node for ls1021a Dongsheng Wang
2015-08-13 16:23 ` [PATCH v3 1/2] Documentation: DT: FTM: add FTM0 be used as alarm timer Stuart Yoder
2015-08-14  3:24   ` Wang Dongsheng

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).