diff mbox series

[v7,16/20] arm64: tegra: Enable wake from deep sleep on RTC alarm

Message ID 1564532424-10449-17-git-send-email-skomatineni@nvidia.com
State New
Headers show
Series SC7 entry and exit support for Tegra210 | expand

Commit Message

Sowjanya Komatineni July 31, 2019, 12:20 a.m. UTC
This patch updates device tree for RTC and PMC to allow system wake
from deep sleep on RTC alarm.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Dmitry Osipenko July 31, 2019, 11:04 a.m. UTC | #1
31.07.2019 3:20, Sowjanya Komatineni пишет:
> This patch updates device tree for RTC and PMC to allow system wake
> from deep sleep on RTC alarm.
> 
> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> ---
>  arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
> index 659753118e96..30a7c48385a2 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
> @@ -768,7 +768,8 @@
>  	rtc@7000e000 {
>  		compatible = "nvidia,tegra210-rtc", "nvidia,tegra20-rtc";
>  		reg = <0x0 0x7000e000 0x0 0x100>;
> -		interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
> +		interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
> +		interrupt-parent = <&pmc>;
>  		clocks = <&tegra_car TEGRA210_CLK_RTC>;
>  		clock-names = "rtc";
>  	};
> @@ -778,6 +779,8 @@
>  		reg = <0x0 0x7000e400 0x0 0x400>;
>  		clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
>  		clock-names = "pclk", "clk32k_in";
> +		#interrupt-cells = <2>;
> +		interrupt-controller;
>  
>  		powergates {
>  			pd_audio: aud {
> 

Is this a backwards-compatible change? Or it's not really worth to care
about the compatibility with older kernel versions, I'm not sure about
overall state of T210 in the upstream kernel.
Sowjanya Komatineni July 31, 2019, 9:08 p.m. UTC | #2
On 7/31/19 4:04 AM, Dmitry Osipenko wrote:
> 31.07.2019 3:20, Sowjanya Komatineni пишет:
>> This patch updates device tree for RTC and PMC to allow system wake
>> from deep sleep on RTC alarm.
>>
>> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>> ---
>>   arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>> index 659753118e96..30a7c48385a2 100644
>> --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>> +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>> @@ -768,7 +768,8 @@
>>   	rtc@7000e000 {
>>   		compatible = "nvidia,tegra210-rtc", "nvidia,tegra20-rtc";
>>   		reg = <0x0 0x7000e000 0x0 0x100>;
>> -		interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>> +		interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
>> +		interrupt-parent = <&pmc>;
>>   		clocks = <&tegra_car TEGRA210_CLK_RTC>;
>>   		clock-names = "rtc";
>>   	};
>> @@ -778,6 +779,8 @@
>>   		reg = <0x0 0x7000e400 0x0 0x400>;
>>   		clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
>>   		clock-names = "pclk", "clk32k_in";
>> +		#interrupt-cells = <2>;
>> +		interrupt-controller;
>>   
>>   		powergates {
>>   			pd_audio: aud {
>>
> Is this a backwards-compatible change? Or it's not really worth to care
> about the compatibility with older kernel versions, I'm not sure about
> overall state of T210 in the upstream kernel.
I don't think its required to be backwards-compatible as SC7 entry/exit 
implementation for T210 is with this patch series onwards..
Dmitry Osipenko Aug. 1, 2019, 10:43 a.m. UTC | #3
01.08.2019 0:08, Sowjanya Komatineni пишет:
> 
> On 7/31/19 4:04 AM, Dmitry Osipenko wrote:
>> 31.07.2019 3:20, Sowjanya Komatineni пишет:
>>> This patch updates device tree for RTC and PMC to allow system wake
>>> from deep sleep on RTC alarm.
>>>
>>> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>>> ---
>>>   arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 ++++-
>>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>> b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>> index 659753118e96..30a7c48385a2 100644
>>> --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>> +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>> @@ -768,7 +768,8 @@
>>>       rtc@7000e000 {
>>>           compatible = "nvidia,tegra210-rtc", "nvidia,tegra20-rtc";
>>>           reg = <0x0 0x7000e000 0x0 0x100>;
>>> -        interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>>> +        interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
>>> +        interrupt-parent = <&pmc>;
>>>           clocks = <&tegra_car TEGRA210_CLK_RTC>;
>>>           clock-names = "rtc";
>>>       };
>>> @@ -778,6 +779,8 @@
>>>           reg = <0x0 0x7000e400 0x0 0x400>;
>>>           clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
>>>           clock-names = "pclk", "clk32k_in";
>>> +        #interrupt-cells = <2>;
>>> +        interrupt-controller;
>>>             powergates {
>>>               pd_audio: aud {
>>>
>> Is this a backwards-compatible change? Or it's not really worth to care
>> about the compatibility with older kernel versions, I'm not sure about
>> overall state of T210 in the upstream kernel.
> I don't think its required to be backwards-compatible as SC7 entry/exit
> implementation for T210 is with this patch series onwards..

The new device tree binary should work with older kernel versions, AFAIK
this is the upstream rule. But if kernel support isn't in a very good
shape and not much people are using it, then obviously it is not very
important.
Sowjanya Komatineni Aug. 1, 2019, 5:56 p.m. UTC | #4
On 8/1/19 3:43 AM, Dmitry Osipenko wrote:
> 01.08.2019 0:08, Sowjanya Komatineni пишет:
>> On 7/31/19 4:04 AM, Dmitry Osipenko wrote:
>>> 31.07.2019 3:20, Sowjanya Komatineni пишет:
>>>> This patch updates device tree for RTC and PMC to allow system wake
>>>> from deep sleep on RTC alarm.
>>>>
>>>> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>>>> ---
>>>>    arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 ++++-
>>>>    1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>> b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>> index 659753118e96..30a7c48385a2 100644
>>>> --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>> +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>> @@ -768,7 +768,8 @@
>>>>        rtc@7000e000 {
>>>>            compatible = "nvidia,tegra210-rtc", "nvidia,tegra20-rtc";
>>>>            reg = <0x0 0x7000e000 0x0 0x100>;
>>>> -        interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>>>> +        interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
>>>> +        interrupt-parent = <&pmc>;
>>>>            clocks = <&tegra_car TEGRA210_CLK_RTC>;
>>>>            clock-names = "rtc";
>>>>        };
>>>> @@ -778,6 +779,8 @@
>>>>            reg = <0x0 0x7000e400 0x0 0x400>;
>>>>            clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
>>>>            clock-names = "pclk", "clk32k_in";
>>>> +        #interrupt-cells = <2>;
>>>> +        interrupt-controller;
>>>>              powergates {
>>>>                pd_audio: aud {
>>>>
>>> Is this a backwards-compatible change? Or it's not really worth to care
>>> about the compatibility with older kernel versions, I'm not sure about
>>> overall state of T210 in the upstream kernel.
>> I don't think its required to be backwards-compatible as SC7 entry/exit
>> implementation for T210 is with this patch series onwards..
> The new device tree binary should work with older kernel versions, AFAIK
> this is the upstream rule. But if kernel support isn't in a very good
> shape and not much people are using it, then obviously it is not very
> important.

Yes, my response to backwards-compatible was with respect to interrupt 
parent change as this will not be backward compatible and also there is 
no Tegra210 suspend/resume earlier. Other functionality wise, it is 
backward compatible.
Dmitry Osipenko Aug. 1, 2019, 6:39 p.m. UTC | #5
01.08.2019 20:56, Sowjanya Komatineni пишет:
> 
> On 8/1/19 3:43 AM, Dmitry Osipenko wrote:
>> 01.08.2019 0:08, Sowjanya Komatineni пишет:
>>> On 7/31/19 4:04 AM, Dmitry Osipenko wrote:
>>>> 31.07.2019 3:20, Sowjanya Komatineni пишет:
>>>>> This patch updates device tree for RTC and PMC to allow system wake
>>>>> from deep sleep on RTC alarm.
>>>>>
>>>>> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>>>>> ---
>>>>>    arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 ++++-
>>>>>    1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>>> b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>>> index 659753118e96..30a7c48385a2 100644
>>>>> --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>>> +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
>>>>> @@ -768,7 +768,8 @@
>>>>>        rtc@7000e000 {
>>>>>            compatible = "nvidia,tegra210-rtc", "nvidia,tegra20-rtc";
>>>>>            reg = <0x0 0x7000e000 0x0 0x100>;
>>>>> -        interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +        interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +        interrupt-parent = <&pmc>;
>>>>>            clocks = <&tegra_car TEGRA210_CLK_RTC>;
>>>>>            clock-names = "rtc";
>>>>>        };
>>>>> @@ -778,6 +779,8 @@
>>>>>            reg = <0x0 0x7000e400 0x0 0x400>;
>>>>>            clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
>>>>>            clock-names = "pclk", "clk32k_in";
>>>>> +        #interrupt-cells = <2>;
>>>>> +        interrupt-controller;
>>>>>              powergates {
>>>>>                pd_audio: aud {
>>>>>
>>>> Is this a backwards-compatible change? Or it's not really worth to care
>>>> about the compatibility with older kernel versions, I'm not sure about
>>>> overall state of T210 in the upstream kernel.
>>> I don't think its required to be backwards-compatible as SC7 entry/exit
>>> implementation for T210 is with this patch series onwards..
>> The new device tree binary should work with older kernel versions, AFAIK
>> this is the upstream rule. But if kernel support isn't in a very good
>> shape and not much people are using it, then obviously it is not very
>> important.
> 
> Yes, my response to backwards-compatible was with respect to interrupt
> parent change as this will not be backward compatible and also there is
> no Tegra210 suspend/resume earlier. Other functionality wise, it is
> backward compatible.

Should be good then.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index 659753118e96..30a7c48385a2 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -768,7 +768,8 @@ 
 	rtc@7000e000 {
 		compatible = "nvidia,tegra210-rtc", "nvidia,tegra20-rtc";
 		reg = <0x0 0x7000e000 0x0 0x100>;
-		interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+		interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-parent = <&pmc>;
 		clocks = <&tegra_car TEGRA210_CLK_RTC>;
 		clock-names = "rtc";
 	};
@@ -778,6 +779,8 @@ 
 		reg = <0x0 0x7000e400 0x0 0x400>;
 		clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
 		clock-names = "pclk", "clk32k_in";
+		#interrupt-cells = <2>;
+		interrupt-controller;
 
 		powergates {
 			pd_audio: aud {