From patchwork Fri Mar 25 19:04:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Haas X-Patchwork-Id: 8672811 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 7799FC0553 for ; Fri, 25 Mar 2016 19:08:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 810E520340 for ; Fri, 25 Mar 2016 19:08:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 631432022A for ; Fri, 25 Mar 2016 19:08:27 +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 1ajX2j-0007Fw-Mz; Fri, 25 Mar 2016 19:05:09 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ajX2f-00064w-US for linux-arm-kernel@lists.infradead.org; Fri, 25 Mar 2016 19:05:06 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 832EA43B3B; Fri, 25 Mar 2016 20:04:36 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id wNJix6QYROQf; Fri, 25 Mar 2016 20:04:35 +0100 (CET) From: Michael Haas To: linux-sunxi@googlegroups.com Subject: [PATCH 1/3] sunxi: A20-OLinuXino-LIME2: Fix ldo3/ldo4 in DTS Date: Fri, 25 Mar 2016 20:04:05 +0100 Message-Id: <1458932647-24268-1-git-send-email-haas@computerlinguist.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160325_120506_201608_BA0883AB X-CRM114-Status: GOOD ( 16.30 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , maxime.ripard@free-electrons.com, Michael Haas , wens@csie.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 LDO3 and LDO4 are set to regulator-always-on which causes crashes on my A20-OLinuXino-LIME2 once axp20x-i2c.ko is loaded. This crash is observed in combination with recent versions of Das U-Boot starting from their commit 02cc27c74f9b884b538bcd1b93342a4c05b5d608. >commit 02cc27c74f9b884b538bcd1b93342a4c05b5d608 >Author: Hans de Goede >Date: Sat Oct 3 15:29:24 2015 +0200 > > sunxi: power: Change axp209 LDO3 and LDO4 default to disabled > > LDO3 and LDO4 are normally either unused, or used to power csi > attached camera sensors, and as such do not need to be enabled at > boot time. > > Signed-off-by: Hans de Goede > Acked-by: Ian Campbell Hans de Goede suggests fixing the Linux DTS file via the u-boot list: >The regulator-always-on will cause both regulators to get turned on, >but the min / max constraints match the datasheet constrains / the >absolute min / max values these ldo-s can deliver, not the constraints >which the board design puts on these. > >So now these ldo-s end up getting turned on at whatever voltage >is the default (which according to the datasheet is unknown), >where as the schematic says that if these get turned on (which >is not necessary) they should be run at 2.8V. > >This dts file is the only axp209 using dts file which: > >1) Does not have proper constraints for LDO3 / LDO4 >2) Uses regulator-always-on; for these > >I would suggest fixing both, first you can try making min = max = >2800000. And if that fixes things, which I expect it will, I would >also drop the regulator-always-on from the dts, since we really >only need to turn these on when using the csi interface in which >case it would be up to the csi driver to explicitly turn them on. This patch implements the suggested changes. It is not enough to set the voltage to 2800000 to avoid the crash. Hence, I have also removed regulator-always-on. Signed-off-by: Michael Haas CC: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts index d5c796c..d5ff2e9 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts @@ -140,15 +140,13 @@ }; vcc_csi0: ldo3 { - regulator-min-microvolt = <700000>; - regulator-max-microvolt = <3500000>; - regulator-always-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; }; vcc_csi1: ldo4 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; }; vdd_cpu: dcdc2 {