From patchwork Mon Feb 4 11:53:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14454 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 0FD9423F96 for ; Mon, 4 Feb 2013 11:56:00 +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 A6EF3A18610 for ; Mon, 4 Feb 2013 11:55:59 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so4619466veb.9 for ; Mon, 04 Feb 2013 03:55:59 -0800 (PST) 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=le/4JEe9F2zgCgUCGZN+oqznJd75UqIsd7eL7ije/hg=; b=iUYVP8waw5yItSbID1dKehhR3V+/H4Rzapbfx2SJYsZg5SH1HNS/lyz8YO9W3Sdo9N KXryqOI+rmmLSienZNpwS5foOgm7RhTJq8mXMvyR11/2zvOHO+KMWXgnHDuFqk5Gj13u HZCTepnwOyU5k417OF0krCQ8NSfROFP9P9t9CUXmVytTBuM3w527+gr6oN0wP65ihZbT J0p6iZSKLizPxppBeRzZFSTt/ii9+3ecVdLfB/iLQllQ58VqDTj8WsjjXo7MXAR7Btkk N2DczbB4Lq3bffv0nabZ5jgVuSMHjzPSbsJN1E7DcjyOkmMsmshiCjdZxhiTpR+02gvD Z6GQ== X-Received: by 10.52.21.146 with SMTP id v18mr18928234vde.79.1359978959190; Mon, 04 Feb 2013 03:55:59 -0800 (PST) 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.252.8 with SMTP id zo8csp83020vec; Mon, 4 Feb 2013 03:55:58 -0800 (PST) X-Received: by 10.195.13.200 with SMTP id fa8mr34580233wjd.15.1359978958291; Mon, 04 Feb 2013 03:55:58 -0800 (PST) Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]) by mx.google.com with ESMTPS id dg3si3473788wib.63.2013.02.04.03.55.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:55:58 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::22a is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c00::22a; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c00::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-wg0-f42.google.com with SMTP id 12so3040486wgh.1 for ; Mon, 04 Feb 2013 03:55:57 -0800 (PST) X-Received: by 10.194.108.101 with SMTP id hj5mr34680370wjb.6.1359978957405; Mon, 04 Feb 2013 03:55:57 -0800 (PST) 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 j9sm12937128wia.5.2013.02.04.03.55.55 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:55:56 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones , Bengt Jonsson Subject: [PATCH 05/73] ARM: ux500: Vsmps3 controlled by SysClkReq1 Date: Mon, 4 Feb 2013 11:53:20 +0000 Message-Id: <1359978868-28736-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> References: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmMZunRbdj7L6maNiYT3K+WE+42O3GkyKiMBouEJEg0Ve+K5T3LbyNnuMzWiXilbqknhuMq Vsmps3 is put in HW control by SysClkReq1 at init. The corresponding settings in suspend-force are removed. Signed-off-by: Bengt Jonsson Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-regulators.c | 27 ++++++++++++++++++++----- drivers/regulator/ab8500.c | 21 ++++++++++++++++--- include/linux/regulator/ab8500.h | 3 +++ 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index ae0695b..556eba5 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -143,15 +143,16 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = { */ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00), /* + * Vsmps1SysClkReq1HPValid = enabled + * Vsmps2SysClkReq1HPValid = enabled + * Vsmps3SysClkReq1HPValid = enabled * VanaSysClkReq1HPValid = disabled * VpllSysClkReq1HPValid = enabled * Vaux1SysClkReq1HPValid = disabled * Vaux2SysClkReq1HPValid = disabled * Vaux3SysClkReq1HPValid = disabled - * Vsmps2SysClkReq1HPValid = enabled - * Vsmps1SysClkReq1HPValid = enabled */ - INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x13), + INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x17), /* * VextSupply1SysClkReq1HPValid = disabled * VextSupply2SysClkReq1HPValid = disabled @@ -256,16 +257,32 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = { */ INIT_REGULATOR_REGISTER(AB8500_VBBSEL2, 0x00), /* - * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2 * Vsmps1Regu = HW control + * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2 */ INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x06), /* - * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2 * Vsmps2Regu = HW control + * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2 */ INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x06), /* + * Vsmps3Sel2 = 1.2125 V + * NOTE! PRCMU register + */ + INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL2, 0x29), + /* + * Vsmps3Regu = HW control + * Vsmps3SelCtrl = Vsmps3 voltage defined by Vsmps3Sel2 + * NOTE! PRCMU register + */ + INIT_REGULATOR_REGISTER(AB8500_VSMPS3REGU, 0x06), + /* + * Vsmps3Sel1 = 0.9 V + * NOTE! PRCMU register + */ + INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL1, 0x10), + /* * VPll = Hw controlled * VanaRegu = force off */ diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 8edc413..ba1483b 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -496,13 +496,14 @@ static struct ab8500_reg_init ab8500_reg_init[] = { /* * 0x01, Vsmps1SysClkReq1HPValid * 0x02, Vsmps2SysClkReq1HPValid + * 0x04, Vsmps3SysClkReq1HPValid * 0x08, VanaSysClkReq1HPValid * 0x10, VpllSysClkReq1HPValid * 0x20, Vaux1SysClkReq1HPValid * 0x40, Vaux2SysClkReq1HPValid * 0x80, Vaux3SysClkReq1HPValid */ - REG_INIT(AB8500_REGUSYSCLKREQ1HPVALID1, 0x03, 0x07, 0xfb), + REG_INIT(AB8500_REGUSYSCLKREQ1HPVALID1, 0x03, 0x07, 0xff), /* * 0x10, VextSupply1SysClkReq1HPValid * 0x20, VextSupply2SysClkReq1HPValid @@ -599,16 +600,22 @@ static struct ab8500_reg_init ab8500_reg_init[] = { */ REG_INIT(AB8500_VBBSEL2, 0x04, 0x12, 0x0f), /* - * 0x0c, Vsmps1SelCtrl * 0x03, Vsmps1Regu + * 0x0c, Vsmps1SelCtrl */ REG_INIT(AB8500_VSMPS1REGU, 0x04, 0x03, 0x0f), /* - * 0x0c, Vsmps2SelCtrl * 0x03, Vsmps2Regu + * 0x0c, Vsmps2SelCtrl */ REG_INIT(AB8500_VSMPS2REGU, 0x04, 0x04, 0x0f), /* + * 0x03, Vsmps3Regu + * 0x0c, Vsmps3SelCtrl + * NOTE! PRCMU register + */ + REG_INIT(AB8500_VSMPS3REGU, 0x04, 0x05, 0x0f), + /* * 0x0c, VanaRegu * 0x03, VpllRegu */ @@ -641,6 +648,14 @@ static struct ab8500_reg_init ab8500_reg_init[] = { */ REG_INIT(AB8500_VSMPS1SEL1, 0x04, 0x13, 0x3f), /* + * 0x7f, Vsmps3Sel1 + */ + REG_INIT(AB8500_VSMPS3SEL1, 0x04, 0x1b, 0x7f), + /* + * 0x7f, Vsmps3Sel2 + */ + REG_INIT(AB8500_VSMPS3SEL2, 0x04, 0x1c, 0x7f), + /* * 0x0f, Vaux1Sel */ REG_INIT(AB8500_VAUX1SEL, 0x04, 0x1f, 0x0f), diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index e54c8af..2c6c962 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -91,7 +91,10 @@ enum ab8500_regulator_reg { AB8500_VBBSEL2, /* NOTE! PRCMU register */ AB8500_VSMPS1REGU, AB8500_VSMPS2REGU, + AB8500_VSMPS3REGU, /* NOTE! PRCMU register */ AB8500_VSMPS1SEL1, + AB8500_VSMPS3SEL1, /* NOTE! PRCMU register */ + AB8500_VSMPS3SEL2, /* NOTE! PRCMU register */ AB8500_NUM_REGULATOR_REGISTERS, };