RE: [PATCH V2] ARM: davinci: da850: add RTC DT entries

2013-01-28 Thread Katepallewar, Mrugesh
On Mon, Jan 28, 2013 at 21:32:13, Nori, Sekhar wrote:
> Hi Mrugesh,
> 
> On 1/28/2013 1:17 PM, Mrugesh Katepallewar wrote:
> > Add RTC DT entries in da850 dts file.
> > 
> > Signed-off-by: Mrugesh Katepallewar 
> > ---
> > Applies on top of v3.8-rc4 of linus tree.
> > 
> > This patch is depending on
> > "ARM: davinci: da850: add interrupt-parent property in soc node"
> > https://patchwork.kernel.org/patch/2044101/
> 
> > Tested on da850-evm device.
> > 
> > Test Procedure:
> > date 2013.01.28-10:00:00 (usage: date[.]MM.DD-hh:mm[:ss]) hwclock 
> > -w reset board and check system time.
> 
> Queuing this for v3.9. The testing information above is useful and should be 
> part of the changelog. I moved it there while committing.
> 
> It will be nice to check the alarm functionality as well. Can you check that 
> and let me know that works as well?

I tried to test RTC alarm using "rtcwake" command, however it is not working 
and returning following error 
"rtcwake: /dev/rtc0 not enabled for wakeup events"
This is coming because we have not registered RTC device as a wakeup source 
yet. 

For checking RTC alarm interrupt, I developed one simple program which opens 
RTC device, set alarm and exits.
Then by entering "cat /proc/interrupts" checked RTC interrupt count.

Using above test it confirms that RTC alarm functionality is working fine. 

> 
> Thanks,
> Sekhar
> 


Regards, 
Mrugesh
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i

RE: [PATCH V2] ARM: davinci: da850: add RTC DT entries

2013-01-28 Thread Katepallewar, Mrugesh
On Mon, Jan 28, 2013 at 21:32:13, Nori, Sekhar wrote:
 Hi Mrugesh,
 
 On 1/28/2013 1:17 PM, Mrugesh Katepallewar wrote:
  Add RTC DT entries in da850 dts file.
  
  Signed-off-by: Mrugesh Katepallewar mrugesh...@ti.com
  ---
  Applies on top of v3.8-rc4 of linus tree.
  
  This patch is depending on
  ARM: davinci: da850: add interrupt-parent property in soc node
  https://patchwork.kernel.org/patch/2044101/
 
  Tested on da850-evm device.
  
  Test Procedure:
  date 2013.01.28-10:00:00 (usage: date[.]MM.DD-hh:mm[:ss]) hwclock 
  -w reset board and check system time.
 
 Queuing this for v3.9. The testing information above is useful and should be 
 part of the changelog. I moved it there while committing.
 
 It will be nice to check the alarm functionality as well. Can you check that 
 and let me know that works as well?

I tried to test RTC alarm using rtcwake command, however it is not working 
and returning following error 
rtcwake: /dev/rtc0 not enabled for wakeup events
This is coming because we have not registered RTC device as a wakeup source 
yet. 

For checking RTC alarm interrupt, I developed one simple program which opens 
RTC device, set alarm and exits.
Then by entering cat /proc/interrupts checked RTC interrupt count.

Using above test it confirms that RTC alarm functionality is working fine. 

 
 Thanks,
 Sekhar
 


Regards, 
Mrugesh
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a���
0��h���i

RE: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-27 Thread Katepallewar, Mrugesh
On Fri, Jan 25, 2013 at 16:52:18, Nori, Sekhar wrote:
> On 1/25/2013 4:34 PM, Katepallewar, Mrugesh wrote:
> > On Fri, Jan 25, 2013 at 16:04:22, Nori, Sekhar wrote:
> >> On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
> >>> Add RTC DT entries in da850 dts file.
> >>>
> >>> Signed-off-by: Mrugesh Katepallewar 
> >>> ---
> >>> Applies on top of v3.8-rc4 of linus tree.
> >>>
> >>> Tested on da850-evm device.
> >>>
> >>> Test Procedure:
> >>> date [.]MM.DD-hh:mm[:ss]
> >>> hwclock -w
> >>> reset board and check system time.
> >>>
> >>> :100644 100644 37dc5a3... b16efd4... March/arm/boot/dts/da850-evm.dts
> >>> :100644 100644 640ab75... a8eb1b1... March/arm/boot/dts/da850.dtsi
> >>>  arch/arm/boot/dts/da850-evm.dts |3 +++
> >>>  arch/arm/boot/dts/da850.dtsi|8 
> >>>  2 files changed, 11 insertions(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/da850-evm.dts 
> >>> b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..b16efd4 100644
> >>> --- a/arch/arm/boot/dts/da850-evm.dts
> >>> +++ b/arch/arm/boot/dts/da850-evm.dts
> >>> @@ -24,5 +24,8 @@
> >>>   serial2: serial@1d0d000 {
> >>>   status = "okay";
> >>>   };
> >>> + rtc@1c23000 {
> 
> I did not mention this last time, but this should be:
> 
>   rtc0: rtc@1c23000 {
> 
> to be consistent with rest of the file.

Okay. I will send this in next version.
> 
> >>> + status = "okay";
> >>> + };
> >>>   };
> >>>  };
> >>> diff --git a/arch/arm/boot/dts/da850.dtsi 
> >>> b/arch/arm/boot/dts/da850.dtsi index 640ab75..a8eb1b1 100644
> >>> --- a/arch/arm/boot/dts/da850.dtsi
> >>> +++ b/arch/arm/boot/dts/da850.dtsi
> >>> @@ -56,5 +56,13 @@
> >>>   interrupt-parent = <>;
> >>>   status = "disabled";
> >>>   };
> >>> + rtc@1c23000 {
> 
> Here too.
> 
Okay. I will send this in next version.

> >>> + compatible = "ti,da830-rtc";
> >>> + reg = <0x23000 0x1000>;
> >>> + interrupts = <19
> >>> +   19>;
> >>
> >> Why two interrupts of the same number? If there is only one interrupt line 
> >> then only one should be specified, no?
> > We are using common OMAP RTC driver for da850 and other ti SoC's 
> > (e.g.am33xx). I have seen in am33xx.dtsi rtc timer and alarm interrupts are 
> > different. So, two interrupt numbers are expected from RTC DT node.
> 
> Okay. Looking at the OMAP-L138 TRM, I see that the IP on that SoC supports 
> both alarm and timer events and both arrive on the same interrupt number (as 
> opposed to am335x where they supposedly arrive on different interrupt lines). 
> What you have looks fine to me considering this.
> 
> Also, the interrupt-parent setting needs to be removed. See the patch 
> Prabhakar just submitted.

Okay. I will send this in next version.

> 
> Thanks,
> Sekhar
> 

Regards, 
Mrugesh
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i

RE: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-27 Thread Katepallewar, Mrugesh
On Fri, Jan 25, 2013 at 16:52:18, Nori, Sekhar wrote:
 On 1/25/2013 4:34 PM, Katepallewar, Mrugesh wrote:
  On Fri, Jan 25, 2013 at 16:04:22, Nori, Sekhar wrote:
  On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
  Add RTC DT entries in da850 dts file.
 
  Signed-off-by: Mrugesh Katepallewar mrugesh...@ti.com
  ---
  Applies on top of v3.8-rc4 of linus tree.
 
  Tested on da850-evm device.
 
  Test Procedure:
  date [.]MM.DD-hh:mm[:ss]
  hwclock -w
  reset board and check system time.
 
  :100644 100644 37dc5a3... b16efd4... March/arm/boot/dts/da850-evm.dts
  :100644 100644 640ab75... a8eb1b1... March/arm/boot/dts/da850.dtsi
   arch/arm/boot/dts/da850-evm.dts |3 +++
   arch/arm/boot/dts/da850.dtsi|8 
   2 files changed, 11 insertions(+)
 
  diff --git a/arch/arm/boot/dts/da850-evm.dts 
  b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..b16efd4 100644
  --- a/arch/arm/boot/dts/da850-evm.dts
  +++ b/arch/arm/boot/dts/da850-evm.dts
  @@ -24,5 +24,8 @@
serial2: serial@1d0d000 {
status = okay;
};
  + rtc@1c23000 {
 
 I did not mention this last time, but this should be:
 
   rtc0: rtc@1c23000 {
 
 to be consistent with rest of the file.

Okay. I will send this in next version.
 
  + status = okay;
  + };
};
   };
  diff --git a/arch/arm/boot/dts/da850.dtsi 
  b/arch/arm/boot/dts/da850.dtsi index 640ab75..a8eb1b1 100644
  --- a/arch/arm/boot/dts/da850.dtsi
  +++ b/arch/arm/boot/dts/da850.dtsi
  @@ -56,5 +56,13 @@
interrupt-parent = intc;
status = disabled;
};
  + rtc@1c23000 {
 
 Here too.
 
Okay. I will send this in next version.

  + compatible = ti,da830-rtc;
  + reg = 0x23000 0x1000;
  + interrupts = 19
  +   19;
 
  Why two interrupts of the same number? If there is only one interrupt line 
  then only one should be specified, no?
  We are using common OMAP RTC driver for da850 and other ti SoC's 
  (e.g.am33xx). I have seen in am33xx.dtsi rtc timer and alarm interrupts are 
  different. So, two interrupt numbers are expected from RTC DT node.
 
 Okay. Looking at the OMAP-L138 TRM, I see that the IP on that SoC supports 
 both alarm and timer events and both arrive on the same interrupt number (as 
 opposed to am335x where they supposedly arrive on different interrupt lines). 
 What you have looks fine to me considering this.
 
 Also, the interrupt-parent setting needs to be removed. See the patch 
 Prabhakar just submitted.

Okay. I will send this in next version.

 
 Thanks,
 Sekhar
 

Regards, 
Mrugesh
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a���
0��h���i

RE: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-25 Thread Katepallewar, Mrugesh
On Fri, Jan 25, 2013 at 16:04:22, Nori, Sekhar wrote:
> On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
> > Add RTC DT entries in da850 dts file.
> > 
> > Signed-off-by: Mrugesh Katepallewar 
> > ---
> > Applies on top of v3.8-rc4 of linus tree.
> > 
> > Tested on da850-evm device.
> > 
> > Test Procedure:
> > date [.]MM.DD-hh:mm[:ss]
> > hwclock -w
> > reset board and check system time.
> > 
> > :100644 100644 37dc5a3... b16efd4... M  arch/arm/boot/dts/da850-evm.dts
> > :100644 100644 640ab75... a8eb1b1... M  arch/arm/boot/dts/da850.dtsi
> >  arch/arm/boot/dts/da850-evm.dts |3 +++
> >  arch/arm/boot/dts/da850.dtsi|8 
> >  2 files changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/da850-evm.dts 
> > b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..b16efd4 100644
> > --- a/arch/arm/boot/dts/da850-evm.dts
> > +++ b/arch/arm/boot/dts/da850-evm.dts
> > @@ -24,5 +24,8 @@
> > serial2: serial@1d0d000 {
> > status = "okay";
> > };
> > +   rtc@1c23000 {
> > +   status = "okay";
> > +   };
> > };
> >  };
> > diff --git a/arch/arm/boot/dts/da850.dtsi 
> > b/arch/arm/boot/dts/da850.dtsi index 640ab75..a8eb1b1 100644
> > --- a/arch/arm/boot/dts/da850.dtsi
> > +++ b/arch/arm/boot/dts/da850.dtsi
> > @@ -56,5 +56,13 @@
> > interrupt-parent = <>;
> > status = "disabled";
> > };
> > +   rtc@1c23000 {
> > +   compatible = "ti,da830-rtc";
> > +   reg = <0x23000 0x1000>;
> > +   interrupts = <19
> > + 19>;
> 
> Why two interrupts of the same number? If there is only one interrupt line 
> then only one should be specified, no?
We are using common OMAP RTC driver for da850 and other ti SoC's (e.g.am33xx). 
I have seen in am33xx.dtsi rtc timer
and alarm interrupts are different. So, two interrupt numbers are expected from 
RTC DT node.
> 
> Thanks,
> Sekhar
> 


Regards, 
Mrugesh


RE: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-25 Thread Katepallewar, Mrugesh
On Fri, Jan 25, 2013 at 16:04:22, Nori, Sekhar wrote:
 On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
  Add RTC DT entries in da850 dts file.
  
  Signed-off-by: Mrugesh Katepallewar mrugesh...@ti.com
  ---
  Applies on top of v3.8-rc4 of linus tree.
  
  Tested on da850-evm device.
  
  Test Procedure:
  date [.]MM.DD-hh:mm[:ss]
  hwclock -w
  reset board and check system time.
  
  :100644 100644 37dc5a3... b16efd4... M  arch/arm/boot/dts/da850-evm.dts
  :100644 100644 640ab75... a8eb1b1... M  arch/arm/boot/dts/da850.dtsi
   arch/arm/boot/dts/da850-evm.dts |3 +++
   arch/arm/boot/dts/da850.dtsi|8 
   2 files changed, 11 insertions(+)
  
  diff --git a/arch/arm/boot/dts/da850-evm.dts 
  b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..b16efd4 100644
  --- a/arch/arm/boot/dts/da850-evm.dts
  +++ b/arch/arm/boot/dts/da850-evm.dts
  @@ -24,5 +24,8 @@
  serial2: serial@1d0d000 {
  status = okay;
  };
  +   rtc@1c23000 {
  +   status = okay;
  +   };
  };
   };
  diff --git a/arch/arm/boot/dts/da850.dtsi 
  b/arch/arm/boot/dts/da850.dtsi index 640ab75..a8eb1b1 100644
  --- a/arch/arm/boot/dts/da850.dtsi
  +++ b/arch/arm/boot/dts/da850.dtsi
  @@ -56,5 +56,13 @@
  interrupt-parent = intc;
  status = disabled;
  };
  +   rtc@1c23000 {
  +   compatible = ti,da830-rtc;
  +   reg = 0x23000 0x1000;
  +   interrupts = 19
  + 19;
 
 Why two interrupts of the same number? If there is only one interrupt line 
 then only one should be specified, no?
We are using common OMAP RTC driver for da850 and other ti SoC's (e.g.am33xx). 
I have seen in am33xx.dtsi rtc timer
and alarm interrupts are different. So, two interrupt numbers are expected from 
RTC DT node.
 
 Thanks,
 Sekhar
 


Regards, 
Mrugesh