From patchwork Thu Mar 28 16:11:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 15724 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 C16AC23E10 for ; Thu, 28 Mar 2013 16:12:02 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by fiordland.canonical.com (Postfix) with ESMTP id D5157A18873 for ; Thu, 28 Mar 2013 16:12:01 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so4325107veb.37 for ; Thu, 28 Mar 2013 09:12:01 -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=CAcScvRbyk0wIHRYCBeuRshQC05xNvSY75m19LAgpWs=; b=l8lcGVomK4vTCYvL7vWfwcX7+RH8492jrjMs8ijZnA3nw5VWweWXDmZ5lKQEIveV5z 2yXNw2oiBfqMbc+tMgsx09OYKJ6zLGWDQxOSmat8FDCcTclgNTKrIqPnwSeegOPVJj0a ClqEOekMSqzE3JsZFiaoc3xXjlcG2esd3E3uKGQV7qXT8g8ycNIRZwLJROurrewbxtj3 CHt9B93xhqcZRHsc4lsEJ7o6vKFTFyewibvDAkcc9jZ1hfKwO1V+twe9kGuSrVcy1o7J G3Ku8ykkifpjwpgXO4z6h73NS1s7cdHYJHk8Z/X3AtdjFioHr63k3T9pY7LB+/x18v4K M8Kg== X-Received: by 10.52.20.239 with SMTP id q15mr23757632vde.73.1364487121197; Thu, 28 Mar 2013 09:12:01 -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 cg12csp22393ved; Thu, 28 Mar 2013 09:12:00 -0700 (PDT) X-Received: by 10.194.93.97 with SMTP id ct1mr39327601wjb.48.1364487119398; Thu, 28 Mar 2013 09:11:59 -0700 (PDT) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx.google.com with ESMTPS id bg8si4329036wib.24.2013.03.28.09.11.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:11:59 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.53 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-wg0-f53.google.com with SMTP id c11so1641536wgh.8 for ; Thu, 28 Mar 2013 09:11:59 -0700 (PDT) X-Received: by 10.194.60.195 with SMTP id j3mr39297686wjr.33.1364487114169; Thu, 28 Mar 2013 09:11:54 -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.52 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:11:53 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones Subject: [PATCH 02/33] ARM: ux500: Add regulator platform data for AB8500 external regulators Date: Thu, 28 Mar 2013 16:11:02 +0000 Message-Id: <1364487093-19551-3-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: ALoCoQl6jyreY1oHcEgm9DkM27XlL5aLsH3pUc4DYTrp1PkwbFlB4sPdHmarK6VEQN9UYdjZdRAr Pass constraint information for recently supported external AB8500 controlled regulators. Also change the start-up initialisation settings for each of the 3 supported external supplies to low-power, off and high-power for supply 1, 2 and 3 respectively. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-regulators.c | 59 +++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 035b92f..089cf2a 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -259,13 +259,13 @@ static struct ab8500_regulator_reg_init ab8500_reg_init[] = { */ INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00), /* - * VextSupply1Regu = HW control - * VextSupply2Regu = HW control - * VextSupply3Regu = HW control + * VextSupply1Regu = force LP + * VextSupply2Regu = force OFF + * VextSupply3Regu = force HP (-> STBB2=LP and TPS=LP) * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0 * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0 */ - INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a), + INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x13), /* * Vaux1Regu = force HP * Vaux2Regu = force off @@ -419,9 +419,60 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { }, }; +/* supply for VextSupply3 */ +static struct regulator_consumer_supply ab8500_ext_supply3_consumers[] = { + /* SIM supply for 3 V SIM cards */ + REGULATOR_SUPPLY("vinvsim", "sim-detect.0"), +}; + +/* extended configuration for VextSupply2, only used for HREFP_V20 boards */ +static struct ab8500_ext_regulator_cfg ab8500_ext_supply2 = { + .hwreq = true, +}; + +/* + * AB8500 external regulators + */ +static struct regulator_init_data ab8500_ext_regulators[] = { + /* fixed Vbat supplies VSMPS1_EXT_1V8 */ + [AB8500_EXT_SUPPLY1] = { + .constraints = { + .name = "ab8500-ext-supply1", + .min_uV = 1800000, + .max_uV = 1800000, + .initial_mode = REGULATOR_MODE_IDLE, + .boot_on = 1, + .always_on = 1, + }, + }, + /* fixed Vbat supplies VSMPS2_EXT_1V36 and VSMPS5_EXT_1V15 */ + [AB8500_EXT_SUPPLY2] = { + .constraints = { + .name = "ab8500-ext-supply2", + .min_uV = 1360000, + .max_uV = 1360000, + }, + }, + /* fixed Vbat supplies VSMPS3_EXT_3V4 and VSMPS4_EXT_3V4 */ + [AB8500_EXT_SUPPLY3] = { + .constraints = { + .name = "ab8500-ext-supply3", + .min_uV = 3400000, + .max_uV = 3400000, + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + .boot_on = 1, + }, + .num_consumer_supplies = + ARRAY_SIZE(ab8500_ext_supply3_consumers), + .consumer_supplies = ab8500_ext_supply3_consumers, + }, +}; + struct ab8500_regulator_platform_data ab8500_regulator_plat_data = { .reg_init = ab8500_reg_init, .num_reg_init = ARRAY_SIZE(ab8500_reg_init), .regulator = ab8500_regulators, .num_regulator = ARRAY_SIZE(ab8500_regulators), + .ext_regulator = ab8500_ext_regulators, + .num_ext_regulator = ARRAY_SIZE(ab8500_ext_regulators), };