From patchwork Wed Feb 10 10:42:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 12080475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B407AC433DB for ; Wed, 10 Feb 2021 10:46:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6DA2164E38 for ; Wed, 10 Feb 2021 10:46:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231492AbhBJKpy (ORCPT ); Wed, 10 Feb 2021 05:45:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:50266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230383AbhBJKnr (ORCPT ); Wed, 10 Feb 2021 05:43:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 885AD64DD8; Wed, 10 Feb 2021 10:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612953786; bh=OnrZfrz9rG2bg2Ab96WdtAn8mZsRQT+9aUasK8Gxirc=; h=From:To:Cc:Subject:Date:From; b=ELrCAgjbH+Hqf6oKg9xt4Pynh3SBsRfQVRR7ohCGwEi7wBKBrgcYJZgsIJbrQl1Ql y0hqDVJ9bk37e1Seb6TQ0ZLIJWxycnBOrMm8tEhvBVK+Pu5SmRao8qonxmWgKSa7xn eOdz4W2dt6StFDQ03pLxc/D+qthHH+4Q/42xnE5/3yqQPBXseFWUDMlN7duMDcSQRc R00ksTtV2aFAz96kqzGpgFUG3ZfEhk/lBOzWuhfrFcoIfN14xP2EAb6yi1S2w5ajoq l8K3mH/ZaaIpL+swv5d0UcW4/+jgK6MSciOcD/mhsMTDluK9SerCuHVjN3gB59V7bE IMbIcxB6NXnEg== From: Vinod Koul To: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Vinod Koul , Andy Gross , Rob Herring , Rajendra Nayak , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: power: Add rpm power domain bindings for SM8350 Date: Wed, 10 Feb 2021 16:12:56 +0530 Message-Id: <20210210104257.339462-1-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add RPM power domain bindings for the SM8350 SoC Signed-off-by: Vinod Koul Acked-by: Rob Herring --- Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml index 64825128ee97..a71024c24295 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml @@ -28,6 +28,7 @@ properties: - qcom,sdx55-rpmhpd - qcom,sm8150-rpmhpd - qcom,sm8250-rpmhpd + - qcom,sm8350-rpmhpd '#power-domain-cells': const: 1 From patchwork Wed Feb 10 10:42:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 12080477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 374C8C433E9 for ; Wed, 10 Feb 2021 10:46:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E841664E38 for ; Wed, 10 Feb 2021 10:46:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbhBJKp6 (ORCPT ); Wed, 10 Feb 2021 05:45:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:50306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbhBJKnv (ORCPT ); Wed, 10 Feb 2021 05:43:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5222564E32; Wed, 10 Feb 2021 10:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612953790; bh=FbKU4ZoekI9wkLHZIUxTbtVl86xog9jbzjfLhHehSHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nmeo9baHDp31ABsxdSlQRXa311U+wxocGjYhJUoQ1M/15jN27P2QwUDEqWpWzo+lk kt1xRb8KG6fy/g7/j88Hyp+nzK4kmDSOJfrieZvH2xPYP74+XflaRojptvRAWcBQVZ uAUERNTS1ANWQ347SeRhy/JlJkblIiPKr8a2n90iZTyBDLEs3pdFuiVMO2QeTz/B54 lo5PTQxkjYxyUo5XNyAnpGsJdpC4/hZ/i8/cO08vABohcCW/DWucSHAwXPa7E+TtiZ xL4JrIJM1bVKQ3Sm9m9sDrImmhGqaxkszS2qMvP2Ul4YTX2FF1CuJGbCjZut8HAwWw haXmEBw9wCwZA== From: Vinod Koul To: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Vinod Koul , Andy Gross , Rob Herring , Rajendra Nayak , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] soc: qcom: rpmhpd: Add SM8350 power domains Date: Wed, 10 Feb 2021 16:12:57 +0530 Message-Id: <20210210104257.339462-2-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210104257.339462-1-vkoul@kernel.org> References: <20210210104257.339462-1-vkoul@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This adds the power domains found in SM8350 SoC. Signed-off-by: Vinod Koul --- drivers/soc/qcom/rpmhpd.c | 37 ++++++++++++++++++++++++++ include/dt-bindings/power/qcom-rpmpd.h | 15 +++++++++++ 2 files changed, 52 insertions(+) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 7ce06356d24c..1bd191d5824f 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -200,6 +200,42 @@ static const struct rpmhpd_desc sm8250_desc = { .num_pds = ARRAY_SIZE(sm8250_rpmhpds), }; +/* SM8350 Power domains */ +static struct rpmhpd sm8350_mxc_ao; +static struct rpmhpd sm8350_mxc = { + .pd = { .name = "mxc", }, + .peer = &sm8150_mmcx_ao, + .res_name = "mxc.lvl", +}; + +static struct rpmhpd sm8350_mxc_ao = { + .pd = { .name = "mxc_ao", }, + .active_only = true, + .peer = &sm8350_mxc, + .res_name = "mxc.lvl", +}; + +static struct rpmhpd *sm8350_rpmhpds[] = { + [SM8350_CX] = &sdm845_cx, + [SM8350_CX_AO] = &sdm845_cx_ao, + [SM8350_EBI] = &sdm845_ebi, + [SM8350_GFX] = &sdm845_gfx, + [SM8350_LCX] = &sdm845_lcx, + [SM8350_LMX] = &sdm845_lmx, + [SM8350_MMCX] = &sm8150_mmcx, + [SM8350_MMCX_AO] = &sm8150_mmcx_ao, + [SM8350_MX] = &sdm845_mx, + [SM8350_MX_AO] = &sdm845_mx_ao, + [SM8350_MXC] = &sm8350_mxc, + [SM8350_MXC_AO] = &sm8350_mxc_ao, + [SM8350_MSS] = &sdm845_mss, +}; + +static const struct rpmhpd_desc sm8350_desc = { + .rpmhpds = sm8350_rpmhpds, + .num_pds = ARRAY_SIZE(sm8350_rpmhpds), +}; + /* SC7180 RPMH powerdomains */ static struct rpmhpd *sc7180_rpmhpds[] = { [SC7180_CX] = &sdm845_cx, @@ -223,6 +259,7 @@ static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc}, { .compatible = "qcom,sm8150-rpmhpd", .data = &sm8150_desc }, { .compatible = "qcom,sm8250-rpmhpd", .data = &sm8250_desc }, + { .compatible = "qcom,sm8350-rpmhpd", .data = &sm8350_desc }, { } }; MODULE_DEVICE_TABLE(of, rpmhpd_match_table); diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 7714487ac76b..64043a2a4411 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -45,6 +45,21 @@ #define SM8250_MX 8 #define SM8250_MX_AO 9 +/* SM8350 Power Domain Indexes */ +#define SM8350_CX 0 +#define SM8350_CX_AO 1 +#define SM8350_EBI 2 +#define SM8350_GFX 3 +#define SM8350_LCX 4 +#define SM8350_LMX 5 +#define SM8350_MMCX 6 +#define SM8350_MMCX_AO 7 +#define SM8350_MX 8 +#define SM8350_MX_AO 9 +#define SM8350_MXC 10 +#define SM8350_MXC_AO 11 +#define SM8350_MSS 12 + /* SC7180 Power Domain Indexes */ #define SC7180_CX 0 #define SC7180_CX_AO 1