From: Benoit Cousson <b-cousson@ti.com>
To: "AnilKumar, Chimata" <anilkumar@ti.com>
Cc: Colin Foe-Parker <colin.foeparker@logicpd.com>,
"a.zummo@towertech.it" <a.zummo@towertech.it>,
"sameo@linux.intel.com" <sameo@linux.intel.com>,
"tony@atomide.com" <tony@atomide.com>,
"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>
Subject: Re: [PATCH 2/4] rtc: OMAP: Add system pm_power_off to rtc driver
Date: Tue, 6 Nov 2012 17:56:54 +0100 [thread overview]
Message-ID: <50994156.4080305@ti.com> (raw)
In-Reply-To: <331ABD5ECB02734CA317220B2BBEABC13EA64F14@DBDE01.ent.ti.com>
Hi Anil,
On 11/06/2012 06:07 AM, AnilKumar, Chimata wrote:
> On Mon, Nov 05, 2012 at 22:13:25, Cousson, Benoit wrote:
>> Hi Anil / Colin,
>>
>> On 11/05/2012 10:42 AM, AnilKumar Ch wrote:
>>> From: Colin Foe-Parker <colin.foeparker@logicpd.com>
>>>
>>> Add system power off control to rtc driver which is the in-charge
>>> of controlling the BeagleBone system power. The power_off routine
>>> can be hooked up to "pm_power_off" system call.
>>>
>>> System power off sequence:-
>>> * Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
>>> * Enable PMIC_POWER_EN in rtc module
>>> * Set rtc ALARM2 time
>>> * Enable ALARM2 interrupt
>>>
>>> Added while (1); after the above steps to make sure that no other
>>> process acquire cpu. Otherwise we might see an unexpected behaviour
>>> because we are shutting down all the power rails of SoC except RTC.
>>>
>>> Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
>>> [anilkumar@ti.com: move poweroff additions to rtc driver]
>>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>>> ---
>>> Documentation/devicetree/bindings/rtc/rtc-omap.txt | 5 ++
>>> drivers/rtc/rtc-omap.c | 79 +++++++++++++++++++-
>>> 2 files changed, 83 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
>>> index b47aa41..8d9f4f9 100644
>>> --- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
>>> +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
>>> @@ -6,6 +6,10 @@ Required properties:
>>> - interrupts: rtc timer, alarm interrupts in order
>>> - interrupt-parent: phandle for the interrupt controller
>>>
>>> +Optional properties:
>>> +- ti,system-power-controller: Telling whether or not rtc is controlling
>>> + the system power.
>>
>> I don't know how it is connected at board level, but I'm not sure the
>> binding is the proper one.
>
> Hi Benoit,
> ________________________________
> | ______ _______ |
> | | | | | |
> | |RTC | | | |
> | |PMIC | Line | | |
> | |PWR_EN|=======>|PWR_EN | |
> | |______| |_______| |
> | AM335x SoC TPS65217 |
> | |
> |________________________________|
> BeagleBone
>
> This is how RTC PMIC_PWR_EN is connected to PWR_EN of TPS65217 PMIC. Only when
> RTC pull low in PMIC_PWR_EN then PMIC will go to power off state provided TPS65217
> status should be changed to STATUS_OFF.
>
> ALARM2 event should be trigger to configure PMIC_PWR_EN properly then the "Line"
> driven low so that PMIC will go to shutdown mode.
Thanks for the nice diagram :-)
I'm wondering if we cannot abuse the gpio binding to describe that
connection instead of creating two custom attributes (PMIC + RTC).
Ideally we should do that without having to change the RTC to use the
gpiolib at all.
rtc: rtc@44e3e000 {
compatible = "ti,da830-rtc";
reg = <0x44e3e000 0x1000>;
interrupts = <75, 76>;
ti,hwmods = "rtc";
/* expose the PWR_EN functionality of this RTC*/
gpio-controller;
#gpio-cells = <0>; /* assuming we can use 0 ??? */
};
...
tps: tps@24 {
compatible = "ti,tps65217";
/*
* Enable the power enable feature from
* the input line if that attribute is there.
*/
gpio-power-en = <&rtc>; /* PWR_EN */
...
}
Any thought?
Regards,
Benoit
next prev parent reply other threads:[~2012-11-06 16:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 9:42 [PATCH 0/4] pm: Add power off control AnilKumar Ch
2012-11-05 9:42 ` [PATCH 1/4] mfd: tps65217: Set PMIC to shutdowm on PWR_EN toggle AnilKumar Ch
[not found] ` <1352108549-9341-2-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-11-05 16:59 ` Benoit Cousson
[not found] ` <5097F078.50701-l0cyMroinI0@public.gmane.org>
2012-11-06 5:13 ` AnilKumar, Chimata
2012-11-14 2:23 ` Mark Brown
[not found] ` <20121114022341.GM4415-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-14 5:10 ` AnilKumar, Chimata
2012-11-14 6:11 ` AnilKumar, Chimata
2012-11-14 6:21 ` Mark Brown
[not found] ` <20121114062117.GC7407-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-14 6:49 ` AnilKumar, Chimata
2012-11-14 7:00 ` Mark Brown
[not found] ` <20121114070046.GE7407-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-14 10:08 ` Benoit Cousson
2012-11-14 10:24 ` Mark Brown
[not found] ` <20121114102452.GI7407-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-16 6:16 ` AnilKumar, Chimata
2012-11-05 9:42 ` [PATCH 2/4] rtc: OMAP: Add system pm_power_off to rtc driver AnilKumar Ch
[not found] ` <1352108549-9341-3-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-11-05 16:43 ` Benoit Cousson
[not found] ` <5097ECAD.9010101-l0cyMroinI0@public.gmane.org>
2012-11-05 17:39 ` Colin FoeParker
2012-11-06 5:07 ` AnilKumar, Chimata
2012-11-06 16:56 ` Benoit Cousson [this message]
[not found] ` <50994156.4080305-l0cyMroinI0@public.gmane.org>
2012-11-12 9:47 ` AnilKumar, Chimata
2012-11-14 5:01 ` AnilKumar, Chimata
2012-11-14 5:21 ` Mark Brown
2012-11-14 5:50 ` AnilKumar, Chimata
2012-11-14 6:00 ` Mark Brown
2012-11-06 5:45 ` Bedia, Vaibhav
[not found] ` <B5906170F1614E41A8A28DE3B8D121433EC04226-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-11-12 9:47 ` AnilKumar, Chimata
2012-11-16 6:13 ` AnilKumar, Chimata
2012-11-16 10:47 ` AnilKumar, Chimata
2012-11-05 9:42 ` [PATCH 3/4] ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone AnilKumar Ch
[not found] ` <1352108549-9341-1-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-11-05 9:42 ` [PATCH 4/4] ARM: dts: AM33XX: Enable system power off control in am335x-bone AnilKumar Ch
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=50994156.4080305@ti.com \
--to=b-cousson@ti.com \
--cc=a.zummo@towertech.it \
--cc=anilkumar@ti.com \
--cc=colin.foeparker@logicpd.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).