All of lore.kernel.org
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] rtc: rtc-at91sam9.c add DT support
Date: Thu, 4 Apr 2013 16:08:04 +0200	[thread overview]
Message-ID: <515D8944.2060308@atmel.com> (raw)
In-Reply-To: <515D7F56.90702@interlog.com>

On 04/04/2013 03:25 PM, Douglas Gilbert :
> On 13-04-04 04:11 AM, Nicolas Ferre wrote:
>> On 04/04/2013 05:54 AM, Douglas Gilbert :
>>> Some members of the at91 SoCs use the Real Time Timer (RTT)
>>> and the General Purpose Backup Registers (GPBR) to implement
>>> a real time clock (RTC). The AT91SAM9G20 is one example.
>>>
>>> Attached is a patch to add DT support to rtc-at91sam9.c .
>>> The patch is against lk 3.9.0-rc5 .
>>>
>>> Below is a snippet of DT code for the 'G20 that was observed
>>> to work with this patch:
>>>
>>> ahb {
>>>      apb {
>>>
>>>          rtc {
>>>              compatible = "atmel,at91sam9-rtc";
>>
>> The compatible string has to be formed by the name of the first SoC
>> compatible with this IP. It turns to be the at91sam9260.
>> The second part of the string should be a name that reflects the nature
>> of the peripheral. For this binding, I would like to mention the "RTT"
>> in the compatibility string (because other drivers can use other RTT
>> with other uses).
>>
>> What do you think about:
>> "atmel,at91sam9260-rtt-as-rtc"? or something shorter?
> 
> Hi Nicolas,
> Johan Hovold suggested:
>    atmel,at91sam9260-rtt

Yes, but I fear this could bring confusion if someone is building a RTT
driver that is not targeted at acting as a RTC...

> I notice (in the G20 doco) that the acronym RTTC is also used

The "C" at the end stands for "Controller" (not very useful convention
in my opinion).

> for the rtt registers. What do you want?

I found xxx-rtt-as-rtc or xxx-rtt-rtc but not completely satisfied with
any of them...

>>>                           /* RTTC followed by GPBR (backup registers) */
>>>                           reg = <0xfffffd20 0x10>, <0xfffffd50 0x10>;
>>>                           interrupts = <1 4 7>;
>>>                           status = "okay";
>>
>> Last, but not least, when we add a DT binding, it is a requirement to
>> add the corresponding documentation in the
>> Documentation/devicetree/bindings/rtc/ directory.
> 
> I have been underwhelmed by the accuracy and the organisation
> of information in that documentation. And the examples are
> often misleading given the actual hierarchy of real dtsi/dts
> config files.

Oh, really? I will have a look one of those days...


> Give me working examples any day. You could (and should) test
> what I gave on a g20ek board.
> 
> Also I note there is no "bindings" documentation for
> rtc-at91rm9200.c :-) After you, sir ....

Already submitted, my dear ;-)
Here:
http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-at91rm9200c-add-dt-support.patch

Bye,
-- 
Nicolas Ferre

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: dgilbert-qazKcTl6WRFWk0Htik3J/w@public.gmane.org,
	Johan Hovold <jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Robert Nelson
	<Robert.Nelson-9gsZL1vm+hpBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH] rtc: rtc-at91sam9.c add DT support
Date: Thu, 4 Apr 2013 16:08:04 +0200	[thread overview]
Message-ID: <515D8944.2060308@atmel.com> (raw)
In-Reply-To: <515D7F56.90702-qazKcTl6WRFWk0Htik3J/w@public.gmane.org>

On 04/04/2013 03:25 PM, Douglas Gilbert :
> On 13-04-04 04:11 AM, Nicolas Ferre wrote:
>> On 04/04/2013 05:54 AM, Douglas Gilbert :
>>> Some members of the at91 SoCs use the Real Time Timer (RTT)
>>> and the General Purpose Backup Registers (GPBR) to implement
>>> a real time clock (RTC). The AT91SAM9G20 is one example.
>>>
>>> Attached is a patch to add DT support to rtc-at91sam9.c .
>>> The patch is against lk 3.9.0-rc5 .
>>>
>>> Below is a snippet of DT code for the 'G20 that was observed
>>> to work with this patch:
>>>
>>> ahb {
>>>      apb {
>>>
>>>          rtc {
>>>              compatible = "atmel,at91sam9-rtc";
>>
>> The compatible string has to be formed by the name of the first SoC
>> compatible with this IP. It turns to be the at91sam9260.
>> The second part of the string should be a name that reflects the nature
>> of the peripheral. For this binding, I would like to mention the "RTT"
>> in the compatibility string (because other drivers can use other RTT
>> with other uses).
>>
>> What do you think about:
>> "atmel,at91sam9260-rtt-as-rtc"? or something shorter?
> 
> Hi Nicolas,
> Johan Hovold suggested:
>    atmel,at91sam9260-rtt

Yes, but I fear this could bring confusion if someone is building a RTT
driver that is not targeted at acting as a RTC...

> I notice (in the G20 doco) that the acronym RTTC is also used

The "C" at the end stands for "Controller" (not very useful convention
in my opinion).

> for the rtt registers. What do you want?

I found xxx-rtt-as-rtc or xxx-rtt-rtc but not completely satisfied with
any of them...

>>>                           /* RTTC followed by GPBR (backup registers) */
>>>                           reg = <0xfffffd20 0x10>, <0xfffffd50 0x10>;
>>>                           interrupts = <1 4 7>;
>>>                           status = "okay";
>>
>> Last, but not least, when we add a DT binding, it is a requirement to
>> add the corresponding documentation in the
>> Documentation/devicetree/bindings/rtc/ directory.
> 
> I have been underwhelmed by the accuracy and the organisation
> of information in that documentation. And the examples are
> often misleading given the actual hierarchy of real dtsi/dts
> config files.

Oh, really? I will have a look one of those days...


> Give me working examples any day. You could (and should) test
> what I gave on a g20ek board.
> 
> Also I note there is no "bindings" documentation for
> rtc-at91rm9200.c :-) After you, sir ....

Already submitted, my dear ;-)
Here:
http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-at91rm9200c-add-dt-support.patch

Bye,
-- 
Nicolas Ferre

  reply	other threads:[~2013-04-04 14:08 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  3:54 [PATCH] rtc: rtc-at91sam9.c add DT support Douglas Gilbert
2013-04-04  8:11 ` Nicolas Ferre
2013-04-04  8:11   ` Nicolas Ferre
2013-04-04 13:25   ` Douglas Gilbert
2013-04-04 13:25     ` Douglas Gilbert
2013-04-04 14:08     ` Nicolas Ferre [this message]
2013-04-04 14:08       ` Nicolas Ferre
2013-04-04 19:14       ` Douglas Gilbert
2013-04-04 19:14         ` Douglas Gilbert
2013-04-07 15:09       ` Johan Hovold
2013-04-07 15:09         ` Johan Hovold
     [not found]         ` <1365347572-14972-1-git-send-email-jhovold@gmail.com>
2013-04-08  7:33           ` [RFC 1/5] ARM: at91: add general purpose backup register (GPBR) support Jean-Christophe PLAGNIOL-VILLARD
2013-04-08  7:33             ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08  8:46             ` Johan Hovold
2013-04-08  8:46               ` Johan Hovold
2013-04-08 10:04               ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:04                 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 12:39                 ` Johan Hovold
2013-04-11 12:39                   ` Johan Hovold
2013-04-11 14:53                   ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 14:53                     ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]           ` <1365347572-14972-2-git-send-email-jhovold@gmail.com>
2013-04-08  7:35             ` [RFC 2/5] ARM: at91/dts: " Jean-Christophe PLAGNIOL-VILLARD
2013-04-08  7:35               ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]           ` <1365347572-14972-4-git-send-email-jhovold@gmail.com>
2013-04-08  7:38             ` [RFC 4/5] RTC: rtc-at91sam9: add device-tree support Jean-Christophe PLAGNIOL-VILLARD
2013-04-08  7:38               ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08  9:00               ` Johan Hovold
2013-04-08  9:00                 ` Johan Hovold
2013-04-08  9:57                 ` Nicolas Ferre
2013-04-08  9:57                   ` Nicolas Ferre
2013-04-08 10:03                   ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:03                     ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:42                     ` Nicolas Ferre
2013-04-08 10:42                       ` Nicolas Ferre
2013-04-08 11:02                       ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 11:02                         ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:48                     ` Johan Hovold
2013-04-08 10:48                       ` Johan Hovold
2013-04-08 11:08                       ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 11:08                         ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:38                   ` Johan Hovold
2013-04-08 10:38                     ` Johan Hovold
2013-04-08 11:11                     ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 11:11                       ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 12:57                       ` Johan Hovold
2013-04-11 12:57                         ` Johan Hovold
2013-04-04  8:16 ` [PATCH] rtc: rtc-at91sam9.c add DT support Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515D8944.2060308@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.