From patchwork Sat Jun 27 03:02:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 50396 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 62284228FD for ; Sat, 27 Jun 2015 03:03:28 +0000 (UTC) Received: by laar3 with SMTP id r3sf31255957laa.1 for ; Fri, 26 Jun 2015 20:03:27 -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=qNylv+YYyupYBt+kF+sW/jRRYH5RTyVmVMq475dZiro=; b=FlKssZcygz/FcwlNjrst+I97oClv/butkQ1/KCSL/Imp/L4PKNZOfdnWs2A53Sy38l VKYl0YTkAhxk2nN5T1nFtGqwPuCibCf/oKaPlJsO6BgQit51giBnYFqxEnBUThfvK3Xc +6lhqab/4SwFYyc0rTqqU52wGERLsqCEcmesPca/2/CN9WaHrw6QGOTuiIEtUAl5V98j O+LInvEfv9OOTiAIbDTsBqjGvrKNBPhIUJrKuQRYVkbD2eUF2DIFqnzkxtg+UOU6AmH+ nSpV72evkJR7MFV8ltDVDJ6XtsYo5SUllFpzrdSoO9DUo0yepIX4BYUNWkXx+qBFXhvH iPpQ== X-Gm-Message-State: ALoCoQmxTDE1ThWeOHsxqsgfhwL8GLjcf9NktcHnJ/nrGL1QwbTGQk/MOM84ePAvqlmv90gkNRDo X-Received: by 10.194.175.36 with SMTP id bx4mr3202761wjc.1.1435374207355; Fri, 26 Jun 2015 20:03:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.39 with SMTP id dd7ls606256lac.60.gmail; Fri, 26 Jun 2015 20:03:27 -0700 (PDT) X-Received: by 10.152.22.129 with SMTP id d1mr4347314laf.13.1435374207196; Fri, 26 Jun 2015 20:03:27 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id rk9si28972575lbb.152.2015.06.26.20.03.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 20:03:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by laar3 with SMTP id r3so12602517laa.0 for ; Fri, 26 Jun 2015 20:03:27 -0700 (PDT) X-Received: by 10.152.179.234 with SMTP id dj10mr4319953lac.73.1435374207099; Fri, 26 Jun 2015 20:03:27 -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 hn6csp295325lbb; Fri, 26 Jun 2015 20:03:26 -0700 (PDT) X-Received: by 10.66.101.9 with SMTP id fc9mr9119835pab.37.1435374190071; Fri, 26 Jun 2015 20:03:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay3si53186466pbc.54.2015.06.26.20.03.08; Fri, 26 Jun 2015 20:03:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 S1752381AbbF0DDH (ORCPT + 11 others); Fri, 26 Jun 2015 23:03:07 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:34516 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752661AbbF0DDE (ORCPT ); Fri, 26 Jun 2015 23:03:04 -0400 Received: by pdbep18 with SMTP id ep18so63071878pdb.1 for ; Fri, 26 Jun 2015 20:03:03 -0700 (PDT) X-Received: by 10.70.134.163 with SMTP id pl3mr9225544pdb.142.1435374183718; Fri, 26 Jun 2015 20:03:03 -0700 (PDT) Received: from ubuntu.localdomain (c-24-8-37-141.hsd1.co.comcast.net. [24.8.37.141]) by mx.google.com with ESMTPSA id j7sm34787756pdp.83.2015.06.26.20.03.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 20:03:03 -0700 (PDT) From: Lina Iyer To: rjw@rjwysocki.net, ulf.hansson@linaro.org, khilman@linaro.org Cc: geert@linux-m68k.org, k.kozlowski@samsung.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, msivasub@codeaurora.org, agross@codeaurora.org, Lina Iyer Subject: [PATCH RFC v2 13/16] drivers: qcom: spm: Add 8084 L2 SPM register data Date: Fri, 26 Jun 2015 21:02:33 -0600 Message-Id: <1435374156-19214-14-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435374156-19214-1-git-send-email-lina.iyer@linaro.org> References: <1435374156-19214-1-git-send-email-lina.iyer@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lina.iyer@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.215.47 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: , Add register data and configure L2 SAW to support voltage control and L2 idle states for QCOM APQ8084 SoC. Signed-off-by: Lina Iyer --- .../devicetree/bindings/arm/msm/qcom,saw2.txt | 1 + drivers/soc/qcom/spm.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt b/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt index ae4afc6..91430ff 100644 --- a/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt +++ b/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt @@ -27,6 +27,7 @@ PROPERTIES "qcom,apq8064-saw2-v1.1-cpu" "qcom,msm8974-saw2-v2.1-cpu" "qcom,apq8084-saw2-v2.1-cpu" + "qcom,apq8084-saw2-v2.1-l2" - reg: Usage: required diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c index ad1498e..c54de31 100644 --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c @@ -90,6 +90,8 @@ static const u8 spm_reg_offset_v2_1[SPM_REG_NR] = { [SPM_REG_SPM_CTL] = 0x30, [SPM_REG_DLY] = 0x34, [SPM_REG_SEQ_ENTRY] = 0x80, + [SPM_REG_PMIC_DATA_0] = 0x40, + [SPM_REG_PMIC_DATA_1] = 0x44, }; /* SPM register data for 8974, 8084 */ @@ -104,6 +106,20 @@ static const struct spm_reg_data spm_reg_8974_8084_cpu = { .start_index[PM_SLEEP_MODE_SPC] = 3, }; +static const struct spm_reg_data spm_reg_8084_l2 = { + .reg_offset = spm_reg_offset_v2_1, + .spm_cfg = 0x14, + .spm_dly = 0x3C102800, + .pmic_data[0] = 0x02030080, + .pmic_data[1] = 0x00030000, + .seq = { 0x1F, 0x00, 0x20, 0x03, 0x22, 0x00, 0x0F, 0x00, 0x10, 0x22, + 0x12, 0x32, 0x60, 0x70, 0x80, 0xB0, 0x11, 0x42, 0x03, 0x01, + 0xB0, 0x78, 0x80, 0x12, 0x22, 0x44, 0x50, 0x3B, 0x60, 0x02, + 0x32, 0x50, 0x0F }, + .start_index[PM_SLEEP_MODE_STBY] = 0, + .start_index[PM_SLEEP_MODE_SPC] = 7, +}; + static const u8 spm_reg_offset_v1_1[SPM_REG_NR] = { [SPM_REG_CFG] = 0x08, [SPM_REG_SPM_CTL] = 0x20, @@ -216,6 +232,7 @@ static int qcom_cpu_spc(int cpu) struct spm_driver_data *drv = per_cpu(cpu_spm_drv, cpu); spm_set_low_power_mode(drv, PM_SLEEP_MODE_SPC); + ret = cpu_suspend(0, qcom_pm_collapse); /* * ARM common code executes WFI without calling into our driver and @@ -344,6 +361,7 @@ static int pd_power_off(struct generic_pm_domain *domain) /* Match L2 SPM with their affinity level */ static const struct of_device_id cache_spm_table[] = { + { .compatible = "qcom,apq8084-saw2-v2.1-l2", .data = (void *)0 }, { }, }; @@ -417,6 +435,8 @@ static const struct of_device_id spm_match_table[] = { .data = &spm_reg_8974_8084_cpu }, { .compatible = "qcom,apq8064-saw2-v1.1-cpu", .data = &spm_reg_8064_cpu }, + { .compatible = "qcom,apq8084-saw2-v2.1-l2", + .data = &spm_reg_8084_l2 }, { }, };