From patchwork Mon Nov 8 13:44:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 12608421 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1E54C433EF for ; Mon, 8 Nov 2021 13:45:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C196611C0 for ; Mon, 8 Nov 2021 13:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240059AbhKHNro (ORCPT ); Mon, 8 Nov 2021 08:47:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240063AbhKHNrm (ORCPT ); Mon, 8 Nov 2021 08:47:42 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F418C061766 for ; Mon, 8 Nov 2021 05:44:58 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so8812271pjc.4 for ; Mon, 08 Nov 2021 05:44:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H7m5p97BKE1ln9x8mMCJwq7P//I9O+wuU0Z+Nt2052Y=; b=P+Utp/dlqKEWj6LUw9H9YhiIfaKS72hoEaHw6MpLEqMUryo4lbSa/EH6J0o0iegScV cdYm2qLfUKciJFZnblzm5/ZpoXAZeaoML+UBYTfSa33+YzfsDrLGOBa0iMW6mWoKTaQh C3TfeMkME+OA749VGpq+6dtLlhEO088MoXK8+v37H3tAV3WsNdnxltM7ZFeO2rPCzvrF Rsci752T7LTOztbaJ9a+PzAriqlW0MMWKvm3cH5Xx44p2uOaD/twNlM9UWDj+FdbSXqU YZPk7kN8HW+ds0EMjvaTdPDfwobr4MjYYditYbTdRdAsRTTnnADdSnmN2MR8duf50utd Ck7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H7m5p97BKE1ln9x8mMCJwq7P//I9O+wuU0Z+Nt2052Y=; b=50EMqtd3BEp690s4oyXrRdiwnVej7ruwhgI4p5rKJgA1EJug5tOJqM6BDBHEzBU1Gb ncH6kcY9DWrvh6CidoyIAFy5v/w3CgRYy6lUgYmLtrNHaFmwnSwi+KlBGWs7Fu77eUra JrwlffyFj14BOuc6RoQ2KqjRYAKmJs2IyX18JBzYRFGMv3am4sMwMlU4jYgt00AUeSQq tJmgozTv/xMJJAp2XP7xC+UMN8FKTdjXxLUGAoPnL4IdBW2eKDuEnSTJa0qsjOqrn6GI qUiek55b5MmIqsmcYCFtelg4d+XnImJJMPnViP4tUi6V/ST24gm/vVzhxi1SbaMJ5Mv5 WwEQ== X-Gm-Message-State: AOAM531UTe2DGWCLoucM8XJTAW1sftYKvEHENi50TVeI+4PxLq2yh7ja 0KGAjN1psN+UpK44RDZi1jTq1g== X-Google-Smtp-Source: ABdhPJxP7jW2gLwiv9Q8PBw5mnZz3NE2z/LeHukHwHW64eCdd5J2Zd7+qzRP1C1lvWKdCUfie1FVag== X-Received: by 2002:a17:90a:ab17:: with SMTP id m23mr5745396pjq.194.1636379097787; Mon, 08 Nov 2021 05:44:57 -0800 (PST) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id m184sm3693974pga.61.2021.11.08.05.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 05:44:57 -0800 (PST) From: Shawn Guo To: Bjorn Andersson Cc: Rob Herring , Rajendra Nayak , Loic Poulain , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo Subject: [PATCH 1/3] soc: qcom: rpmpd: Drop unused res_name from struct rpmpd Date: Mon, 8 Nov 2021 21:44:40 +0800 Message-Id: <20211108134442.30051-2-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108134442.30051-1-shawn.guo@linaro.org> References: <20211108134442.30051-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The res_name field in struct rpmpd is unused. Drop it. Signed-off-by: Shawn Guo --- drivers/soc/qcom/rpmpd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 4f69fb9b2e0e..3e7905854eb9 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -102,7 +102,6 @@ struct rpmpd { const bool active_only; unsigned int corner; bool enabled; - const char *res_name; const int res_type; const int res_id; struct qcom_smd_rpm *rpm; From patchwork Mon Nov 8 13:44:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 12608423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 783D9C433F5 for ; Mon, 8 Nov 2021 13:45:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AA486115A for ; Mon, 8 Nov 2021 13:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240080AbhKHNrr (ORCPT ); Mon, 8 Nov 2021 08:47:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240073AbhKHNrp (ORCPT ); Mon, 8 Nov 2021 08:47:45 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5591AC061764 for ; Mon, 8 Nov 2021 05:45:01 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so8836949pjl.2 for ; Mon, 08 Nov 2021 05:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4UOv0Q9v/U5JIJTiKm8SH11m1yqDdnBMvjTxmZVLkw4=; b=ylHyHX+UGT5QsNVlzYmEnT7hIPcEeUVCV2qQBNbqyyvOJ/gEGeztQ/qNlhubkEBV1g HlF+FDI+WsumTjwtFNj6+0/ahYTechXYI0sTWXIOjy2B4cBRc2MU9wZgpOxHFiG5fp/7 YOkaAeXRFBUjVoYVANNXKudsg2MXUUGZAZ6JILRianhXhCTBJ2OtjXrs3VEb1CE9XR0p vK4K/vS6g7/2f20lgn7JMbSFZRtwipGLQqbCrB+NOqKwNdzRcUChFN3xuDpCK0vU4aYi anJQaAzTm29UCS/tnM3a/5YRbfOi4YPUW4sAysImqfsKkXxv7CN/CMHp72AwxrwbBxCO VCYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4UOv0Q9v/U5JIJTiKm8SH11m1yqDdnBMvjTxmZVLkw4=; b=SIYx+ydGNIxYtLuhWtjhh2voClQj2N0Km+aJNLOegV3GX+FSGd42K+lfFQRTQMSeCa TxeLqmtcG7xb1zmGzmmSc7XzL0xjn9Q5ehWlpAQ5uGjTlHjYVbzNGt+IHg8blL7vEoUu pOLGZEueZPJiNrTKSE/oBGjHwt5p4Ywzd9RrFaS6n55Tvk11j0dne+F+7I2kqy9tlnro 9OmBkc4BdGUQFA1PL00b3Td8y6AJvEsfukIqxRdOhmjxIae3q/trqcXhzhsFVY+MBhAg 21LRdm1eU42rQdqvwU1qIe9ivwfSkl0m2nGGZcHklYth+TVhFtLIzD3Ghu2VuNadNC/E iuXA== X-Gm-Message-State: AOAM530T/O8D2DHoxzr9osMHD+B5KZuWE9Z2RTG66+FLVbdq7ipMt8HS lJlds9evzXvAeb781rhmYJdHow== X-Google-Smtp-Source: ABdhPJzS2GYQkG5XZPpFKujvNeCeo3QPrZplZEKknzw4IS0aNed8TR75djH/ucDFk2HovG0q1OwxiA== X-Received: by 2002:a17:90a:4a06:: with SMTP id e6mr52879333pjh.228.1636379100914; Mon, 08 Nov 2021 05:45:00 -0800 (PST) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id m184sm3693974pga.61.2021.11.08.05.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 05:45:00 -0800 (PST) From: Shawn Guo To: Bjorn Andersson Cc: Rob Herring , Rajendra Nayak , Loic Poulain , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo Subject: [PATCH 2/3] dt-bindings: power: rpmpd: Add QCM2290 support Date: Mon, 8 Nov 2021 21:44:41 +0800 Message-Id: <20211108134442.30051-3-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108134442.30051-1-shawn.guo@linaro.org> References: <20211108134442.30051-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatible and constants for the power domains exposed by the QCM2290 RPM. Signed-off-by: Shawn Guo --- .../devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml index e810480e3eb7..a6d51d51d2c7 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml @@ -24,6 +24,7 @@ properties: - qcom,msm8994-rpmpd - qcom,msm8996-rpmpd - qcom,msm8998-rpmpd + - qcom,qcm2290-rpmpd - qcom,qcs404-rpmpd - qcom,sdm660-rpmpd - qcom,sc7180-rpmhpd diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 960f7976a807..340b0ffe5eb8 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -219,6 +219,16 @@ #define SM6115_VDD_LPI_CX 6 #define SM6115_VDD_LPI_MX 7 +/* QCM2290 Power Domains */ +#define QCM2290_VDDCX 0 +#define QCM2290_VDDCX_AO 1 +#define QCM2290_VDDCX_VFL 2 +#define QCM2290_VDDMX 3 +#define QCM2290_VDDMX_AO 4 +#define QCM2290_VDDMX_VFL 5 +#define QCM2290_VDD_LPI_CX 6 +#define QCM2290_VDD_LPI_MX 7 + /* RPM SMD Power Domain performance levels */ #define RPM_SMD_LEVEL_RETENTION 16 #define RPM_SMD_LEVEL_RETENTION_PLUS 32 From patchwork Mon Nov 8 13:44:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 12608425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C31FC433EF for ; Mon, 8 Nov 2021 13:45:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45596611C0 for ; Mon, 8 Nov 2021 13:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240062AbhKHNrt (ORCPT ); Mon, 8 Nov 2021 08:47:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240082AbhKHNrs (ORCPT ); Mon, 8 Nov 2021 08:47:48 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D92EC061714 for ; Mon, 8 Nov 2021 05:45:04 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id b13so15864837plg.2 for ; Mon, 08 Nov 2021 05:45:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2SsoXlIEyA7M7oMepGUCAXbufcXq3sSqZoUCUyAHvCU=; b=Rh/WDrUBEdWGDRXKQdDay5CItIX8kUAL6HHZo+Hww1b90kKjzsmnbBn76HYmrpHWdB sTmCcBcsq0tOjjuXma4yCbzBK+JqFFi/kflvJ71ZFEsWf/RRN0WKrsyjzQxPZI2agQ41 xnt2De17E5PDNaAHT+M+rAeqd1ZQZ/lr0LDB8eLJ39p35sWpDZW2hM5Bfi28vzcesfuL J3KKVqkhJd258VIX4cRJQoRDT5c1rN7OSev/PnHfGI/nFhuNeq5j2arRajVOUpj+KNq9 xwcH2edrXgALRMnjGlTHbqHPz5iKpEd5mCUjLYWMPLqnn7ZJLduC28Ia9R9pKh+EvgQW gYcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2SsoXlIEyA7M7oMepGUCAXbufcXq3sSqZoUCUyAHvCU=; b=O7Fh+C3HMJ+/xIG0CC+orwQ3H61A+UGFqQ+ZGsBpILUN2EkWkDjbywosLD2xT1rAwK i6q5eOhHx4ChLS8JkejcPrTdMn1GAngV265vjJ3ySrkCbhWELzm7K9b46l52v5W7/1HZ LVC+bbCw++NSPC+chLWkSb7A69KM0GMtSKB4EBIRZU5cFTtgIEknbzKbkdDIW9Yoqs3V gQ/qymiVduL2YkMPo34jrUHaG6jnu9zWnulooRolB87+vJ298R3GfYkaV0TxgnkY+23V TV3mkSamnpfqRnyklSUewtpyxFUxIBy689ghTz2lYVKa/mpmsJA/pcFtkmW+Y4akep9+ Epxg== X-Gm-Message-State: AOAM531rOlUauGWfNGhB+k+2K3r2IdzquMp+DR5KaKL7SKIEYr5gbIOI a4NH19pD0941xfqFM5D624DCxw== X-Google-Smtp-Source: ABdhPJzJ13KWDy70wNVqIrlae8ZGm1C9RGa6I9/T0uTLRxiD6Fvr7g3RJZ2By3Zvj3XwBsK3VgvibQ== X-Received: by 2002:a17:90a:db89:: with SMTP id h9mr51675447pjv.71.1636379103605; Mon, 08 Nov 2021 05:45:03 -0800 (PST) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id m184sm3693974pga.61.2021.11.08.05.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 05:45:03 -0800 (PST) From: Shawn Guo To: Bjorn Andersson Cc: Rob Herring , Rajendra Nayak , Loic Poulain , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo Subject: [PATCH 3/3] soc: qcom: rpmpd: Add QCM2290 support Date: Mon, 8 Nov 2021 21:44:42 +0800 Message-Id: <20211108134442.30051-4-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108134442.30051-1-shawn.guo@linaro.org> References: <20211108134442.30051-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org QCM2290 has the same RPM power domains as SM6115. Add QCM2290 support by reusing SM6115 power domains. Signed-off-by: Shawn Guo --- drivers/soc/qcom/rpmpd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 3e7905854eb9..36b2381039e6 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -395,6 +395,23 @@ static const struct rpmpd_desc sm6115_desc = { .max_state = RPM_SMD_LEVEL_TURBO_NO_CPR, }; +static struct rpmpd *qcm2290_rpmpds[] = { + [QCM2290_VDDCX] = &sm6115_vddcx, + [QCM2290_VDDCX_AO] = &sm6115_vddcx_ao, + [QCM2290_VDDCX_VFL] = &sm6115_vddcx_vfl, + [QCM2290_VDDMX] = &sm6115_vddmx, + [QCM2290_VDDMX_AO] = &sm6115_vddmx_ao, + [QCM2290_VDDMX_VFL] = &sm6115_vddmx_vfl, + [QCM2290_VDD_LPI_CX] = &sm6115_vdd_lpi_cx, + [QCM2290_VDD_LPI_MX] = &sm6115_vdd_lpi_mx, +}; + +static const struct rpmpd_desc qcm2290_desc = { + .rpmpds = qcm2290_rpmpds, + .num_pds = ARRAY_SIZE(qcm2290_rpmpds), + .max_state = RPM_SMD_LEVEL_TURBO_NO_CPR, +}; + static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,mdm9607-rpmpd", .data = &mdm9607_desc }, { .compatible = "qcom,msm8916-rpmpd", .data = &msm8916_desc }, @@ -404,6 +421,7 @@ static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8994-rpmpd", .data = &msm8994_desc }, { .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc }, { .compatible = "qcom,msm8998-rpmpd", .data = &msm8998_desc }, + { .compatible = "qcom,qcm2290-rpmpd", .data = &qcm2290_desc }, { .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc }, { .compatible = "qcom,sdm660-rpmpd", .data = &sdm660_desc }, { .compatible = "qcom,sm6115-rpmpd", .data = &sm6115_desc },