From patchwork Thu Jul 9 11:47:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 6755281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F576C05AC for ; Thu, 9 Jul 2015 11:52:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C393A20763 for ; Thu, 9 Jul 2015 11:52:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F3D102077D for ; Thu, 9 Jul 2015 11:52:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDALf-0004o6-6u; Thu, 09 Jul 2015 11:50:39 +0000 Received: from mail-pd0-f170.google.com ([209.85.192.170]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDALJ-0003HL-Ox for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2015 11:50:18 +0000 Received: by pdbep18 with SMTP id ep18so163972010pdb.1 for ; Thu, 09 Jul 2015 04:49:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GJYOdYBptAwBfQmmMdoC5SoSKAYYGwKZybbnVURsIfY=; b=AhTpIY5zrPDnn/S0H12b+0gcrBeY286yB/ml6cEAT/9fBjmXYjDQopWzl+vYLaY/Oc +e/FfwFruWcM/l2n4OxI64nSkCGVoRjuD7NSH/VvutAsR2LYUgOn2sWZkW8kP5GVqVKu aBNBA4lh1qmWY+vGzNmNH9PGFZ8vz/fKaL+RtQ8D+n8K4x8mKjn8ejMNWNuqVrE098lA lyRQ6WPDZW215UNTDPIg7BH0Pk1KJhYnAOk3xXYF5yOpNmhtQGpPaBBmAHYxC85gK4sN W4QlWugHO+XxQUo+3C5ddQ5XiE/nzhKS+k7jfxte9ZS6r1csRap9tmFoCFI4zxk06Ffk T+8A== X-Gm-Message-State: ALoCoQm8ZeOC7ITXDmwlMl3jp3GDhA2xDxzPee2quCFqPsuEfqOZc66cEMaOtIV+jZmL+zrrA+MX X-Received: by 10.66.186.195 with SMTP id fm3mr456031pac.91.1436442597471; Thu, 09 Jul 2015 04:49:57 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by smtp.gmail.com with ESMTPSA id qo1sm5709802pbc.89.2015.07.09.04.49.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 04:49:56 -0700 (PDT) From: Vaibhav Hiremath To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/6] mfd: 88pm800: Add support for configuration of dual phase on BUCK1 Date: Thu, 9 Jul 2015 17:17:11 +0530 Message-Id: <1436442431-3471-7-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436442431-3471-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1436442431-3471-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150709_045017_846773_45E61706 X-CRM114-Status: GOOD ( 14.46 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, k.kozlowski@samsung.com, sameo@linux.intel.com, linux-kernel@vger.kernel.org, Vaibhav Hiremath , robh+dt@kernel.org, lee.jones@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 88PM860 device supports dual phase mode on BUCK1 output. In normal usecase, BUCK1A and BUCK1B operates independently with 3A capacity. And they both can work as a dual phase providing 6A capacity. This patch adds support to enable dual phase mode, using DT property "marvell,88pm860-buck1-dualphase-en" Signed-off-by: Vaibhav Hiremath --- drivers/mfd/88pm800.c | 11 +++++++++++ include/linux/mfd/88pm80x.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index 8930fd8..a2ef0c7 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c @@ -556,6 +556,17 @@ static int pm800_init_config(struct pm80x_chip *chip, struct device_node *np) if (ret) goto error; + /* enable buck1 dual phase mode*/ + if (of_property_read_bool(np, + "marvell,88pm860-buck1-dualphase-en")) { + ret = regmap_update_bits(chip->subchip->regmap_power, + PM860_BUCK1_MISC, + BUCK1_DUAL_PHASE_SEL, + BUCK1_DUAL_PHASE_SEL); + if (ret) + goto error; + } + /* * Set buck2 and buck4 driver selection to be full. * The default value is 0, for full drive support diff --git a/include/linux/mfd/88pm80x.h b/include/linux/mfd/88pm80x.h index fb916f1..b40d15f 100644 --- a/include/linux/mfd/88pm80x.h +++ b/include/linux/mfd/88pm80x.h @@ -293,6 +293,9 @@ enum { #define PM860_BUCK4_MISC2 (0x82) #define PM860_BUCK4_FULL_DRV BIT(2) +#define PM860_BUCK1_MISC (0x8E) +#define BUCK1_DUAL_PHASE_SEL BIT(2) + struct pm80x_rtc_pdata { int vrtc; int rtc_wakeup;