diff mbox

ARM: dts: DRA7: Add node for RTC

Message ID 1416199509-3977-1-git-send-email-lokeshvutla@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lokesh Vutla Nov. 17, 2014, 4:45 a.m. UTC
Add node for RTC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[nm@ti.com: update with rtc crossbar number]
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Sergei Shtylyov Nov. 17, 2014, 12:17 p.m. UTC | #1
Hello.

On 11/17/2014 7:45 AM, Lokesh Vutla wrote:

> Add node for RTC.

> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> [nm@ti.com: update with rtc crossbar number]
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>   arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
>   1 file changed, 9 insertions(+)

> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index 9cc9843..f98f9f0 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -1075,6 +1075,15 @@
>   			status = "disabled";
>   		};
>
> +		rtc: rtcss@48838000 {

    Please just name the node "rtc@48838000", in accordance with ePAPR.

> +			compatible = "ti,am3352-rtc";
> +			reg = <0x48838000 0x100>;
> +			interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;

    2 similar interrupts?

[...]

WBR, Sergei
Lokesh Vutla Nov. 17, 2014, 1:04 p.m. UTC | #2
Hi,
On Monday 17 November 2014 05:47 PM, Sergei Shtylyov wrote:
> Hello.
> 
> On 11/17/2014 7:45 AM, Lokesh Vutla wrote:
> 
>> Add node for RTC.
> 
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> [nm@ti.com: update with rtc crossbar number]
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> ---
>>   arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
>>   1 file changed, 9 insertions(+)
> 
>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>> index 9cc9843..f98f9f0 100644
>> --- a/arch/arm/boot/dts/dra7.dtsi
>> +++ b/arch/arm/boot/dts/dra7.dtsi
>> @@ -1075,6 +1075,15 @@
>>               status = "disabled";
>>           };
>>
>> +        rtc: rtcss@48838000 {
> 
>    Please just name the node "rtc@48838000", in accordance with ePAPR.
Okay. will update it.
> 
>> +            compatible = "ti,am3352-rtc";
>> +            reg = <0x48838000 0x100>;
>> +            interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
>> +                     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
> 
>    2 similar interrupts?
both rtc timer and rtc alarm uses same interrupt on DRA7 Soc.
Driver handles it accordingly.
So passing the same interrupt.

Thanks and regards,
Lokesh
> 
> [...]
> 
> WBR, Sergei
>
Sergei Shtylyov Nov. 17, 2014, 4:12 p.m. UTC | #3
On 11/17/2014 4:04 PM, Lokesh Vutla wrote:

>> On 11/17/2014 7:45 AM, Lokesh Vutla wrote:

>>> Add node for RTC.

>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>> [nm@ti.com: update with rtc crossbar number]
>>> Signed-off-by: Nishanth Menon <nm@ti.com>
>>> ---
>>>    arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
>>>    1 file changed, 9 insertions(+)

>>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>>> index 9cc9843..f98f9f0 100644
>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>> @@ -1075,6 +1075,15 @@
>>>                status = "disabled";
>>>            };
>>>
>>> +        rtc: rtcss@48838000 {

>>     Please just name the node "rtc@48838000", in accordance with ePAPR.

> Okay. will update it.

>>> +            compatible = "ti,am3352-rtc";
>>> +            reg = <0x48838000 0x100>;
>>> +            interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
>>> +                     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;

>>     2 similar interrupts?

> both rtc timer and rtc alarm uses same interrupt on DRA7 Soc.
> Driver handles it accordingly.
> So passing the same interrupt.

    I think it would have been better if the driver just handled a single 
interrupt.

> Thanks and regards,
> Lokesh

>> [...]

WBR, Sergei
Lokesh Vutla Nov. 18, 2014, 5:01 a.m. UTC | #4
Hi,
On Monday 17 November 2014 09:42 PM, Sergei Shtylyov wrote:
> On 11/17/2014 4:04 PM, Lokesh Vutla wrote:
> 
>>> On 11/17/2014 7:45 AM, Lokesh Vutla wrote:
> 
>>>> Add node for RTC.
> 
>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>> [nm@ti.com: update with rtc crossbar number]
>>>> Signed-off-by: Nishanth Menon <nm@ti.com>
>>>> ---
>>>>    arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
>>>>    1 file changed, 9 insertions(+)
> 
>>>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>>>> index 9cc9843..f98f9f0 100644
>>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>>> @@ -1075,6 +1075,15 @@
>>>>                status = "disabled";
>>>>            };
>>>>
>>>> +        rtc: rtcss@48838000 {
> 
>>>     Please just name the node "rtc@48838000", in accordance with ePAPR.
> 
>> Okay. will update it.
> 
>>>> +            compatible = "ti,am3352-rtc";
>>>> +            reg = <0x48838000 0x100>;
>>>> +            interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
>>>> +                     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
> 
>>>     2 similar interrupts?
> 
>> both rtc timer and rtc alarm uses same interrupt on DRA7 Soc.
>> Driver handles it accordingly.
>> So passing the same interrupt.
> 
>    I think it would have been better if the driver just handled a single interrupt.
There are certain SoCs with RTC IP where timer and alarm uses different interrupts.
Driver has to take care of that scenario also. So it expects two interrupts from dt. 

Thanks and regards,
Lokesh 
> 
>> Thanks and regards,
>> Lokesh
> 
>>> [...]
> 
> WBR, Sergei
>
Sergei Shtylyov Nov. 18, 2014, 10:55 a.m. UTC | #5
Hello.

On 11/18/2014 8:01 AM, Lokesh Vutla wrote:

>>>>> Add node for RTC.

>>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>>> [nm@ti.com: update with rtc crossbar number]
>>>>> Signed-off-by: Nishanth Menon <nm@ti.com>
>>>>> ---
>>>>>     arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
>>>>>     1 file changed, 9 insertions(+)

>>>>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>>>>> index 9cc9843..f98f9f0 100644
>>>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>>>> @@ -1075,6 +1075,15 @@
>>>>>                 status = "disabled";
>>>>>             };
>>>>>
>>>>> +        rtc: rtcss@48838000 {

>>>>      Please just name the node "rtc@48838000", in accordance with ePAPR.

>>> Okay. will update it.

>>>>> +            compatible = "ti,am3352-rtc";
>>>>> +            reg = <0x48838000 0x100>;
>>>>> +            interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
>>>>> +                     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;

>>>>      2 similar interrupts?

>>> both rtc timer and rtc alarm uses same interrupt on DRA7 Soc.
>>> Driver handles it accordingly.
>>> So passing the same interrupt.

>>     I think it would have been better if the driver just handled a single interrupt.

> There are certain SoCs with RTC IP where timer and alarm uses different interrupts.

    I understood.

> Driver has to take care of that scenario also. So it expects two interrupts from dt.

    You could also handle the missing second interrupt. I don't insist though...

> Thanks and regards,
> Lokesh

WBR, Sergei
diff mbox

Patch

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 9cc9843..f98f9f0 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -1075,6 +1075,15 @@ 
 			status = "disabled";
 		};
 
+		rtc: rtcss@48838000 {
+			compatible = "ti,am3352-rtc";
+			reg = <0x48838000 0x100>;
+			interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
+			ti,hwmods = "rtcss";
+			clocks = <&sys_32k_ck>;
+		};
+
 		omap_control_usb2phy1: control-phy@4a002300 {
 			compatible = "ti,control-phy-usb2";
 			reg = <0x4a002300 0x4>;