From patchwork Thu Mar 28 16:11:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 15725 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 00ADF23E10 for ; Thu, 28 Mar 2013 16:12:05 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id AC2B2A184BD for ; Thu, 28 Mar 2013 16:12:04 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id jw11so4151754veb.36 for ; Thu, 28 Mar 2013 09:12:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=ZfDzbW6NSlA+DvHpNhfX7DBJByNU1XiBduzaSBFt67E=; b=CRic4WE1cNW8ReT/uZgkZ1qdnZyWsqj/aMMo7i9bM8+1W/X45/cUrk7wcrTd5x+Md0 +z0D+ZvenIgwnDAd5HTuliLeReqs9qIipwfYZgLWXg8uzW5YNZe/rJtYzRIgYGpf0C10 ANH38kormcAdmXPj44XT5fKXDclSKGqg7PrGjodCTUUZX2VsIZ/aFSIP6zL3sckBzodO Kv4BXlIT7svCLlwJTSQDvJR0ES2t70b2TdHDalMMxtXL9PBHYqqm/KB6hp5mfNMxIRtR Dhjkj/CrjYPxSqfTj69GXPmBraqpH07nAFVjV7mlmVh/puc9NP5DHYuwcIM8nJan5wza 7kbw== X-Received: by 10.52.233.225 with SMTP id tz1mr24157499vdc.54.1364487124244; Thu, 28 Mar 2013 09:12:04 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp22396ved; Thu, 28 Mar 2013 09:12:03 -0700 (PDT) X-Received: by 10.180.97.132 with SMTP id ea4mr17405790wib.23.1364487122635; Thu, 28 Mar 2013 09:12:02 -0700 (PDT) Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]) by mx.google.com with ESMTPS id fe2si4321959wic.35.2013.03.28.09.12.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:02 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22b is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::22b; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::22b is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f171.google.com with SMTP id d46so6406190wer.16 for ; Thu, 28 Mar 2013 09:12:02 -0700 (PDT) X-Received: by 10.194.95.198 with SMTP id dm6mr39544791wjb.6.1364487119551; Thu, 28 Mar 2013 09:11:59 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id o5sm16765926wix.3.2013.03.28.09.11.57 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:11:58 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones Subject: [PATCH 05/33] ARM: ux500: Setup external regulator supply #2 for HREF v20 boards Date: Thu, 28 Mar 2013 16:11:05 +0000 Message-Id: <1364487093-19551-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> References: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmn4pnqrdS4yYhh9oaQi64PYGARjV3EYen4qoL6/TP+/FXMMzAOlX794oRX0KWGfOL1mKrv v20 HREFs require non-standard configuration of EXT_SUPPLY2 to function correctly (specific information is commented). Here we make use of the recently added mechanism to adapt initialisation values for such use-cases. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-regulators.c | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 2a2751e..c1173a1 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -510,4 +510,32 @@ void mop500_regulator_init(void) regulator->constraints.state_mem.disabled = 1; regulator->constraints.state_standby.disabled = 1; } + + /* + * Handle AB8500_EXT_SUPPLY2 on HREFP_V20_V50 boards (do it for + * all HREFP_V20 boards) + */ + if (cpu_is_u8500v20()) { + /* VextSupply2RequestCtrl = HP/OFF depending on VxRequest */ + ab8500_modify_reg_init(AB8500_REGUREQUESTCTRL3, 0x01, 0x01); + + /* VextSupply2SysClkReq1HPValid = SysClkReq1 controlled */ + ab8500_modify_reg_init(AB8500_REGUSYSCLKREQ1HPVALID2, + 0x20, 0x20); + + /* VextSupply2 = force HP at initialization */ + ab8500_modify_reg_init(AB8500_EXTSUPPLYREGU, 0x0c, 0x04); + + /* enable VextSupply2 during platform active */ + regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY2]; + regulator->constraints.always_on = 1; + + /* disable VextSupply2 in suspend */ + regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY2]; + regulator->constraints.state_mem.disabled = 1; + regulator->constraints.state_standby.disabled = 1; + + /* enable VextSupply2 HW control (used in suspend) */ + regulator->driver_data = (void *)&ab8500_ext_supply2; + } }