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: 50946 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CDCC9213FD for ; Thu, 9 Jul 2015 11:51:01 +0000 (UTC) Received: by lbbpo10 with SMTP id po10sf31788045lbb.1 for ; Thu, 09 Jul 2015 04:51:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ofP215jejmhoiVJ3+Viv2Pjxt/AtbYjexfwSb7VybmE=; b=mg/50IypYxlWBPwtPlaFG1yQ2Zg1ObAib1lV3W+XBVzmUf6eDROvjNaJP1IV+xKKs4 8d6nFPsdBhMVx0vJ0H3GnVePOUs7tOKe0b0bgZW9wbFDnk4YxWj+YC5EanplHhsDHOF0 1vNee5VOKGj1g8uU3uFuE1Pw3JOw+vZvlqqwYMwknR5U8D3qpp05R8fXQ3+tAmVSCZvB C+68OPv5jftqt9krR1QObMuLc7uMYTgwXFJbUyOdWs3hCjtLke4E2eo1PfPkJsPmXK3F f22CtvJP67KKhplBMiIGrjlHHLK0X3XR+MDTxa3z5W4di1bPTOGT0m4sKel0R3kTj2+4 YV3g== X-Gm-Message-State: ALoCoQmssRs8AV88TyO3KVHj9Z41L7+ABtpFlz88isaos1L1f9Ysv5uUxflLWwOo/LxGnvxssCb8 X-Received: by 10.112.255.66 with SMTP id ao2mr7631356lbd.15.1436442660847; Thu, 09 Jul 2015 04:51:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.129 with SMTP id rk1ls1093583lac.71.gmail; Thu, 09 Jul 2015 04:51:00 -0700 (PDT) X-Received: by 10.112.221.172 with SMTP id qf12mr14122895lbc.98.1436442660677; Thu, 09 Jul 2015 04:51:00 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id ec8si4596707lbb.68.2015.07.09.04.51.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 04:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbnk3 with SMTP id k3so73523631lbn.1 for ; Thu, 09 Jul 2015 04:51:00 -0700 (PDT) X-Received: by 10.152.5.228 with SMTP id v4mr7001600lav.36.1436442660590; Thu, 09 Jul 2015 04:51:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp612085lbb; Thu, 9 Jul 2015 04:50:59 -0700 (PDT) X-Received: by 10.66.132.16 with SMTP id oq16mr30703419pab.89.1436442658832; Thu, 09 Jul 2015 04:50:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ko11si8911494pbd.60.2015.07.09.04.50.57; Thu, 09 Jul 2015 04:50:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753350AbbGILuz (ORCPT + 29 others); Thu, 9 Jul 2015 07:50:55 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:34903 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbbGILt6 (ORCPT ); Thu, 9 Jul 2015 07:49:58 -0400 Received: by pdrg1 with SMTP id g1so32443664pdr.2 for ; Thu, 09 Jul 2015 04:49:57 -0700 (PDT) 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 Cc: robh+dt@kernel.org, sameo@linux.intel.com, lee.jones@linaro.org, k.kozlowski@samsung.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vaibhav Hiremath 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vaibhav.hiremath@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;