From patchwork Fri Apr 17 23:49:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 47306 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5EBE620553 for ; Fri, 17 Apr 2015 23:49:49 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf27510367wgt.1 for ; Fri, 17 Apr 2015 16:49:48 -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=USCmktXTsJ9EpO93WiItSSebVo3xr3qpS8Mju6lN1Jo=; b=WoJbxFyL6wdgD0xelhNvRXMhjdy9g48itnt+FfjP+/usjVUxyQg5eOfCljz5cVlmOv v6ZRH8ZOGs4yXt1bkO32PRdQwlySKWCoWN1ZZD7PXOzrNMJJ2rxwAbcmDLwrQH9P0nvK Fb1Od+lXLPxqoKqwGHh59LXzYn0zzkxABbIL819CWdjB+FDTulcEADI6AjH8b7N+M63X 34r9dI3OdWEFZQ8KyPzmDkOFpVkOEiQG6IzrJ1MCLscneRqDOYYh27He2T3GWfrngcAj Kdxn8Tf1htQFLqiHxInDdTYSBVa9GXtmoV6uzweIMFTmHqTvbKgzEOzXpsIIJjXwez+M fRYA== X-Gm-Message-State: ALoCoQnHvHOJZFPiQs08RDSWZgaGc1DM2jBVB9LNfR8jYBpEkKMl490tse8ChNbFzzDAWVpIeKTM X-Received: by 10.180.11.101 with SMTP id p5mr1376464wib.3.1429314588718; Fri, 17 Apr 2015 16:49:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.231 with SMTP id i7ls571681lae.85.gmail; Fri, 17 Apr 2015 16:49:48 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr6334261lak.111.1429314588462; Fri, 17 Apr 2015 16:49:48 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id ug3si9816341lbb.130.2015.04.17.16.49.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 16:49:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbzk7 with SMTP id zk7so94387558lbb.0 for ; Fri, 17 Apr 2015 16:49:48 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr6539275lbc.32.1429314588379; Fri, 17 Apr 2015 16:49:48 -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.67.65 with SMTP id l1csp262525lbt; Fri, 17 Apr 2015 16:49:47 -0700 (PDT) X-Received: by 10.70.92.34 with SMTP id cj2mr9654686pdb.116.1429314573375; Fri, 17 Apr 2015 16:49:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id by2si18511564pbb.237.2015.04.17.16.49.32; Fri, 17 Apr 2015 16:49:33 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932069AbbDQXtb (ORCPT + 11 others); Fri, 17 Apr 2015 19:49:31 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:33202 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753700AbbDQXtb (ORCPT ); Fri, 17 Apr 2015 19:49:31 -0400 Received: by pdbnk13 with SMTP id nk13so142840426pdb.0 for ; Fri, 17 Apr 2015 16:49:30 -0700 (PDT) X-Received: by 10.68.88.196 with SMTP id bi4mr9621871pbb.130.1429314570600; Fri, 17 Apr 2015 16:49:30 -0700 (PDT) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by mx.google.com with ESMTPSA id hv7sm11157144pdb.86.2015.04.17.16.49.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Apr 2015 16:49:29 -0700 (PDT) From: Lina Iyer To: arnd@arndb.de, catalin.marinas@arm.com, mark.rutland@arm.com, Will.Deacon@arm.com, lorenzo.pieralisi@arm.com Cc: daniel.lezcano@linaro.org, khilman@linaro.org, sboyd@codeaurora.org, galak@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, msivasub@codeaurora.org, agross@codeaurora.org, mlocke@codeaurora.org, bryanh@codeaurora.org, Lina Iyer Subject: [PATCH RFC 4/7] qcom: spm: Add 8916 SPM register data Date: Fri, 17 Apr 2015 17:49:06 -0600 Message-Id: <1429314549-6730-5-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1429314549-6730-1-git-send-email-lina.iyer@linaro.org> References: <1429314549-6730-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.217.174 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 SPM register information and initialization values for QCOM 8916 SoC. Signed-off-by: Lina Iyer --- .../devicetree/bindings/arm/msm/qcom,saw2.txt | 1 + drivers/soc/qcom/spm.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt b/Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt index ae4afc6..986a8ea 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,msm8916-saw2-v3.0-cpu" - reg: Usage: required diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c index 392a714..ffb6045 100644 --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c @@ -115,6 +115,25 @@ static const struct spm_reg_data spm_reg_8064_cpu = { .start_index[PM_SLEEP_MODE_SPC] = 2, }; +static const u32 spm_reg_offset_v3_0[SPM_REG_NR] = { + [SPM_REG_CFG] = 0x08, + [SPM_REG_SPM_CTL] = 0x30, + [SPM_REG_DLY] = 0x34, + [SPM_REG_SEQ_ENTRY] = 0x400, +}; + +/* SPM register data for 8916 */ +static const struct spm_reg_data spm_reg_8916_cpu = { + .reg_offset = spm_reg_offset_v3_0, + .spm_cfg = 0x1, + .spm_dly = 0x3C102800, + .seq = { 0x60, 0x03, 0x60, 0x0B, 0x0F, 0x20, 0x10, 0x80, 0x30, 0x90, + 0x5B, 0x60, 0x03, 0x60, 0x3B, 0x76, 0x76, 0x0B, 0x94, 0x5B, + 0x80, 0x10, 0x26, 0x30, 0x0F }, + .start_index[PM_SLEEP_MODE_STBY] = 0, + .start_index[PM_SLEEP_MODE_SPC] = 5, +}; + static DEFINE_PER_CPU(struct spm_driver_data *, cpu_spm_drv); typedef int (*idle_fn)(int); @@ -325,6 +344,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,msm8916-saw2-v3.0-cpu", + .data = &spm_reg_8916_cpu }, { }, };