From patchwork Mon May 13 10:20:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 780961708 for ; Mon, 13 May 2019 10:21:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 694CA26E79 for ; Mon, 13 May 2019 10:21:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 679E827E71; Mon, 13 May 2019 10:21:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1920826E79 for ; Mon, 13 May 2019 10:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728890AbfEMKUj (ORCPT ); Mon, 13 May 2019 06:20:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55764 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728852AbfEMKUi (ORCPT ); Mon, 13 May 2019 06:20:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B9A2660AA8; Mon, 13 May 2019 10:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742837; bh=gv7cZOA40miXv3BP7BEyZB/2v7GNv3dIS+X+E9LBQ48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D7nZeUWxzg+XiGuMd3cl2M201OgzHR/mJX62SXBM6L2svpIy+zXbAVoZRhCGKxipq rXQK9epk8mWjQiUIyERdDGG+Zft7p9egONnD/wgWcWAB65N7tiY5diwUF/f3dirVzg Tld4+TZuvrLe5x+ChjV0MgfVdBMkPiOVgjPZSWDQ= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2B3B660A0A; Mon, 13 May 2019 10:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742837; bh=gv7cZOA40miXv3BP7BEyZB/2v7GNv3dIS+X+E9LBQ48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D7nZeUWxzg+XiGuMd3cl2M201OgzHR/mJX62SXBM6L2svpIy+zXbAVoZRhCGKxipq rXQK9epk8mWjQiUIyERdDGG+Zft7p9egONnD/wgWcWAB65N7tiY5diwUF/f3dirVzg Tld4+TZuvrLe5x+ChjV0MgfVdBMkPiOVgjPZSWDQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2B3B660A0A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 1/9] soc: qcom: rpmpd: fixup rpmpd set performance state Date: Mon, 13 May 2019 15:50:07 +0530 Message-Id: <20190513102015.26551-2-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remoteproc q6v5-mss calls set_performace_state with INT_MAX on rpmpd. This is currently ignored since it is greater than the max supported state. Fixup rpmpd state to max if the required state is greater than all the supported states. Fixes: 075d3db8d10d ("soc: qcom: rpmpd: Add support for get/set performance state") Reviewed-by: Marc Gonzalez Signed-off-by: Sibi Sankar --- drivers/soc/qcom/rpmpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 005326050c23..235d01870dd8 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -226,7 +226,7 @@ static int rpmpd_set_performance(struct generic_pm_domain *domain, struct rpmpd *pd = domain_to_rpmpd(domain); if (state > MAX_RPMPD_STATE) - goto out; + state = MAX_RPMPD_STATE; mutex_lock(&rpmpd_lock); From patchwork Mon May 13 10:20:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0E1514DB for ; Mon, 13 May 2019 10:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D28BE26E79 for ; Mon, 13 May 2019 10:21:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0C652787C; Mon, 13 May 2019 10:21:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE443274A3 for ; Mon, 13 May 2019 10:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728852AbfEMKUm (ORCPT ); Mon, 13 May 2019 06:20:42 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55850 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727690AbfEMKUm (ORCPT ); Mon, 13 May 2019 06:20:42 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 485E060C72; Mon, 13 May 2019 10:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742841; bh=9qbE9DNsT7sHR+XIxHoeAAs2S5N1haUdw3Jt612GZno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=duspvJgLY6ATJbIzQz8rkrrAXzgIar+9cWfyNhcFuzMVsHfko64V6JZbz47QhQLDP mBVWr2Mfrj+Uv7ElZxVmIr8GWmAboZmnIp6qYW7miGGU7MZShzGncDctNG/mSSAmeZ wVp6/TpGrFYhAPRhAik1IE2sND+RkSc9dNqWEGBs= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9532E60ACA; Mon, 13 May 2019 10:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742840; bh=9qbE9DNsT7sHR+XIxHoeAAs2S5N1haUdw3Jt612GZno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YronulV9I4I0iQfXZGtNt4yyrD6vRlbWSVhE72Ry85twC9vCqzoE59jPstJfFfqKx SvXVTOwmU4oREFh/aMx4x5owCwOIKU4qQCpQ5ScqaGqYMG14S2vmgHLZ5hNyJcHVNi dcFLMPdyhUEQEsW7SKOIMfkCA4F8yp+0ymx+c044= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9532E60ACA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 2/9] soc: qcom: rpmpd: Add support to set rpmpd state to max Date: Mon, 13 May 2019 15:50:08 +0530 Message-Id: <20190513102015.26551-3-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP rpmpd max state varies across SoCs and SoC families, add support in the driver to make it SoC/SoC family specific Signed-off-by: Sibi Sankar --- drivers/soc/qcom/rpmpd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 235d01870dd8..94015ece40e9 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -25,7 +25,7 @@ #define KEY_ENABLE 0x6e657773 /* swen */ #define KEY_FLOOR_CORNER 0x636676 /* vfc */ -#define MAX_RPMPD_STATE 6 +#define MAX_8996_RPMPD_STATE 6 #define DEFINE_RPMPD_CORNER_SMPA(_platform, _name, _active, r_id) \ static struct rpmpd _platform##_##_active; \ @@ -83,12 +83,14 @@ struct rpmpd { const int res_type; const int res_id; struct qcom_smd_rpm *rpm; + unsigned int max_state; __le32 key; }; struct rpmpd_desc { struct rpmpd **rpmpds; size_t num_pds; + unsigned int max_state; }; static DEFINE_MUTEX(rpmpd_lock); @@ -114,6 +116,7 @@ static struct rpmpd *msm8996_rpmpds[] = { static const struct rpmpd_desc msm8996_desc = { .rpmpds = msm8996_rpmpds, .num_pds = ARRAY_SIZE(msm8996_rpmpds), + .max_state = MAX_8996_RPMPD_STATE, }; static const struct of_device_id rpmpd_match_table[] = { @@ -225,8 +228,8 @@ static int rpmpd_set_performance(struct generic_pm_domain *domain, int ret = 0; struct rpmpd *pd = domain_to_rpmpd(domain); - if (state > MAX_RPMPD_STATE) - state = MAX_RPMPD_STATE; + if (state > pd->max_state) + state = pd->max_state; mutex_lock(&rpmpd_lock); @@ -287,6 +290,7 @@ static int rpmpd_probe(struct platform_device *pdev) } rpmpds[i]->rpm = rpm; + rpmpds[i]->max_state = desc->max_state; rpmpds[i]->pd.power_off = rpmpd_power_off; rpmpds[i]->pd.power_on = rpmpd_power_on; rpmpds[i]->pd.set_performance_state = rpmpd_set_performance; From patchwork Mon May 13 10:20:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 479BF76 for ; Mon, 13 May 2019 10:20:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39F0527C2D for ; Mon, 13 May 2019 10:20:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E50D27B13; Mon, 13 May 2019 10:20:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8930627D0C for ; Mon, 13 May 2019 10:20:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728959AbfEMKUq (ORCPT ); Mon, 13 May 2019 06:20:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55910 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727690AbfEMKUq (ORCPT ); Mon, 13 May 2019 06:20:46 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5E27A60DA8; Mon, 13 May 2019 10:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742844; bh=zS8DrOz5WurZvcV/n0BwH0EBgvkhjyGk4NDqv1Y+o6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IR1D3bp5NcaU3rCQKTB2AEp9Vp0Qc0bOhwkeToZsAZkdPbH+FJLzFIDxnz68j+Cde 8OPen/xQfG5OXe0+D2XdDzq/p93BVah74832hg7V0Gvuh4WdyqGNIGG3nbiBM3AX/r PPf4H+D4kdy77Gn4hb/SrY3d5OR0NR8crwaWyYvs= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0B2DB60A0A; Mon, 13 May 2019 10:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742843; bh=zS8DrOz5WurZvcV/n0BwH0EBgvkhjyGk4NDqv1Y+o6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bwVRFOy7nd6up2G5sI/5VF1g+de7UGc8sUf7vooSgACfsBdvO8XzNJacPwBxQ3wp6 WrgpMvrMaPYcH4RsEBPuDeMC1xw0NQAHp9Y3hd/X4GDVgi1UWHx6/hkT7MnJ+Btces 5OTL82HmBv8RwjbszSnYNtuylls+cVQiXXrBeiTc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0B2DB60A0A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 3/9] soc: qcom: rpmpd: Modify corner defining macros Date: Mon, 13 May 2019 15:50:09 +0530 Message-Id: <20190513102015.26551-4-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Andersson QCS404 uses individual resource type magic for each power-domain, so adjust the macros slightly to make them reusable for this. Signed-off-by: Bjorn Andersson [sibi: Extend rpmpd corner pair to a generic rpmpd pair] Signed-off-by: Sibi Sankar --- drivers/soc/qcom/rpmpd.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 94015ece40e9..bac4499c269d 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -16,7 +16,8 @@ #define domain_to_rpmpd(domain) container_of(domain, struct rpmpd, pd) -/* Resource types */ +/* Resource types: + * RPMPD_X is X encoded as a little-endian, lower-case, ASCII string */ #define RPMPD_SMPA 0x61706d73 #define RPMPD_LDOA 0x616f646c @@ -27,46 +28,41 @@ #define MAX_8996_RPMPD_STATE 6 -#define DEFINE_RPMPD_CORNER_SMPA(_platform, _name, _active, r_id) \ +#define DEFINE_RPMPD_PAIR(_platform, _name, _active, r_type, r_key, \ + r_id) \ static struct rpmpd _platform##_##_active; \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ .peer = &_platform##_##_active, \ - .res_type = RPMPD_SMPA, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ - .key = KEY_CORNER, \ + .key = KEY_##r_key, \ }; \ static struct rpmpd _platform##_##_active = { \ .pd = { .name = #_active, }, \ .peer = &_platform##_##_name, \ .active_only = true, \ - .res_type = RPMPD_SMPA, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ - .key = KEY_CORNER, \ + .key = KEY_##r_key, \ } -#define DEFINE_RPMPD_CORNER_LDOA(_platform, _name, r_id) \ +#define DEFINE_RPMPD_CORNER(_platform, _name, r_type, r_id) \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ - .res_type = RPMPD_LDOA, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_CORNER, \ } -#define DEFINE_RPMPD_VFC(_platform, _name, r_id, r_type) \ +#define DEFINE_RPMPD_VFC(_platform, _name, r_type, r_id) \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ - .res_type = r_type, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_FLOOR_CORNER, \ } -#define DEFINE_RPMPD_VFC_SMPA(_platform, _name, r_id) \ - DEFINE_RPMPD_VFC(_platform, _name, r_id, RPMPD_SMPA) - -#define DEFINE_RPMPD_VFC_LDOA(_platform, _name, r_id) \ - DEFINE_RPMPD_VFC(_platform, _name, r_id, RPMPD_LDOA) - struct rpmpd_req { __le32 key; __le32 nbytes; @@ -96,12 +92,12 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); /* msm8996 RPM Power domains */ -DEFINE_RPMPD_CORNER_SMPA(msm8996, vddcx, vddcx_ao, 1); -DEFINE_RPMPD_CORNER_SMPA(msm8996, vddmx, vddmx_ao, 2); -DEFINE_RPMPD_CORNER_LDOA(msm8996, vddsscx, 26); +DEFINE_RPMPD_PAIR(msm8996, vddcx, vddcx_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_PAIR(msm8996, vddmx, vddmx_ao, SMPA, CORNER, 2); +DEFINE_RPMPD_CORNER(msm8996, vddsscx, LDOA, 26); -DEFINE_RPMPD_VFC_SMPA(msm8996, vddcx_vfc, 1); -DEFINE_RPMPD_VFC_LDOA(msm8996, vddsscx_vfc, 26); +DEFINE_RPMPD_VFC(msm8996, vddcx_vfc, SMPA, 1); +DEFINE_RPMPD_VFC(msm8996, vddsscx_vfc, LDOA, 26); static struct rpmpd *msm8996_rpmpds[] = { [MSM8996_VDDCX] = &msm8996_vddcx, From patchwork Mon May 13 10:20:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C426813AD for ; Mon, 13 May 2019 10:21:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B01BA27C2D for ; Mon, 13 May 2019 10:21:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADD8327EED; Mon, 13 May 2019 10:21:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F15127C2D for ; Mon, 13 May 2019 10:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728849AbfEMKUu (ORCPT ); Mon, 13 May 2019 06:20:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56400 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727590AbfEMKUu (ORCPT ); Mon, 13 May 2019 06:20:50 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4439A608A5; Mon, 13 May 2019 10:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742849; bh=bOsp+69oWAjkbCbk4HGkpgA8bZks0hYFvuAcYpjzz9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G1q511HOnEowEsVNGUHeNEbkQRrLHrp0cJKvb0lE9X6M4tLq0oxnPA82L7O02evCN PW7eLLAIYcv0vFd3Ogsx00RYNGALjdklHHrfn3m7GbRqOPoPxJYKefZcLTNwlfBcOY NQvy8+KUw7yKAKK+sewJ0scVmcmx1BEXmiMvMdhQ= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 753B260DAB; Mon, 13 May 2019 10:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742847; bh=bOsp+69oWAjkbCbk4HGkpgA8bZks0hYFvuAcYpjzz9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCcy/zojd6AKVi1+84zOK6fKEwnC9HLGvNJm0A27+NmpPPv3OEi6eSIb3g66W2q71 hus2WEsAhHtb3xD9o+ddGoF99uSP4e6YdU2M4w/TVfmqZwxSbRvACc1EbVPtSw40vq Pu1axJPC2qtTnZWrvfovyjDme8VwrrwWDuIpCmGw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 753B260DAB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Rob Herring , Sibi Sankar Subject: [PATCH v4 4/9] dt-bindings: power: Add rpm power domain bindings for qcs404 Date: Mon, 13 May 2019 15:50:10 +0530 Message-Id: <20190513102015.26551-5-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Andersson Add RPM power domain bindings for the qcs404 family of SoC Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring [sibis: Add supported rpmpd states for qcs404] Signed-off-by: Sibi Sankar --- .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + include/dt-bindings/power/qcom-rpmpd.h | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt index 980e5413d18f..172ccf940c5c 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt @@ -6,6 +6,7 @@ which then translates it into a corresponding voltage on a rail Required Properties: - compatible: Should be one of the following * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC + * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC * qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC - #power-domain-cells: number of cells in Power domain specifier must be 1. diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 87d9c6611682..450378662944 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -36,4 +36,26 @@ #define MSM8996_VDDSSCX 5 #define MSM8996_VDDSSCX_VFC 6 +/* QCS404 Power Domains */ +#define QCS404_VDDMX 0 +#define QCS404_VDDMX_AO 1 +#define QCS404_VDDMX_VFL 2 +#define QCS404_LPICX 3 +#define QCS404_LPICX_VFL 4 +#define QCS404_LPIMX 5 +#define QCS404_LPIMX_VFL 6 + +/* RPM SMD Power Domain performance levels */ +#define RPM_SMD_LEVEL_RETENTION 16 +#define RPM_SMD_LEVEL_RETENTION_PLUS 32 +#define RPM_SMD_LEVEL_MIN_SVS 48 +#define RPM_SMD_LEVEL_LOW_SVS 64 +#define RPM_SMD_LEVEL_SVS 128 +#define RPM_SMD_LEVEL_SVS_PLUS 192 +#define RPM_SMD_LEVEL_NOM 256 +#define RPM_SMD_LEVEL_NOM_PLUS 320 +#define RPM_SMD_LEVEL_TURBO 384 +#define RPM_SMD_LEVEL_TURBO_NO_CPR 416 +#define RPM_SMD_LEVEL_BINNING 512 + #endif From patchwork Mon May 13 10:20:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940659 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B19614DB for ; Mon, 13 May 2019 10:21:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B8D327E63 for ; Mon, 13 May 2019 10:21:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7029B2793B; Mon, 13 May 2019 10:21:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2BFD27E71 for ; Mon, 13 May 2019 10:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbfEMKUy (ORCPT ); Mon, 13 May 2019 06:20:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56786 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727590AbfEMKUx (ORCPT ); Mon, 13 May 2019 06:20:53 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 61B7061157; Mon, 13 May 2019 10:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742852; bh=tx4lpJiLY6uEc/yWnowsmX4GLmrZr+OIrz370A8ASUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YxKtefOBGA6kXjwXzpBADDvLLGBuQPpNvUpqrkVK52/AiE3kiLWcSRbPgELZFRAWK ayfaaLL/xc9plrNGcoOCuR3hVkZuq/+BlcsETWb6fpe64aMAtjavdeJ+uwXVa74OzI DvN3dhHClQ7HzxelYiFbMfvpwrh4I31et7FRZ6Eg= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2CEE860FE9; Mon, 13 May 2019 10:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742851; bh=tx4lpJiLY6uEc/yWnowsmX4GLmrZr+OIrz370A8ASUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BNgGssgFWVc/BaKNK48lFGC4JXMJmNmd1G6Ms1fcvnGs44PnbKKijIDXqVJ/bPLfX FPFHYpyW7gii50BEp6Rh44O1fC6jLgGKh2kMpPEWZQK+iOOmHOv00J1ATkE6dueAAy 0j7pr/ADfbR5PcyWLHD7a639R/58U4oiAn2hFvaM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2CEE860FE9 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 5/9] soc: qcom: rpmpd: Add QCS404 power-domains Date: Mon, 13 May 2019 15:50:11 +0530 Message-Id: <20190513102015.26551-6-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Andersson Add the shared cx/mx and the low-power-island's cx and mx power-domains found on QCS404. Signed-off-by: Bjorn Andersson [sibi: Fixup corner/vfc with vlfl/vfl] Signed-off-by: Sibi Sankar --- drivers/soc/qcom/rpmpd.c | 52 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index bac4499c269d..63db8b26642c 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -20,11 +20,16 @@ * RPMPD_X is X encoded as a little-endian, lower-case, ASCII string */ #define RPMPD_SMPA 0x61706d73 #define RPMPD_LDOA 0x616f646c +#define RPMPD_RWMX 0x786d7772 +#define RPMPD_RWLC 0x636c7772 +#define RPMPD_RWLM 0x6d6c7772 /* Operation Keys */ #define KEY_CORNER 0x6e726f63 /* corn */ #define KEY_ENABLE 0x6e657773 /* swen */ #define KEY_FLOOR_CORNER 0x636676 /* vfc */ +#define KEY_FLOOR_LEVEL 0x6c6676 /* vfl */ +#define KEY_LEVEL 0x6c766c76 /* vlvl */ #define MAX_8996_RPMPD_STATE 6 @@ -55,6 +60,14 @@ .key = KEY_CORNER, \ } +#define DEFINE_RPMPD_LEVEL(_platform, _name, r_type, r_id) \ + static struct rpmpd _platform##_##_name = { \ + .pd = { .name = #_name, }, \ + .res_type = RPMPD_##r_type, \ + .res_id = r_id, \ + .key = KEY_LEVEL, \ + } + #define DEFINE_RPMPD_VFC(_platform, _name, r_type, r_id) \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ @@ -63,6 +76,14 @@ .key = KEY_FLOOR_CORNER, \ } +#define DEFINE_RPMPD_VFL(_platform, _name, r_type, r_id) \ + static struct rpmpd _platform##_##_name = { \ + .pd = { .name = #_name, }, \ + .res_type = RPMPD_##r_type, \ + .res_id = r_id, \ + .key = KEY_FLOOR_LEVEL, \ + } + struct rpmpd_req { __le32 key; __le32 nbytes; @@ -115,8 +136,35 @@ static const struct rpmpd_desc msm8996_desc = { .max_state = MAX_8996_RPMPD_STATE, }; +/* qcs404 RPM Power domains */ +DEFINE_RPMPD_PAIR(qcs404, vddmx, vddmx_ao, RWMX, LEVEL, 0); +DEFINE_RPMPD_VFL(qcs404, vddmx_vfl, RWMX, 0); + +DEFINE_RPMPD_LEVEL(qcs404, vdd_lpicx, RWLC, 0); +DEFINE_RPMPD_VFL(qcs404, vdd_lpicx_vfl, RWLC, 0); + +DEFINE_RPMPD_LEVEL(qcs404, vdd_lpimx, RWLM, 0); +DEFINE_RPMPD_VFL(qcs404, vdd_lpimx_vfl, RWLM, 0); + +static struct rpmpd *qcs404_rpmpds[] = { + [QCS404_VDDMX] = &qcs404_vddmx, + [QCS404_VDDMX_AO] = &qcs404_vddmx_ao, + [QCS404_VDDMX_VFL] = &qcs404_vddmx_vfl, + [QCS404_LPICX] = &qcs404_vdd_lpicx, + [QCS404_LPICX_VFL] = &qcs404_vdd_lpicx_vfl, + [QCS404_LPIMX] = &qcs404_vdd_lpimx, + [QCS404_LPIMX_VFL] = &qcs404_vdd_lpimx_vfl, +}; + +static const struct rpmpd_desc qcs404_desc = { + .rpmpds = qcs404_rpmpds, + .num_pds = ARRAY_SIZE(qcs404_rpmpds), + .max_state = RPM_SMD_LEVEL_BINNING, +}; + static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc }, + { .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc }, { } }; @@ -231,7 +279,9 @@ static int rpmpd_set_performance(struct generic_pm_domain *domain, pd->corner = state; - if (!pd->enabled && pd->key != KEY_FLOOR_CORNER) + /* Always send updates for vfc and vfl */ + if (!pd->enabled && pd->key != KEY_FLOOR_CORNER && + pd->key != KEY_FLOOR_LEVEL) goto out; ret = rpmpd_aggregate_corner(pd); From patchwork Mon May 13 10:20:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0C4614DB for ; Mon, 13 May 2019 10:21:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A380C26D08 for ; Mon, 13 May 2019 10:21:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1C1626E79; Mon, 13 May 2019 10:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F74227E63 for ; Mon, 13 May 2019 10:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728998AbfEMKU6 (ORCPT ); Mon, 13 May 2019 06:20:58 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56938 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728995AbfEMKU4 (ORCPT ); Mon, 13 May 2019 06:20:56 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AEDF76115D; Mon, 13 May 2019 10:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742855; bh=UXI5aOJAovwTCn4b4Ku7WbQH/PEWiqh8TRq5o7PQsDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQjfCPD5YpoVHkSfRyKxS0pLgNGjxP3BZGIyN2Gm3TsMIWOr9ZQoMIQKdqLYWoXUf VOcgMSVbMRxpae6GDi1951BuTtrZV0/Rm+4jtsYgoieamhT5LQNBnNhEaXa6RfsvbG d3jbPYf+ldNXXg+uUN4EKsvLydTVUF29/DpUJzwk= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A8B2E6115D; Mon, 13 May 2019 10:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742854; bh=UXI5aOJAovwTCn4b4Ku7WbQH/PEWiqh8TRq5o7PQsDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rp0gszvNgmg+4CIBDXNkYoxwbOAvBbvpEN1Ylp3j68uDw8qMeyhcQiVKSM8oScgrB zVJcPjzPL8tRX37n9rA6VeVInWSFV7dnE41rnwSTOo1O78zZh+o91hKlk+Pz0macht vYbF+keG19Omz6XYYaKVaypMhwjt4yx1Q7Qd/Ts0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A8B2E6115D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 6/9] arm64: dts: qcom: qcs404: Add rpmpd node Date: Mon, 13 May 2019 15:50:12 +0530 Message-Id: <20190513102015.26551-7-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Andersson Add the rpmpd node on the qcs404 and define the available levels. Signed-off-by: Bjorn Andersson [sibis: fixup available levels] Signed-off-by: Sibi Sankar --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index ffedf9640af7..d1484480c237 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -4,6 +4,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -230,6 +231,60 @@ compatible = "qcom,rpmcc-qcs404"; #clock-cells = <1>; }; + + rpmpd: power-controller { + compatible = "qcom,qcs404-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs: opp5 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom: opp7 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; + + rpmpd_opp_turbo_no_cpr: opp10 { + opp-level = ; + }; + + rpmpd_opp_turbo_plus: opp11 { + opp-level = ; + }; + }; + }; }; }; From patchwork Mon May 13 10:20:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3AA2214DB for ; Mon, 13 May 2019 10:21:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D14827B13 for ; Mon, 13 May 2019 10:21:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B4D427EED; Mon, 13 May 2019 10:21:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5B9027B13 for ; Mon, 13 May 2019 10:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729013AbfEMKVA (ORCPT ); Mon, 13 May 2019 06:21:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57030 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728995AbfEMKVA (ORCPT ); Mon, 13 May 2019 06:21:00 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3C52061213; Mon, 13 May 2019 10:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742859; bh=pTxKfV7jnNhbs9G5OwbSExrYyay9CyzmkzVeVD+63gU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pg1ZmNckR2s1aT8dlG/91wAsaMvgOJUGLjirZuDQR/0k+1tUdmKyH5KZylJdMxaNu QxkiAk4oLBbqjiDSsted/JDvMv8thGqVMLgr1wIuHHa2g5eG4rP4KqQtDvpjDfFjok KNrcSs2gFqXfsEdNe0xAzBAxSUBubcJNFP5Alorw= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 27AA4611CF; Mon, 13 May 2019 10:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742858; bh=pTxKfV7jnNhbs9G5OwbSExrYyay9CyzmkzVeVD+63gU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dDDNsKgoUDKuhDDmM42TY2sLWiqaX435mMoOkd3zTf6rpOdA2GUa48CKQ8CN3obzT KR8UaTQjKZPWdA91tI01NXAuq8ngPGtLe/FT9+AIys8KmOuu7SWEW4hsCv/812Vfr/ r91C5ZnfZvTlMD7UPDcrLvMfCEf4gdvDqDckHcjU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 27AA4611CF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar , Rob Herring Subject: [PATCH v4 7/9] dt-bindings: power: Add rpm power domain bindings for msm8998 Date: Mon, 13 May 2019 15:50:13 +0530 Message-Id: <20190513102015.26551-8-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add RPM power domain bindings for the msm8998 family of SoC Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar --- .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + include/dt-bindings/power/qcom-rpmpd.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt index 172ccf940c5c..eb35b22f9e23 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt @@ -6,6 +6,7 @@ which then translates it into a corresponding voltage on a rail Required Properties: - compatible: Should be one of the following * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC + * qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC * qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC - #power-domain-cells: number of cells in Power domain specifier diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 450378662944..93e36d011527 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -36,6 +36,18 @@ #define MSM8996_VDDSSCX 5 #define MSM8996_VDDSSCX_VFC 6 +/* MSM8998 Power Domain Indexes */ +#define MSM8998_VDDCX 0 +#define MSM8998_VDDCX_AO 1 +#define MSM8998_VDDCX_VFL 2 +#define MSM8998_VDDMX 3 +#define MSM8998_VDDMX_AO 4 +#define MSM8998_VDDMX_VFL 5 +#define MSM8998_SSCCX 6 +#define MSM8998_SSCCX_VFL 7 +#define MSM8998_SSCMX 8 +#define MSM8998_SSCMX_VFL 9 + /* QCS404 Power Domains */ #define QCS404_VDDMX 0 #define QCS404_VDDMX_AO 1 From patchwork Mon May 13 10:20:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9018613AD for ; Mon, 13 May 2019 10:21:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8378027D0C for ; Mon, 13 May 2019 10:21:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77ADE27C2D; Mon, 13 May 2019 10:21:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1803727F2B for ; Mon, 13 May 2019 10:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728995AbfEMKVE (ORCPT ); Mon, 13 May 2019 06:21:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57112 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbfEMKVD (ORCPT ); Mon, 13 May 2019 06:21:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A23AE6133A; Mon, 13 May 2019 10:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742862; bh=j17qIR3BojET2TpDawz2tsLoDZdsKT4XbQ6tUloMJ4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=czCUEBmALbJx7v1ridcI8moS0kY5nJ/evnEU/JTbgaiZf7WhCvv+HcZK1Qn+TL86M 3XI4RISkAZMsQl3ulamLyMJkHbXF+ySQuAX3IA5yeoDLSugp2y1wNlWRvfYMTKcuha ebPpUb1Rjs0CUGoN59yPttL1OSJY1PA9LicWi0Aw= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DB7F1611DC; Mon, 13 May 2019 10:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742861; bh=j17qIR3BojET2TpDawz2tsLoDZdsKT4XbQ6tUloMJ4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CZEHlaYb6n0BvjrboXmtxmjRHV5Kr4fLaTgZv8fyixXKJ2wfYu4mfag4AG0P8V9O8 460OvJBzqiqzT9Mn9WYXNWdHcw/28yBlN+H++KiV0+W7DNazsstthJuEIaS+jjomMe XrOqEzrsgbdtqpj2nJ+sT5ApTl8wAkoFtBwVxbPg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DB7F1611DC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 8/9] soc: qcom: rpmpd: Add MSM8998 power-domains Date: Mon, 13 May 2019 15:50:14 +0530 Message-Id: <20190513102015.26551-9-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the shared cx/mx and sensor sub-system's cx and mx power-domains found on MSM8998. Signed-off-by: Sibi Sankar --- drivers/soc/qcom/rpmpd.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 63db8b26642c..3c1a55cf25d6 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -20,9 +20,12 @@ * RPMPD_X is X encoded as a little-endian, lower-case, ASCII string */ #define RPMPD_SMPA 0x61706d73 #define RPMPD_LDOA 0x616f646c +#define RPMPD_RWCX 0x78637772 #define RPMPD_RWMX 0x786d7772 #define RPMPD_RWLC 0x636c7772 #define RPMPD_RWLM 0x6d6c7772 +#define RPMPD_RWSC 0x63737772 +#define RPMPD_RWSM 0x6d737772 /* Operation Keys */ #define KEY_CORNER 0x6e726f63 /* corn */ @@ -136,6 +139,38 @@ static const struct rpmpd_desc msm8996_desc = { .max_state = MAX_8996_RPMPD_STATE, }; +/* msm8998 RPM Power domains */ +DEFINE_RPMPD_PAIR(msm8998, vddcx, vddcx_ao, RWCX, LEVEL, 0); +DEFINE_RPMPD_VFL(msm8998, vddcx_vfl, RWCX, 0); + +DEFINE_RPMPD_PAIR(msm8998, vddmx, vddmx_ao, RWMX, LEVEL, 0); +DEFINE_RPMPD_VFL(msm8998, vddmx_vfl, RWMX, 0); + +DEFINE_RPMPD_LEVEL(msm8998, vdd_ssccx, RWSC, 0); +DEFINE_RPMPD_VFL(msm8998, vdd_ssccx_vfl, RWSC, 0); + +DEFINE_RPMPD_LEVEL(msm8998, vdd_sscmx, RWSM, 0); +DEFINE_RPMPD_VFL(msm8998, vdd_sscmx_vfl, RWSM, 0); + +static struct rpmpd *msm8998_rpmpds[] = { + [MSM8998_VDDCX] = &msm8998_vddcx, + [MSM8998_VDDCX_AO] = &msm8998_vddcx_ao, + [MSM8998_VDDCX_VFL] = &msm8998_vddcx_vfl, + [MSM8998_VDDMX] = &msm8998_vddmx, + [MSM8998_VDDMX_AO] = &msm8998_vddmx_ao, + [MSM8998_VDDMX_VFL] = &msm8998_vddmx_vfl, + [MSM8998_SSCCX] = &msm8998_vdd_ssccx, + [MSM8998_SSCCX_VFL] = &msm8998_vdd_ssccx_vfl, + [MSM8998_SSCMX] = &msm8998_vdd_sscmx, + [MSM8998_SSCMX_VFL] = &msm8998_vdd_sscmx_vfl, +}; + +static const struct rpmpd_desc msm8998_desc = { + .rpmpds = msm8998_rpmpds, + .num_pds = ARRAY_SIZE(msm8998_rpmpds), + .max_state = RPM_SMD_LEVEL_BINNING, +}; + /* qcs404 RPM Power domains */ DEFINE_RPMPD_PAIR(qcs404, vddmx, vddmx_ao, RWMX, LEVEL, 0); DEFINE_RPMPD_VFL(qcs404, vddmx_vfl, RWMX, 0); @@ -164,6 +199,7 @@ static const struct rpmpd_desc qcs404_desc = { static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc }, + { .compatible = "qcom,msm8998-rpmpd", .data = &msm8998_desc }, { .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc }, { } }; From patchwork Mon May 13 10:20:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10940651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0CAC14DB for ; Mon, 13 May 2019 10:21:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 930CA26D05 for ; Mon, 13 May 2019 10:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8719F27F60; Mon, 13 May 2019 10:21:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D5A627D16 for ; Mon, 13 May 2019 10:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729037AbfEMKVI (ORCPT ); Mon, 13 May 2019 06:21:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57216 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbfEMKVI (ORCPT ); Mon, 13 May 2019 06:21:08 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C529F6029B; Mon, 13 May 2019 10:21:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742867; bh=o27eDQs8Ek4ezMIN7MbMFSjgb8ArAV7kG2SwqCvtZdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWnAias+J9AckEoCMLevKws76NYrDXBBLj8I8PGjCUEQuoLrYsbqZlIVIgdwr7dE1 2XyLTTeLBuDhXtkrm8PrvpKUzszgbLUSqv7BDGrZt/+gxYcaN+kx1PvN+1IN6FszaM GBXWLXAGDcSmJfyJUY93kEk5jdytBx4RCBglyN9M= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5966C609F3; Mon, 13 May 2019 10:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557742865; bh=o27eDQs8Ek4ezMIN7MbMFSjgb8ArAV7kG2SwqCvtZdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PfTxizg/kMBTrp0EV71oXX3pM20MBjQ3xDij46m8IqP93Dh8tGVh0kqdTdLyL8XX3 0ykzSWXuCEXU9uqEQtHcf3axo54NLz06R2s7TFfBW4xZb/P1cPu2id6jV7mUKrzq3Q A+s62N4FmJbKMt5Bb4wskVuSMVIeA9aulAcmohdI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5966C609F3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: david.brown@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, rnayak@codeaurora.org, marc.w.gonzalez@free.fr, Sibi Sankar Subject: [PATCH v4 9/9] arm64: dts: qcom: msm8998: Add rpmpd node Date: Mon, 13 May 2019 15:50:15 +0530 Message-Id: <20190513102015.26551-10-sibis@codeaurora.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190513102015.26551-1-sibis@codeaurora.org> References: <20190513102015.26551-1-sibis@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the rpmpd node on the msm8998 and define the available levels. Signed-off-by: Sibi Sankar --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 574be78a936e..aa501221ca4d 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -4,6 +4,7 @@ #include #include #include +#include #include / { @@ -264,6 +265,56 @@ compatible = "qcom,rpmcc-msm8998", "qcom,rpmcc"; #clock-cells = <1>; }; + + rpmpd: power-controller { + compatible = "qcom,msm8998-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs: opp5 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom: opp7 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; + + rpmpd_opp_turbo_plus: opp10 { + opp-level = ; + }; + }; + }; }; };