diff mbox

[12/12] ARM: dts: am335x-bone-common: enable power off and rtc wake up

Message ID 1412881594-25678-13-git-send-email-johan@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Johan Hovold Oct. 9, 2014, 7:06 p.m. UTC
Configure the RTC as system-power controller, which allows the system to
be powered off as well as woken up again on subsequent RTC alarms.

Note that the PMIC needs to be put in SLEEP (rather than OFF) mode to
maintain RTC power. Specifically, this means that the PMIC
ti,pmic-shutdown-controller property must be left unset in order to be
able to wake up on RTC alarms.

Tested on BeagleBone Black (rev A5).

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 arch/arm/boot/dts/am335x-bone-common.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Felipe Balbi Oct. 10, 2014, 6:09 p.m. UTC | #1
On Thu, Oct 09, 2014 at 09:06:34PM +0200, Johan Hovold wrote:
> Configure the RTC as system-power controller, which allows the system to
> be powered off as well as woken up again on subsequent RTC alarms.
> 
> Note that the PMIC needs to be put in SLEEP (rather than OFF) mode to
> maintain RTC power. Specifically, this means that the PMIC
> ti,pmic-shutdown-controller property must be left unset in order to be
> able to wake up on RTC alarms.
> 
> Tested on BeagleBone Black (rev A5).

one thing though. IIRC, rtc-only mode does not work with ES1.0 and
beagle-bone white uses that. Perhaps move this from bone-common to
boneblack.dts ?

other than that

Reviewed-by: Felipe Balbi <balbi@ti.com>

> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
>  arch/arm/boot/dts/am335x-bone-common.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
> index bde1777b62be..d0693bea9580 100644
> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
> @@ -298,3 +298,7 @@
>  	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
>  	cd-inverted;
>  };
> +
> +&rtc {
> +	ti,system-power-controller;
> +};
> -- 
> 2.0.4
>
Johan Hovold Oct. 11, 2014, 10:34 a.m. UTC | #2
On Fri, Oct 10, 2014 at 01:09:49PM -0500, Felipe Balbi wrote:
> On Thu, Oct 09, 2014 at 09:06:34PM +0200, Johan Hovold wrote:
> > Configure the RTC as system-power controller, which allows the system to
> > be powered off as well as woken up again on subsequent RTC alarms.
> > 
> > Note that the PMIC needs to be put in SLEEP (rather than OFF) mode to
> > maintain RTC power. Specifically, this means that the PMIC
> > ti,pmic-shutdown-controller property must be left unset in order to be
> > able to wake up on RTC alarms.
> > 
> > Tested on BeagleBone Black (rev A5).
> 
> one thing though. IIRC, rtc-only mode does not work with ES1.0 and
> beagle-bone white uses that. Perhaps move this from bone-common to
> boneblack.dts ?

Yeah, I had a quick look at the errata and you seem to be correct. I'll
move it to boneblack.dts.

> other than that
> 
> Reviewed-by: Felipe Balbi <balbi@ti.com>

Thanks,
Johan
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index bde1777b62be..d0693bea9580 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -298,3 +298,7 @@ 
 	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
 	cd-inverted;
 };
+
+&rtc {
+	ti,system-power-controller;
+};