From patchwork Thu Mar 21 15:59:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 15520 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 4329923E14 for ; Thu, 21 Mar 2013 16:01:36 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id 9807AA19E77 for ; Thu, 21 Mar 2013 16:01:35 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id 15so2633950vea.0 for ; Thu, 21 Mar 2013 09:01:35 -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=e67aKcyzsNYjXGtBD4gQN+M28McJylrd9SKocO2/bP4=; b=HZpBFVg/7v+ki4nVMSZv1CP4sVi54NNOh6nUUqhR62jxo/OB2BcYz42VvAEtOXfU4E g7hfCmMeD+8G2cV2l6J5snVYHbRHldB/4b6YQJuHEyWSFr4Kp7oxPXLRhozhr2oZaBRo KJgGex63r3FbsyL0WAUqwDuBT7US4JcVJpIUowAySpUJ94ysT0NxR7nZQRJqEIu4XxQh NNcC9miuoNYa5QTN8zzMA1UAgiX/iW23ZNntUHJCjXSIHIC1AuBM7+4mYAbJELjA17fM 7zoGUzcc9nN5nXKOzmRqzSpigMS61BiAFx3/izXu3Qvsbwdh8FInt/AJ/pwrUacaPcRe F8+A== X-Received: by 10.220.154.199 with SMTP id p7mr14259551vcw.46.1363881695120; Thu, 21 Mar 2013 09:01:35 -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.58.233.198 with SMTP id ty6csp66850vec; Thu, 21 Mar 2013 09:01:34 -0700 (PDT) X-Received: by 10.180.91.106 with SMTP id cd10mr5759553wib.6.1363881693907; Thu, 21 Mar 2013 09:01:33 -0700 (PDT) Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]) by mx.google.com with ESMTPS id fw6si1419029wib.103.2013.03.21.09.01.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 09:01:33 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22a is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::22a; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::22a 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-wi0-f170.google.com with SMTP id hm11so7413485wib.1 for ; Thu, 21 Mar 2013 09:01:33 -0700 (PDT) X-Received: by 10.180.189.205 with SMTP id gk13mr3193831wic.25.1363881693498; Thu, 21 Mar 2013 09:01:33 -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 h10sm6110847wic.8.2013.03.21.09.01.31 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 09:01:32 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones Subject: [PATCH 46/46] ARM: ux500: Regulators: Bring the AB8500 regulator platform data up-to-date Date: Thu, 21 Mar 2013 15:59:43 +0000 Message-Id: <1363881583-15234-47-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363881583-15234-1-git-send-email-lee.jones@linaro.org> References: <1363881583-15234-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlFReJgGrLfJdOEbUVqPj+18V1zRiCDn5fid315YX/qlgZ6ZGOiJ99MCAHzXc184iF4SNxG Quite a few changes in this patch, including: supply-name changes, new consumers, initialisation and capability updates and new regulators. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-regulators.c | 75 ++++++++++++++++--------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 30e61e0..3249bb9 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -66,7 +66,7 @@ static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { /* BH1780GLS ambient light sensor */ REGULATOR_SUPPLY("vcc", "2-0029"), /* lsm303dlh accelerometer */ - REGULATOR_SUPPLY("vdd", "3-0018"), + REGULATOR_SUPPLY("vdd", "2-0018"), /* lsm303dlhc accelerometer */ REGULATOR_SUPPLY("vdd", "2-0019"), /* lsm303dlh magnetometer */ @@ -93,9 +93,16 @@ static struct regulator_consumer_supply ab8500_vaux2_consumers[] = { REGULATOR_SUPPLY("vmmc", "sdi4"), /* AB8500 audio codec */ REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"), + /* AB8500 accessory detect 1 */ + REGULATOR_SUPPLY("vcc-N2158", "ab8500-acc-det.0"), + /* AB8500 Tv-out device */ + REGULATOR_SUPPLY("vcc-N2158", "mcde_tv_ab8500.4"), + /* AV8100 HDMI device */ + REGULATOR_SUPPLY("vcc-N2158", "av8100_hdmi.3"), }; static struct regulator_consumer_supply ab8500_vaux3_consumers[] = { + REGULATOR_SUPPLY("v-SD-STM", "stm"), /* External MMC slot power */ REGULATOR_SUPPLY("vmmc", "sdi0"), }; @@ -126,6 +133,10 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = { REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"), /* Internal general-purpose ADC */ REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"), + /* ADC for charger */ + REGULATOR_SUPPLY("vddadc", "ab8500-charger.0"), + /* AB8500 Tv-out device */ + REGULATOR_SUPPLY("vtvout", "mcde_tv_ab8500.4"), }; static struct regulator_consumer_supply ab8500_vaud_consumers[] = { @@ -153,6 +164,8 @@ static struct regulator_consumer_supply ab8500_vintcore_consumers[] = { REGULATOR_SUPPLY("v-intcore", NULL), /* USB Transceiver */ REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"), + /* Handled by abx500 clk driver */ + REGULATOR_SUPPLY("v-intcore", "abx500-clk.0"), }; static struct regulator_consumer_supply ab8505_usb_consumers[] = { @@ -161,8 +174,15 @@ static struct regulator_consumer_supply ab8505_usb_consumers[] = { }; static struct regulator_consumer_supply ab8500_vana_consumers[] = { - /* External displays, connector on board, 1v8 power supply */ - REGULATOR_SUPPLY("vsmps2", "mcde.0"), + /* DB8500 DSI */ + REGULATOR_SUPPLY("vdddsi1v2", "mcde"), + REGULATOR_SUPPLY("vdddsi1v2", "b2r2_core"), + REGULATOR_SUPPLY("vdddsi1v2", "b2r2_1_core"), + REGULATOR_SUPPLY("vdddsi1v2", "dsilink.0"), + REGULATOR_SUPPLY("vdddsi1v2", "dsilink.1"), + REGULATOR_SUPPLY("vdddsi1v2", "dsilink.2"), + /* DB8500 CSI */ + REGULATOR_SUPPLY("vddcsi1v2", "mmio_camera"), }; /* ab8500 regulator register initialization */ @@ -304,9 +324,9 @@ static struct ab8500_regulator_reg_init ab8500_reg_init[] = { */ INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x03, 0x00), /* - * Vaux1Sel = 2.5 V + * Vaux1Sel = 2.8 V */ - INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x08), + INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x0C), /* * Vaux2Sel = 2.9 V */ @@ -342,18 +362,11 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { [AB8500_LDO_AUX1] = { .constraints = { .name = "V-DISPLAY", - .min_uV = 2500000, - .max_uV = 2900000, + .min_uV = 2800000, + .max_uV = 3300000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, .boot_on = 1, /* display is on at boot */ - /* - * This voltage cannot be disabled right now because - * it is somehow affecting the external MMC - * functionality, though that typically will use - * AUX3. - */ - .always_on = 1, }, .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), .consumer_supplies = ab8500_vaux1_consumers, @@ -365,7 +378,10 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { .min_uV = 1100000, .max_uV = 3300000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | - REGULATOR_CHANGE_STATUS, + REGULATOR_CHANGE_STATUS | + REGULATOR_CHANGE_MODE, + .valid_modes_mask = REGULATOR_MODE_NORMAL | + REGULATOR_MODE_IDLE, }, .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers), .consumer_supplies = ab8500_vaux2_consumers, @@ -377,7 +393,10 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { .min_uV = 1100000, .max_uV = 3300000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | - REGULATOR_CHANGE_STATUS, + REGULATOR_CHANGE_STATUS | + REGULATOR_CHANGE_MODE, + .valid_modes_mask = REGULATOR_MODE_NORMAL | + REGULATOR_MODE_IDLE, }, .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers), .consumer_supplies = ab8500_vaux3_consumers, @@ -431,15 +450,23 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { [AB8500_LDO_INTCORE] = { .constraints = { .name = "V-INTCORE", - .valid_ops_mask = REGULATOR_CHANGE_STATUS, + .min_uV = 1250000, + .max_uV = 1350000, + .input_uV = 1800000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | + REGULATOR_CHANGE_STATUS | + REGULATOR_CHANGE_MODE | + REGULATOR_CHANGE_DRMS, + .valid_modes_mask = REGULATOR_MODE_NORMAL | + REGULATOR_MODE_IDLE, }, .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers), .consumer_supplies = ab8500_vintcore_consumers, }, - /* supply for U8500 CSI/DSI, VANA LDO */ + /* supply for U8500 CSI-DSI, VANA LDO */ [AB8500_LDO_ANA] = { .constraints = { - .name = "V-CSI/DSI", + .name = "V-CSI-DSI", .valid_ops_mask = REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers), @@ -999,16 +1026,8 @@ void mop500_regulator_init(void) struct regulator_init_data *regulator; /* - * Handle VextSupply1 on older boards than HREFP_V22_V1x - * (turn off in suspend) + * Temporarily turn on Vaux2 on 8520 machine */ - if (cpu_is_u8500v20() || cpu_is_u8500v21()) { - /* disable VextSupply1 in suspend */ - regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY1]; - regulator->constraints.state_mem.disabled = 1; - regulator->constraints.state_standby.disabled = 1; - } - if (cpu_is_u8520()) { /* Vaux2 initialized to be on */ ab8500_modify_reg_init(AB8505_VAUX12REGU, 0x0f, 0x05);