From patchwork Mon Jun 1 19:33:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthijs van Duin X-Patchwork-Id: 6524341 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F1C369F40A for ; Mon, 1 Jun 2015 19:33:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10B78203EC for ; Mon, 1 Jun 2015 19:33:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EFD3C203EB for ; Mon, 1 Jun 2015 19:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbbFATde (ORCPT ); Mon, 1 Jun 2015 15:33:34 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:35040 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbbFATdc (ORCPT ); Mon, 1 Jun 2015 15:33:32 -0400 Received: by wgme6 with SMTP id e6so122743541wgm.2; Mon, 01 Jun 2015 12:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=iaiO3gZhfKRAy5B3AxFU7qGJpEA3ZHHyIYLtHEJBRXY=; b=r/lIZYlJgaxPd7NVxycOZ2yH6Ki574qpTrhFion9asTuPnMuj3uPvvUVG42mP+iSx1 WhpFv89uGaVtizJqDimK71elsJYuU+kW0bnHev4csuZHn7z7XAsd9cDsoDAN/B6g7/NY /Y/QTwAttZM/afxKvly6s2sSkg42s5dJnfTrVAKLlxaX6wYUfF4F0h5/tEo2slKNKut/ RB2AL+hhoZxXmCdM53WGcbkhujQOX11WOUObRRumm5j5NgqA0inN3KcctrPQmS2NVIGu n0WggtpbgSiumuzOyH55W09jlFOsxfQq921bMFQwTICd9VpN9oPaJHk2V2ML8KRvsSyS LHLg== X-Received: by 10.194.78.110 with SMTP id a14mr25022656wjx.87.1433187210770; Mon, 01 Jun 2015 12:33:30 -0700 (PDT) Received: from squirrel.local ([2001:981:a3b9:1:8e70:5aff:fe05:accc]) by mx.google.com with ESMTPSA id hn7sm18075883wib.5.2015.06.01.12.33.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2015 12:33:29 -0700 (PDT) Date: Mon, 1 Jun 2015 21:33:28 +0200 From: Matthijs van Duin To: Tony Lindgren Cc: "linux-omap@vger.kernel.org" , Robert Nelson , devicetree , "linux-arm-kernel@lists.infradead.org" , Felipe Balbi , Johan Hovold Subject: Re: [PATCH] ARM: dts: am335x-boneblack: disable RTC-only sleep Message-ID: <20150601193328.GA27640@squirrel.local> References: <1432136322-7609-1-git-send-email-robertcnelson@gmail.com> <20150601172330.GX30984@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150601172330.GX30984@atomide.com> Received: by 10.194.70.227 with HTTP; Mon, 1 Jun 2015 11:41:54 -0700 (PDT) User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 1 June 2015 at 19:23, Tony Lindgren wrote: > Ah finally you got around doing a proper patch :) My First Linux Patch(tm) ;-) > Also, if this is needed as a fix for the mainline kernel to avoid hardware > damage, please let me know too ASAP. The damaging configuration is having &rtc { system-power-controller; } without &tps { ti,pmic-shutdown-controller; } So 3d76be5b9 also avoids damage, but with the unfortunate side-effect that the system doesn't power off at all anymore (it just halts). I do recommend applying this patch (restyled as needed) before reverting 3d76be5b9. > Hmm no ideas about that, I guess people are using gmail to send email > with smtps though? Hmm, setting up mutt turned out less hassle than I remembered... (Let's hope all goes well) > Linux usually does not use the // style comments.. Can you please change > that? And how about have just one section of comments then the entry > for ti,pmic-shutdown-controller? Fresh try... --- 8< ----------------------------------------------------- Fixes: http://bugs.elinux.org/issues/143 Avoid entering "RTC-only mode" at poweroff. It is unsupported by most versions of BeagleBone, and risks hardware damage. Reported-by: Matthijs van Duin Tested-by: Matthijs van Duin Signed-off-by: Robert Nelson Cc: Tony Lindgren Cc: Felipe Balbi Cc: Johan Hovold [Matthijs van Duin: added explanatory comments] Signed-off-by: Matthijs van Duin --- arch/arm/boot/dts/am335x-bone-common.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index c3255e0..c0b0c02 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -223,6 +223,24 @@ /include/ "tps65217.dtsi" &tps { + /* Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only + * mode") at poweroff. Most BeagleBone versions do not support RTC-only + * mode and risk hardware damage if this mode is entered. + * + * For details, see linux-omap mailing list May 2015 thread + * [PATCH] ARM: dts: am335x-bone* enable pmic-shutdown-controller + * In particular, messages: + * http://www.spinics.net/lists/linux-omap/msg118585.html + * http://www.spinics.net/lists/linux-omap/msg118615.html + * + * You can override this later with + * &tps { /delete-property/ ti,pmic-shutdown-controller; } + * if you want to use RTC-only mode and made sure you are not affected + * by the hardware problems. (Tip: double-check by performing a current + * measurement after shutdown: it should be less than 1 mA.) + */ + ti,pmic-shutdown-controller; + regulators { dcdc1_reg: regulator@0 { regulator-name = "vdds_dpr";