public inbox for linux-rtc@vger.kernel.org
 help / color / mirror / Atom feed
From: Akashdeep Kaur <a-kaur@ti.com>
To: Vignesh Raghavendra <vigneshr@ti.com>, <praneeth@ti.com>,
	<nm@ti.com>, <alexandre.belloni@bootlin.com>,
	<linux-rtc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <msp@baylibre.com>, <vishalm@ti.com>, <sebin.francis@ti.com>,
	<d-gole@ti.com>, <k-willis@ti.com>
Subject: Re: [PATCH] rtc: ti-k3: Add support to resume from IO DDR low power mode
Date: Fri, 13 Mar 2026 16:47:00 +0530	[thread overview]
Message-ID: <64b4ccfd-e440-4f48-b743-160527b26b42@ti.com> (raw)
In-Reply-To: <04d217c5-e95f-4507-972f-6a8bda201bf3@ti.com>

Hi Vignesh,

On 13/03/26 13:53, Vignesh Raghavendra wrote:
> 
> 
> On 11/03/26 12:32, Akashdeep Kaur wrote:
>> During IO DDR low power mode, the RTC IP is reset and loses its
>> register configuration.
> 
>> The DDR memory still preserves all driver states
>> (reference counts, software context).
> 
> That's the definition of Suspend to RAM
> 
>> System clocks are saved and restored
>> by Device Manager (DM) firmware during the resume sequence.
> 
> Not relevant for this patch in particular.
> 
>> Add support to reconfigure the RTC IP registers in resume handler only if
>> resume hook is called during IO DDR low power mode resume.
>>
> 
> Above all is probably bit too verbose. Below text is all thats needed:
> 
> Restore the RTC HW context which may be lost when system enters certain
> low power mode (IO+DDR mode). Check if the RTC registers are locked
> which would indicate loss of context (reset) and restore the context as
> needed.

Updated the commit message as suggested.

Regards,
Akashdeep Kaur
> 
>> Signed-off-by: Akashdeep Kaur <a-kaur@ti.com>
>> ---
>>
>> Tested deep sleep with rtcwake after IO DDR resume on AM62P-SK.
>>
>> ---
>>   drivers/rtc/rtc-ti-k3.c | 10 +++++++++-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/rtc/rtc-ti-k3.c b/drivers/rtc/rtc-ti-k3.c
>> index ec759d8f7023..e801f5b9d757 100644
>> --- a/drivers/rtc/rtc-ti-k3.c
>> +++ b/drivers/rtc/rtc-ti-k3.c
>> @@ -640,10 +640,18 @@ static int __maybe_unused ti_k3_rtc_suspend(struct device *dev)
>>   static int __maybe_unused ti_k3_rtc_resume(struct device *dev)
>>   {
>>   	struct ti_k3_rtc *priv = dev_get_drvdata(dev);
>> +	int ret = 0;
>> +
>> +	if (k3rtc_check_unlocked(priv)) {
>> +		/* RTC locked implies low power mode exit where RTC loses context */
>> +		ret = k3rtc_configure(dev);
>> +		if (ret)
>> +			return ret;
>> +	}
>>   
>>   	if (device_may_wakeup(dev))
>>   		disable_irq_wake(priv->irq);
>> -	return 0;
>> +	return ret;
>>   }
>>   
>>   static SIMPLE_DEV_PM_OPS(ti_k3_rtc_pm_ops, ti_k3_rtc_suspend, ti_k3_rtc_resume);
> 


      reply	other threads:[~2026-03-13 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11  7:02 [PATCH] rtc: ti-k3: Add support to resume from IO DDR low power mode Akashdeep Kaur
2026-03-13  8:23 ` Vignesh Raghavendra
2026-03-13 11:17   ` Akashdeep Kaur [this message]

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=64b4ccfd-e440-4f48-b743-160527b26b42@ti.com \
    --to=a-kaur@ti.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=d-gole@ti.com \
    --cc=k-willis@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=msp@baylibre.com \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=sebin.francis@ti.com \
    --cc=vigneshr@ti.com \
    --cc=vishalm@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox