RE: [EXT] Re: [v5,2/2] Documentation: dt: binding: rtc: add binding for ftm alarm driver

2019-07-17 Thread Biwen Li
> >
> > >
> > > Caution: EXT Email
> > >
> > > On Tue, Jul 16, 2019 at 4:26 AM Biwen Li  wrote:
> > > >
> > > > The patch adds binding for ftm alarm driver
> > >
> > > Bindings are for h/w, not drivers...
> > >
> > > 'dt-bindings: rtc: ...' for the subject prefix.
> > I will correct it in v6.
> > >
> > > >
> > > > Signed-off-by: Biwen Li 
> > > > ---
> > > > Change in v5:
> > > > - None
> > > >
> > > > Change in v4:
> > > > - add note about dts and kernel options
> > > > - add aliases in example
> > > >
> > > > Change in v3:
> > > > - remove reg-names property
> > > > - correct cells number
> > > >
> > > > Change in v2:
> > > > - replace ls1043a with ls1088a as example
> > > > - add rcpm node and fsl,rcpm-wakeup property
> > > >
> > > >
> > > >  .../bindings/rtc/rtc-fsl-ftm-alarm.txt| 49
> +++
> > > >  1 file changed, 49 insertions(+)
> > > >  create mode 100644
> > > > Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > > b/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > > new file mode 100644
> > > > index ..fb018065406c
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > > @@ -0,0 +1,49 @@
> > > > +Freescale FlexTimer Module (FTM) Alarm
> > > > +
> > > > +Note:
> > > > +- The driver depends on RCPM driver
> > > > +  to wake up system in sleep.
> > > > +- Need stop using RTC_HCTOSYS or use the DT aliases
> > > > +  to ensure the driver is not used as the primary RTC.
> > > > +  (Select DT aliases defaultly)
> > >
> > > This is Linux specific and not relevant to the binding.
> > Ok, I will remove all of the Note in v6.
> > >
> > > > +
> > > > +Required properties:
> > > > +- compatible : Should be "fsl,-ftm-alarm", the
> > > > +  supported chips include
> > > > +  "fsl,ls1012a-ftm-alarm"
> > > > +  "fsl,ls1021a-ftm-alarm"
> > > > +  "fsl,ls1028a-ftm-alarm"
> > > > +  "fsl,ls1043a-ftm-alarm"
> > > > +  "fsl,ls1046a-ftm-alarm"
> > > > +  "fsl,ls1088a-ftm-alarm"
> > > > +  "fsl,ls208xa-ftm-alarm"
> > > > +- reg : Specifies base physical address and size of the register
> > > > +sets for the
> > > > +  FlexTimer Module and base physical address of IP Powerdown
> > > > +Exception Control
> > > > +  Register.
> > > > +- interrupts : Should be the FlexTimer Module interrupt.
> > > > +- fsl,rcpm-wakeup property and rcpm node : Please refer
> > > > +   Documentation/devicetree/bindings/soc/fsl/rcpm.txt
> > > > +
> > > > +Optional properties:
> > > > +- big-endian: If the host controller is big-endian mode, specify this
> property.
> > > > +  The default endian mode is little-endian.
> > > > +
> > > > +Example:
> > > > +aliases {
> > > > +   ...
> > > > +   rtc1 = ftm_alarm0; /* Use flextimer alarm driver as /dev/rtc1 */
> > > > +   ...
> > > > +};
> > >
> > > Drop the aliases part. It's not going to work when this is converted
> > > to DT schema and the comment is Linux specific.
> > Sorry,I can't drop the aliases part. If any user uses the alarm driver
> > as rtc0, the user will get wrong time from /dev/rtc0.It is very important.
> 
> I just mean don't put it in the example. You can use it in your dts file.
Thank you so much,I need put it in the example for a note(Please not use it as 
rtc0).
I use it as a note in the example to avoid that someone use FlexTimer module as 
rtc0. 


Re: [EXT] Re: [v5,2/2] Documentation: dt: binding: rtc: add binding for ftm alarm driver

2019-07-17 Thread Rob Herring
On Wed, Jul 17, 2019 at 4:05 AM Biwen Li  wrote:
>
> >
> > Caution: EXT Email
> >
> > On Tue, Jul 16, 2019 at 4:26 AM Biwen Li  wrote:
> > >
> > > The patch adds binding for ftm alarm driver
> >
> > Bindings are for h/w, not drivers...
> >
> > 'dt-bindings: rtc: ...' for the subject prefix.
> I will correct it in v6.
> >
> > >
> > > Signed-off-by: Biwen Li 
> > > ---
> > > Change in v5:
> > > - None
> > >
> > > Change in v4:
> > > - add note about dts and kernel options
> > > - add aliases in example
> > >
> > > Change in v3:
> > > - remove reg-names property
> > > - correct cells number
> > >
> > > Change in v2:
> > > - replace ls1043a with ls1088a as example
> > > - add rcpm node and fsl,rcpm-wakeup property
> > >
> > >
> > >  .../bindings/rtc/rtc-fsl-ftm-alarm.txt| 49 +++
> > >  1 file changed, 49 insertions(+)
> > >  create mode 100644
> > > Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > b/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > new file mode 100644
> > > index ..fb018065406c
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > > @@ -0,0 +1,49 @@
> > > +Freescale FlexTimer Module (FTM) Alarm
> > > +
> > > +Note:
> > > +- The driver depends on RCPM driver
> > > +  to wake up system in sleep.
> > > +- Need stop using RTC_HCTOSYS or use the DT aliases
> > > +  to ensure the driver is not used as the primary RTC.
> > > +  (Select DT aliases defaultly)
> >
> > This is Linux specific and not relevant to the binding.
> Ok, I will remove all of the Note in v6.
> >
> > > +
> > > +Required properties:
> > > +- compatible : Should be "fsl,-ftm-alarm", the
> > > +  supported chips include
> > > +  "fsl,ls1012a-ftm-alarm"
> > > +  "fsl,ls1021a-ftm-alarm"
> > > +  "fsl,ls1028a-ftm-alarm"
> > > +  "fsl,ls1043a-ftm-alarm"
> > > +  "fsl,ls1046a-ftm-alarm"
> > > +  "fsl,ls1088a-ftm-alarm"
> > > +  "fsl,ls208xa-ftm-alarm"
> > > +- reg : Specifies base physical address and size of the register sets
> > > +for the
> > > +  FlexTimer Module and base physical address of IP Powerdown
> > > +Exception Control
> > > +  Register.
> > > +- interrupts : Should be the FlexTimer Module interrupt.
> > > +- fsl,rcpm-wakeup property and rcpm node : Please refer
> > > +   Documentation/devicetree/bindings/soc/fsl/rcpm.txt
> > > +
> > > +Optional properties:
> > > +- big-endian: If the host controller is big-endian mode, specify this 
> > > property.
> > > +  The default endian mode is little-endian.
> > > +
> > > +Example:
> > > +aliases {
> > > +   ...
> > > +   rtc1 = ftm_alarm0; /* Use flextimer alarm driver as /dev/rtc1 */
> > > +   ...
> > > +};
> >
> > Drop the aliases part. It's not going to work when this is converted to DT 
> > schema
> > and the comment is Linux specific.
> Sorry,I can't drop the aliases part. If any user uses the alarm driver as 
> rtc0,
> the user will get wrong time from /dev/rtc0.It is very important.

I just mean don't put it in the example. You can use it in your dts file.


RE: [EXT] Re: [v5,2/2] Documentation: dt: binding: rtc: add binding for ftm alarm driver

2019-07-17 Thread Biwen Li
> 
> Caution: EXT Email
> 
> On Tue, Jul 16, 2019 at 4:26 AM Biwen Li  wrote:
> >
> > The patch adds binding for ftm alarm driver
> 
> Bindings are for h/w, not drivers...
> 
> 'dt-bindings: rtc: ...' for the subject prefix.
I will correct it in v6.
> 
> >
> > Signed-off-by: Biwen Li 
> > ---
> > Change in v5:
> > - None
> >
> > Change in v4:
> > - add note about dts and kernel options
> > - add aliases in example
> >
> > Change in v3:
> > - remove reg-names property
> > - correct cells number
> >
> > Change in v2:
> > - replace ls1043a with ls1088a as example
> > - add rcpm node and fsl,rcpm-wakeup property
> >
> >
> >  .../bindings/rtc/rtc-fsl-ftm-alarm.txt| 49 +++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> >
> > diff --git
> > a/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > b/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > new file mode 100644
> > index ..fb018065406c
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
> > @@ -0,0 +1,49 @@
> > +Freescale FlexTimer Module (FTM) Alarm
> > +
> > +Note:
> > +- The driver depends on RCPM driver
> > +  to wake up system in sleep.
> > +- Need stop using RTC_HCTOSYS or use the DT aliases
> > +  to ensure the driver is not used as the primary RTC.
> > +  (Select DT aliases defaultly)
> 
> This is Linux specific and not relevant to the binding.
Ok, I will remove all of the Note in v6.
> 
> > +
> > +Required properties:
> > +- compatible : Should be "fsl,-ftm-alarm", the
> > +  supported chips include
> > +  "fsl,ls1012a-ftm-alarm"
> > +  "fsl,ls1021a-ftm-alarm"
> > +  "fsl,ls1028a-ftm-alarm"
> > +  "fsl,ls1043a-ftm-alarm"
> > +  "fsl,ls1046a-ftm-alarm"
> > +  "fsl,ls1088a-ftm-alarm"
> > +  "fsl,ls208xa-ftm-alarm"
> > +- reg : Specifies base physical address and size of the register sets
> > +for the
> > +  FlexTimer Module and base physical address of IP Powerdown
> > +Exception Control
> > +  Register.
> > +- interrupts : Should be the FlexTimer Module interrupt.
> > +- fsl,rcpm-wakeup property and rcpm node : Please refer
> > +   Documentation/devicetree/bindings/soc/fsl/rcpm.txt
> > +
> > +Optional properties:
> > +- big-endian: If the host controller is big-endian mode, specify this 
> > property.
> > +  The default endian mode is little-endian.
> > +
> > +Example:
> > +aliases {
> > +   ...
> > +   rtc1 = ftm_alarm0; /* Use flextimer alarm driver as /dev/rtc1 */
> > +   ...
> > +};
> 
> Drop the aliases part. It's not going to work when this is converted to DT 
> schema
> and the comment is Linux specific.
Sorry,I can't drop the aliases part. If any user uses the alarm driver as rtc0,
the user will get wrong time from /dev/rtc0.It is very important.
> 
> > +
> > +rcpm: rcpm@1e34040 {
> > +   compatible = "fsl,ls1088a-rcpm", "fsl,qoriq-rcpm-2.1+";
> > +   reg = <0x0 0x1e34040 0x0 0x18>;
> > +   fsl,#rcpm-wakeup-cells = <6>;
> 
> Before there are any users of this, either drop it if it is not variable or 
> the correct
> form would be '#fsl,rcpm-wakeup-cells'.
I will replace 'fsl,#rcpm-wakeup-cells' with '#fsl,rcpm-wakeup-cells' in v6.
> 
> > +};
> > +
> > +ftm_alarm0: timer@280 {
> > +   compatible = "fsl,ls1088a-ftm-alarm";
> > +   reg = <0x0 0x280 0x0 0x1>;
> > +   fsl,rcpm-wakeup = < 0x0 0x0 0x0 0x0 0x4000 0x0>;
> > +   interrupts = <0 44 4>;
> > +};
> > --
> > 2.17.1
> >