diff mbox

ARM: dts: am335x-boneblack: disable RTC-only sleep

Message ID 1432136322-7609-1-git-send-email-robertcnelson@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Nelson May 20, 2015, 3:38 p.m. UTC
Fixes: http://bugs.elinux.org/issues/143

Entering RTC-only sleep is only properly supported on early prototypes series
(pre-A6) of the BeagleBone Black.  Since rev (A6A), which include all production
versions, it is not support at due to.

(rev A6) enable of the 3v3b regulator moved from LDO2 to LDO4 (3v3a)
side-effect: 3v3b rail remains on in sleep-mode (also in off-mode when battery-powered)

(rev A6A) am335x vdds supply moved from LDO3 to LDO1
side-effect: vdds remains supplied in sleep-mode

Reported-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Tested-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Johan Hovold <johan@kernel.org>
---
 arch/arm/boot/dts/am335x-boneblack.dts | 4 ----
 1 file changed, 4 deletions(-)

Comments

Tony Lindgren May 20, 2015, 4:47 p.m. UTC | #1
* Robert Nelson <robertcnelson@gmail.com> [150520 08:53]:
> Fixes: http://bugs.elinux.org/issues/143
> 
> Entering RTC-only sleep is only properly supported on early prototypes series
> (pre-A6) of the BeagleBone Black.  Since rev (A6A), which include all production
> versions, it is not support at due to.
> 
> (rev A6) enable of the 3v3b regulator moved from LDO2 to LDO4 (3v3a)
> side-effect: 3v3b rail remains on in sleep-mode (also in off-mode when battery-powered)
> 
> (rev A6A) am335x vdds supply moved from LDO3 to LDO1
> side-effect: vdds remains supplied in sleep-mode
> 
> Reported-by: Matthijs van Duin <matthijsvanduin@gmail.com>
> Tested-by: Matthijs van Duin <matthijsvanduin@gmail.com>
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Johan Hovold <johan@kernel.org>
> ---
>  arch/arm/boot/dts/am335x-boneblack.dts | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
> index 5c42d25..901739f 100644
> --- a/arch/arm/boot/dts/am335x-boneblack.dts
> +++ b/arch/arm/boot/dts/am335x-boneblack.dts
> @@ -80,7 +80,3 @@
>  		status = "okay";
>  	};
>  };
> -
> -&rtc {
> -	system-power-controller;
> -};

Applying into omap-for-v4.1/fixes thanks.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthijs van Duin June 1, 2015, 12:20 a.m. UTC | #2
Sorry for the late response, I only just noticed this since I wasn't CC'd.

This "fix" was not ever Reported-By or Tested-By me as it claims. It
is in fact wrong: &rtc { system-power-controller; } needs to be
present for every variety of beaglebone (more generally every design
with a TPS65217 whose PWR_EN is connected to the PMIC_POWER_EN pin of
an AM335x).

Without a system-power-controller, the kernel has no way of turning
off the system and shutdown will leave the system halted instead.

The previously posted fix, which added  &tps {
ti,pmic-shutdown-controller; }  was correct, and ensures that a
poweroff makes the pmic enter "OFF-state" rather than "SLEEP-state"
(aka RTC-only sleep).

Matthijs
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Robert Nelson June 1, 2015, 2:18 a.m. UTC | #3
On Sun, May 31, 2015 at 7:20 PM, Matthijs van Duin
<matthijsvanduin@gmail.com> wrote:
> Sorry for the late response, I only just noticed this since I wasn't CC'd.
>
> This "fix" was not ever Reported-By or Tested-By me as it claims. It
> is in fact wrong: &rtc { system-power-controller; } needs to be
> present for every variety of beaglebone (more generally every design
> with a TPS65217 whose PWR_EN is connected to the PMIC_POWER_EN pin of
> an AM335x).
>
> Without a system-power-controller, the kernel has no way of turning
> off the system and shutdown will leave the system halted instead.
>
> The previously posted fix, which added  &tps {
> ti,pmic-shutdown-controller; }  was correct, and ensures that a
> poweroff makes the pmic enter "OFF-state" rather than "SLEEP-state"
> (aka RTC-only sleep).

Sorry Matthijs, (and everyone else)

That's my fault for completely screwing up this patch..

Revert:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3d76be5b933e2a66d85a2f7444e68e99e8a48ad4

Then use:
http://www.spinics.net/lists/linux-omap/msg118512.html

With the update commit message:

Fixes: http://bugs.elinux.org/issues/143

Entering RTC-only sleep is only properly supported on early prototypes
series (pre-A6) of the BeagleBone Black. Since rev (A6A), which
include all production versions, it is not support at due to.

(rev A6) enable of the 3v3b regulator moved from LDO2 to LDO4 (3v3a)
side-effect: 3v3b rail remains on in sleep-mode (also in off-mode when
battery-powered)

(rev A6A) am335x vdds supply moved from LDO3 to LDO1 side-effect: vdds
remains supplied in sleep-mode

Regards,
Tony Lindgren June 1, 2015, 5:12 p.m. UTC | #4
* Robert Nelson <robertcnelson@gmail.com> [150531 19:20]:
> On Sun, May 31, 2015 at 7:20 PM, Matthijs van Duin
> <matthijsvanduin@gmail.com> wrote:
> > Sorry for the late response, I only just noticed this since I wasn't CC'd.
> >
> > This "fix" was not ever Reported-By or Tested-By me as it claims. It
> > is in fact wrong: &rtc { system-power-controller; } needs to be
> > present for every variety of beaglebone (more generally every design
> > with a TPS65217 whose PWR_EN is connected to the PMIC_POWER_EN pin of
> > an AM335x).
> >
> > Without a system-power-controller, the kernel has no way of turning
> > off the system and shutdown will leave the system halted instead.
> >
> > The previously posted fix, which added  &tps {
> > ti,pmic-shutdown-controller; }  was correct, and ensures that a
> > poweroff makes the pmic enter "OFF-state" rather than "SLEEP-state"
> > (aka RTC-only sleep).
> 
> Sorry Matthijs, (and everyone else)
> 
> That's my fault for completely screwing up this patch..

Hmm OK. So do we now have a situation in the mainline that can
potentially cause hardware damage?

It seems we don't need to revert anything, just apply Matthijs'
new patch?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 5c42d25..901739f 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -80,7 +80,3 @@ 
 		status = "okay";
 	};
 };
-
-&rtc {
-	system-power-controller;
-};