From patchwork Wed May 21 02:01:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Schumann X-Patchwork-Id: 350968 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E77B314008E for ; Wed, 21 May 2014 17:46:55 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA1F44B64D; Wed, 21 May 2014 09:46:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kl5jOoEos0UO; Wed, 21 May 2014 09:46:53 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5CEA84B60F; Wed, 21 May 2014 09:46:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6AFFD4B61E for ; Wed, 21 May 2014 04:35:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VUxRUOM-jIei for ; Wed, 21 May 2014 04:35:19 +0200 (CEST) X-Greylist: delayed 1999 seconds by postgrey-1.27 at theia; Wed, 21 May 2014 04:35:14 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from 222161.vs.webtropia.com (jeepxj.de [80.82.222.161]) by theia.denx.de (Postfix) with ESMTPS id 1305C4B622 for ; Wed, 21 May 2014 04:35:14 +0200 (CEST) Received: from kaputnik by 222161.vs.webtropia.com with local (Exim 4.80) (envelope-from ) id 1Wmvqt-0006HU-CF; Wed, 21 May 2014 04:01:55 +0200 From: Peter Schumann To: u-boot@lists.denx.de Date: Wed, 21 May 2014 04:01:55 +0200 Message-Id: <1400637715-24117-1-git-send-email-peter.schumann@jeepxj.de> X-Mailer: git-send-email 1.7.10.4 X-Mailman-Approved-At: Wed, 21 May 2014 09:46:44 +0200 Cc: Marek Vasut Subject: [U-Boot] [PATCH] mxs: fixed battery boot on imx233-olinuxino-micro X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch makes it possible to boot from battery on olinuxino Boards from Olimex. We should not set DOUBLE_FETS in HW_POWER_MINPWR, it makes my system reset with in seconds while running on battery power. Also mxs_power_enable_4p2() should not be called if running from battery. It switches VDDD and VDDA to LinReg mode and than turns off the VDDIO DCDC supply. At this point the system resets. If we run on battery this is no good idea because the LinRegs are chained behind VDDIO and battery voltage seems not enough to power the system from LinRegs. Also is the power system already running on DCDC after BootROM hands over to u-boot, so no sense in switching back to LinRegs. --- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index d25019a..0cbb6c4 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -237,9 +237,6 @@ static void mxs_src_power_init(void) POWER_LOOPCTRL_RCSCALE_THRESH | POWER_LOOPCTRL_EN_RCSCALE_8X); - clrsetbits_le32(&power_regs->hw_power_minpwr, - POWER_MINPWR_HALFFETS, POWER_MINPWR_DOUBLE_FETS); - /* 5V to battery handoff ... FIXME */ setbits_le32(&power_regs->hw_power_5vctrl, POWER_5VCTRL_DCDC_XFER); early_delay(30); @@ -631,8 +628,6 @@ static void mxs_batt_boot(void) writel(POWER_CTRL_ENIRQ_DCDC4P2_BO, &power_regs->hw_power_ctrl_clr); - clrsetbits_le32(&power_regs->hw_power_minpwr, - POWER_MINPWR_HALFFETS, POWER_MINPWR_DOUBLE_FETS); mxs_power_set_linreg(); @@ -655,7 +650,6 @@ static void mxs_batt_boot(void) POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK, 0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET); - mxs_power_enable_4p2(); } /**