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: 6524351 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 92E96C0020 for ; Mon, 1 Jun 2015 19:36:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A54AC203E3 for ; Mon, 1 Jun 2015 19:36:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC00B20384 for ; Mon, 1 Jun 2015 19:36:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YzVTA-0002iV-7Q; Mon, 01 Jun 2015 19:33:56 +0000 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YzVT7-0002fl-Eh for linux-arm-kernel@lists.infradead.org; Mon, 01 Jun 2015 19:33:54 +0000 Received: by wgbgq6 with SMTP id gq6so122948055wgb.3 for ; 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 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150601_123353_634309_0C73CFCA X-CRM114-Status: GOOD ( 16.29 ) X-Spam-Score: -0.8 (/) Cc: devicetree , Johan Hovold , Felipe Balbi , "linux-omap@vger.kernel.org" , Robert Nelson , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_MED, 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";