From patchwork Sun Jun 27 18:59:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 12346991 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 80C37C49EAB for ; Sun, 27 Jun 2021 18:59:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EF76619BF for ; Sun, 27 Jun 2021 18:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbhF0TCA (ORCPT ); Sun, 27 Jun 2021 15:02:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231452AbhF0TB7 (ORCPT ); Sun, 27 Jun 2021 15:01:59 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B78EBC061574; Sun, 27 Jun 2021 11:59:33 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id o22so8823296wms.0; Sun, 27 Jun 2021 11:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=omZcbiTtS7++12UxYx04btGCoOY7nF1lh3E7O94QvfU=; b=VP3DckOxspIHZL/sCXR/N9vdouz3PhLabP7XEP+7zgGRslLRfNrSwsyRJNY+rhSGTw 2EYyH/ENNrSA6LDIC6fgYNfZZjx8T8gMdizkbndDDKYEfsNZ6YlYUKzl7I6rfVqoMZDx sed7WDoli/2JsZ9YhTQMcdKdxi0UHAxJenxEi0vMod/hGS/pqrPbbBe6zD+okhaT8/pu gg6aBW4oDi8yNTaQorG1M7rJSCO7wNqWs2bVZydeqEb5odUwwK7ZfQmz44ZUVNKHooAq homWQTpO+knnbF5vc2G2iHkJ347Uplo6vponZMVWhYUjwNvJxm6Ovugo4wkXd1+vpqGl c/7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=omZcbiTtS7++12UxYx04btGCoOY7nF1lh3E7O94QvfU=; b=drEV1n+gSgewt4NZ0OqYKdRSOkgyFfsg6omlF2X+rSHe2eBQxdD1MQzPqWSSmsl9N+ daTPuYdRXCpAoLxde0OZ33NxyzsiTvhX7e7R/ojbIM+HWRm4QzksP+dAs/DtZhn4vCKf VR+ogjAFU3ZDR5oe8SC6sP+ws137Ztkjkr2AXfw09EzkO+XSz3XpOGbTCvuZx/BWbK54 s/j8rfEi2xCDOz/hKhD1NA+Bj+4RKFvvBEr8SC3r1L31+fSdWp5sC/c6NQfjLRJaYeuS eG24owzPMDdFK/OIMeUQu9XLzeUoIgJrlJkyqrvfJBo9NEwiwuZule1XvKftc8yspCCN sQdA== X-Gm-Message-State: AOAM533twd6wQrB5GnG/7IoCBlaxaxSF9GTjedyhTMaGCiaE2QUlX7/z DqZqKRaKTJe+m2gqo0DFW8U= X-Google-Smtp-Source: ABdhPJxXXl4dOfvh+m79ItXG5ad+C0kcCOmvKN7BAlgeC1OZdlB6Qb7gc3z1Z+vHX8pv7jZr9HkEow== X-Received: by 2002:a1c:e90d:: with SMTP id q13mr22035588wmc.163.1624820372452; Sun, 27 Jun 2021 11:59:32 -0700 (PDT) Received: from localhost (178-169-161-196.razgrad.ddns.bulsat.com. [178.169.161.196]) by smtp.gmail.com with ESMTPSA id m6sm14516140wrw.9.2021.06.27.11.59.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 11:59:32 -0700 (PDT) From: Iskren Chernev To: Bjorn Andersson Cc: Andy Gross , Kathiravan T , Michael Turquette , Rajendra Nayak , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev Subject: [PATCH v2 1/5] dt-bindings: soc: qcom: smd-rpm: Add SM6115 compatible Date: Sun, 27 Jun 2021 21:59:23 +0300 Message-Id: <20210627185927.695411-2-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627185927.695411-1-iskren.chernev@gmail.com> References: <20210627185927.695411-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the dt-binding for the rpm on the Qualcomm SM4250/6115 SoC platform. Signed-off-by: Iskren Chernev Acked-by: Rob Herring --- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml index d511f01fcac6..cc3fe5ed7421 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml @@ -39,6 +39,7 @@ properties: - qcom,rpm-msm8996 - qcom,rpm-msm8998 - qcom,rpm-sdm660 + - qcom,rpm-sm6115 - qcom,rpm-sm6125 - qcom,rpm-qcs404 From patchwork Sun Jun 27 18:59:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 12346993 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 5021BC49EB9 for ; Sun, 27 Jun 2021 18:59:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 33375619BF for ; Sun, 27 Jun 2021 18:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbhF0TCC (ORCPT ); Sun, 27 Jun 2021 15:02:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231585AbhF0TCA (ORCPT ); Sun, 27 Jun 2021 15:02:00 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9491C0617A6; Sun, 27 Jun 2021 11:59:35 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id g7so13293117wri.7; Sun, 27 Jun 2021 11:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JOv6qHae3oCbikVuTJPrpoMGFW5lMce2DcFuNYr9Ow4=; b=NFVQvFqkzRXZrGCzMc2mS/AhEsgDUKiapWTHEfLTvenHavVKeK0FAbYTbdrtUCEax6 Yw/N6ALJQjroAVv3WxGSW7qpqlmZT+50U8+zVnUaLwyWNWQajtMHK1qdyQcn8WCoY67B dPDj+p1q2Tssv0FYgbYt8N6pqbDyvO30VXh1oiBVFjiFc6W9KSYM/bKo/JAw0DGVFE3T inoTK6HuiviMuVCZq9BjpZRRM2ZWkI/XkpdY5SCoHNc1tJaUV7dXTbgOxcdG/HTr8A66 NTt2xzUwYinhe15qgtRV6/DvpxGtjDAYWRPNFATmGR+bgrFDdWWJwgCMw9GxpXvW2GJr rVqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JOv6qHae3oCbikVuTJPrpoMGFW5lMce2DcFuNYr9Ow4=; b=tAvv9zuxjTNKPUZGfVWMejltt9kpOhSkZLB2AZejRxyfu/RZfU2ZkVbNWRGxsGYz9r 71C3bRQoFMmANQE9oJIC1ivRiXWdu3x8OzCz2C3iUpqLpr508OSw0FRJTN2ZhCiqL1C3 dbOiSR/ZlVGgZcxol1cxxRkwDFOedyNYrLoAvDaOIIzUZKEODcZMsX+Ncs5ZjQ2U5bm/ Y1c/XD545hBTq0vtGf1fkPlbrBlq9RPRcIYurY6EnjxHy8G/ulgijePZfYSGg0OY6r9m +WxEeL2RMQp4BEqe0EWOx8CIts87YCw+jJR82jatMPzFXfLkSTgNEaU9GOhQbYRT/t1d APIA== X-Gm-Message-State: AOAM532XKo17V7yFNsOliv5zBX0LisuTdAZJPx53ca8GIHeasVoPssiM ujnLvakAKHDnpMeNcqzZeD8= X-Google-Smtp-Source: ABdhPJy3J7L9359qrxAouC5deHjkvZM6r2fxmkHbA7rRDa7E3nijmspRTk+tpPSft4iPg3zIP64+Uw== X-Received: by 2002:a05:6000:154c:: with SMTP id 12mr23742736wry.97.1624820374386; Sun, 27 Jun 2021 11:59:34 -0700 (PDT) Received: from localhost (178-169-161-196.razgrad.ddns.bulsat.com. [178.169.161.196]) by smtp.gmail.com with ESMTPSA id x1sm11242838wmc.31.2021.06.27.11.59.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 11:59:34 -0700 (PDT) From: Iskren Chernev To: Bjorn Andersson Cc: Andy Gross , Kathiravan T , Michael Turquette , Rajendra Nayak , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev Subject: [PATCH v2 2/5] dt-bindings: clock: qcom: rpmcc: Document SM6115 compatible Date: Sun, 27 Jun 2021 21:59:24 +0300 Message-Id: <20210627185927.695411-3-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627185927.695411-1-iskren.chernev@gmail.com> References: <20210627185927.695411-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the dt-binding for the RPM Clock Controller on the SM4250/6115 SoCs. Signed-off-by: Iskren Chernev Acked-by: Rob Herring --- Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 1 + include/dt-bindings/clock/qcom,rpmcc.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt index 6cf5a7ec2b4c..0045583f02b5 100644 --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt @@ -25,6 +25,7 @@ Required properties : "qcom,rpmcc-msm8998", "qcom,rpmcc" "qcom,rpmcc-qcs404", "qcom,rpmcc" "qcom,rpmcc-sdm660", "qcom,rpmcc" + "qcom,rpmcc-sm6115", "qcom,rpmcc" - #clock-cells : shall contain 1 diff --git a/include/dt-bindings/clock/qcom,rpmcc.h b/include/dt-bindings/clock/qcom,rpmcc.h index 8aaba7cd9589..aa834d516234 100644 --- a/include/dt-bindings/clock/qcom,rpmcc.h +++ b/include/dt-bindings/clock/qcom,rpmcc.h @@ -149,5 +149,15 @@ #define RPM_SMD_CE2_A_CLK 103 #define RPM_SMD_CE3_CLK 104 #define RPM_SMD_CE3_A_CLK 105 +#define RPM_SMD_QUP_CLK 106 +#define RPM_SMD_QUP_A_CLK 107 +#define RPM_SMD_MMRT_CLK 108 +#define RPM_SMD_MMRT_A_CLK 109 +#define RPM_SMD_MMNRT_CLK 110 +#define RPM_SMD_MMNRT_A_CLK 111 +#define RPM_SMD_SNOC_PERIPH_CLK 112 +#define RPM_SMD_SNOC_PERIPH_A_CLK 113 +#define RPM_SMD_SNOC_LPASS_CLK 114 +#define RPM_SMD_SNOC_LPASS_A_CLK 115 #endif From patchwork Sun Jun 27 18:59:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 12346995 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 E4BADC49EA6 for ; Sun, 27 Jun 2021 18:59:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D36CE61C18 for ; Sun, 27 Jun 2021 18:59:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231678AbhF0TCE (ORCPT ); Sun, 27 Jun 2021 15:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231552AbhF0TCD (ORCPT ); Sun, 27 Jun 2021 15:02:03 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE1E3C061574; Sun, 27 Jun 2021 11:59:37 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id g7so13293202wri.7; Sun, 27 Jun 2021 11:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yphiGsu/i0Tk9/PsGARAd5K0Qa9YrzmO9DI1dmt0gWY=; b=vU7uxxLoBZ/gFPXDm1qEqaWpaNymYDuX1nh2rGaF4caJlyjiZmjnLYiuvxHQmSGDQL w7TI3OKjDbrtQwdr+CD1VqjsJC0fiaPhhNVx6CJ8O/zf84jbxgxKbT5huXRuPXQIgJ0u JdlT/2x/D30AdpI7LNaCMF6ISufHjXcgBC6OiKZLo52xG45MrJj9yuURgWiqlOR7g1fS 4bR5QX6T8BcC2wwkI7iWolm/5kc64JavdPHv2TG2qF2KZ2eQ2pBeoxMdoL7VH/XmCQU6 tK3MEoX7JxU/gRaQpaV+Qxkfef2ahTrfHkgbJwgn9brb1BpiZmveySvtdyg0eRPpCtZw Cwww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yphiGsu/i0Tk9/PsGARAd5K0Qa9YrzmO9DI1dmt0gWY=; b=OUAJFu+088kXhpUzmXtBqcfMyRkEEYYdv/2KuARHo9Jv/FMAzMLNckxAJsY06nPd13 NDSMPk7x5i0KS16SINz3V9TMFi4WV5QS4pm/q/PbWOvah+hKtCGbDNxD992n0ZV8pKvc RgPDJlETPzcJpR7lwscGKkItGwPtpbfi2JoxQ+UAQAZgz8moSsPjEBFJQMn8GnIn/xYM WNnVe01eI3h+w1vFaDyKdFlggmal0m5miAU50Yh+YTN7hmqvNvKHvQXDZW/aiybXY3Lt fqgu8DfThBDbdlvIGIhoTanS5fdRScGLEHILtJwLSwM3PCcdoqap7RpM3WKzzxIwJnvV g+TA== X-Gm-Message-State: AOAM5339Drk/SGnh67Cp/Z7bUnpWodktbp6L/DyVr2AHHaHGorRHK+eq ljo83dRG5TRyvLOnatD+Sek= X-Google-Smtp-Source: ABdhPJxn4Yi8Szqfo7IzZ8rD/LUGgi5wwtOUl0/eqzRX8eDFQM5ceHT7WXpB2V7FHaKYc4FE9VqDLg== X-Received: by 2002:adf:b64b:: with SMTP id i11mr23219459wre.393.1624820376598; Sun, 27 Jun 2021 11:59:36 -0700 (PDT) Received: from localhost (178-169-161-196.razgrad.ddns.bulsat.com. [178.169.161.196]) by smtp.gmail.com with ESMTPSA id m67sm17215179wmm.17.2021.06.27.11.59.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 11:59:36 -0700 (PDT) From: Iskren Chernev To: Bjorn Andersson Cc: Andy Gross , Kathiravan T , Michael Turquette , Rajendra Nayak , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev Subject: [PATCH v2 3/5] clk: qcom: smd: Add support for SM6115 rpm clocks Date: Sun, 27 Jun 2021 21:59:25 +0300 Message-Id: <20210627185927.695411-4-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627185927.695411-1-iskren.chernev@gmail.com> References: <20210627185927.695411-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add rpm smd clocks, PMIC and bus clocks which are required on SM4250/6115 for clients to vote on. Signed-off-by: Iskren Chernev --- drivers/clk/qcom/clk-smd-rpm.c | 54 ++++++++++++++++++++++++++++++++ drivers/soc/qcom/smd-rpm.c | 1 + include/linux/soc/qcom/smd-rpm.h | 1 + 3 files changed, 56 insertions(+) diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c index daf09dd61055..ae9f999cf342 100644 --- a/drivers/clk/qcom/clk-smd-rpm.c +++ b/drivers/clk/qcom/clk-smd-rpm.c @@ -913,6 +913,59 @@ static const struct rpm_smd_clk_desc rpm_clk_sdm660 = { .num_clks = ARRAY_SIZE(sdm660_clks), }; +/* sm6115 */ +DEFINE_CLK_SMD_RPM(sm6115, cnoc_clk, cnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1); +DEFINE_CLK_SMD_RPM(sm6115, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 2); +DEFINE_CLK_SMD_RPM_BRANCH(sm6115, qdss_clk, qdss_a_clk, + QCOM_SMD_RPM_MISC_CLK, 1, 19200000); +DEFINE_CLK_SMD_RPM(sm6115, qup_clk, qup_a_clk, QCOM_SMD_RPM_QUP_CLK, 0); +DEFINE_CLK_SMD_RPM(sm6115, mmnrt_clk, mmnrt_a_clk, QCOM_SMD_RPM_MMAXI_CLK, 0); +DEFINE_CLK_SMD_RPM(sm6115, mmrt_clk, mmrt_a_clk, QCOM_SMD_RPM_MMAXI_CLK, 1); +DEFINE_CLK_SMD_RPM(sm6115, snoc_periph_clk, snoc_periph_a_clk, + QCOM_SMD_RPM_BUS_CLK, 0); +DEFINE_CLK_SMD_RPM(sm6115, snoc_lpass_clk, snoc_lpass_a_clk, + QCOM_SMD_RPM_BUS_CLK, 5); + +static struct clk_smd_rpm *sm6115_clks[] = { + [RPM_SMD_XO_CLK_SRC] = &sdm660_bi_tcxo, + [RPM_SMD_XO_A_CLK_SRC] = &sdm660_bi_tcxo_a, + [RPM_SMD_SNOC_CLK] = &sm6115_snoc_clk, + [RPM_SMD_SNOC_A_CLK] = &sm6115_snoc_a_clk, + [RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk, + [RPM_SMD_BIMC_A_CLK] = &msm8916_bimc_a_clk, + [RPM_SMD_QDSS_CLK] = &sm6115_qdss_clk, + [RPM_SMD_QDSS_A_CLK] = &sm6115_qdss_a_clk, + [RPM_SMD_RF_CLK1] = &msm8916_rf_clk1, + [RPM_SMD_RF_CLK1_A] = &msm8916_rf_clk1_a, + [RPM_SMD_RF_CLK2] = &msm8916_rf_clk2, + [RPM_SMD_RF_CLK2_A] = &msm8916_rf_clk2_a, + [RPM_SMD_CNOC_CLK] = &sm6115_cnoc_clk, + [RPM_SMD_CNOC_A_CLK] = &sm6115_cnoc_a_clk, + [RPM_SMD_IPA_CLK] = &msm8976_ipa_clk, + [RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk, + [RPM_SMD_QUP_CLK] = &sm6115_qup_clk, + [RPM_SMD_QUP_A_CLK] = &sm6115_qup_a_clk, + [RPM_SMD_MMRT_CLK] = &sm6115_mmrt_clk, + [RPM_SMD_MMRT_A_CLK] = &sm6115_mmrt_a_clk, + [RPM_SMD_MMNRT_CLK] = &sm6115_mmnrt_clk, + [RPM_SMD_MMNRT_A_CLK] = &sm6115_mmnrt_a_clk, + [RPM_SMD_SNOC_PERIPH_CLK] = &sm6115_snoc_periph_clk, + [RPM_SMD_SNOC_PERIPH_A_CLK] = &sm6115_snoc_periph_a_clk, + [RPM_SMD_SNOC_LPASS_CLK] = &sm6115_snoc_lpass_clk, + [RPM_SMD_SNOC_LPASS_A_CLK] = &sm6115_snoc_lpass_a_clk, + [RPM_SMD_CE1_CLK] = &msm8992_ce1_clk, + [RPM_SMD_CE1_A_CLK] = &msm8992_ce1_a_clk, + [RPM_SMD_RF_CLK1_PIN] = &msm8916_rf_clk1_pin, + [RPM_SMD_RF_CLK1_A_PIN] = &msm8916_rf_clk1_a_pin, + [RPM_SMD_RF_CLK2_PIN] = &msm8916_rf_clk2_pin, + [RPM_SMD_RF_CLK2_A_PIN] = &msm8916_rf_clk2_a_pin, +}; + +static const struct rpm_smd_clk_desc rpm_clk_sm6115 = { + .clks = sm6115_clks, + .num_clks = ARRAY_SIZE(sm6115_clks), +}; + static const struct of_device_id rpm_smd_clk_match_table[] = { { .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 }, { .compatible = "qcom,rpmcc-msm8936", .data = &rpm_clk_msm8936 }, @@ -924,6 +977,7 @@ static const struct of_device_id rpm_smd_clk_match_table[] = { { .compatible = "qcom,rpmcc-msm8998", .data = &rpm_clk_msm8998 }, { .compatible = "qcom,rpmcc-qcs404", .data = &rpm_clk_qcs404 }, { .compatible = "qcom,rpmcc-sdm660", .data = &rpm_clk_sdm660 }, + { .compatible = "qcom,rpmcc-sm6115", .data = &rpm_clk_sm6115 }, { } }; MODULE_DEVICE_TABLE(of, rpm_smd_clk_match_table); diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c index bc0be1d4be5f..dfdd4f20f5fd 100644 --- a/drivers/soc/qcom/smd-rpm.c +++ b/drivers/soc/qcom/smd-rpm.c @@ -242,6 +242,7 @@ static const struct of_device_id qcom_smd_rpm_of_match[] = { { .compatible = "qcom,rpm-msm8996" }, { .compatible = "qcom,rpm-msm8998" }, { .compatible = "qcom,rpm-sdm660" }, + { .compatible = "qcom,rpm-sm6115" }, { .compatible = "qcom,rpm-sm6125" }, { .compatible = "qcom,rpm-qcs404" }, {} diff --git a/include/linux/soc/qcom/smd-rpm.h b/include/linux/soc/qcom/smd-rpm.h index f2645ec52520..d350685039ad 100644 --- a/include/linux/soc/qcom/smd-rpm.h +++ b/include/linux/soc/qcom/smd-rpm.h @@ -37,6 +37,7 @@ struct qcom_smd_rpm; #define QCOM_SMD_RPM_IPA_CLK 0x617069 #define QCOM_SMD_RPM_CE_CLK 0x6563 #define QCOM_SMD_RPM_AGGR_CLK 0x72676761 +#define QCOM_SMD_RPM_QUP_CLK 0x00707571 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, int state, From patchwork Sun Jun 27 18:59:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 12346997 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 D0CB5C49EBD for ; Sun, 27 Jun 2021 18:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC0A0611C2 for ; Sun, 27 Jun 2021 18:59:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbhF0TCH (ORCPT ); Sun, 27 Jun 2021 15:02:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhF0TCF (ORCPT ); Sun, 27 Jun 2021 15:02:05 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07DFAC061787; Sun, 27 Jun 2021 11:59:40 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id m18so17886881wrv.2; Sun, 27 Jun 2021 11:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O6JYXbVuCIOutPpaNLYL0e3H2M/HftG19CnHo95qjg8=; b=lTZtwT0fVcaj8NYQv/0KtdOYI9fSnm2LzrEyvxqq3NxW51OX//VOxXk8WmY6jFqKbn jmzqYEzUOOmDKa29S9mlTojORGhw1v/jjNv8Av6k9/NvYF9HnW+QW1WZyfNs1IHa4oXp am48yMBlzDfxPw9aQ04Lv7l6JSfVfEjeM3MxCNx4Ta4jyn8OhzB3KCeDHc35pvjRfv0x lPs/4P92A+NrnF2rhhb1gaFEaY7neIayXDl+GgQNBtoPx7VGnAk0i5o5dXq7rLTNYWph /mhu0NO1ELGCLyulDzLRcHiDVBNtTED2fja0E3hL7AhwhFWXtSbbkurDlfRKeZViC0CQ M0nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O6JYXbVuCIOutPpaNLYL0e3H2M/HftG19CnHo95qjg8=; b=fBgVduk1yb0Fm0KkN2le46rcwNfO47eHgzLGusSzyGrm/rV8CXkZaQxAhQvSLUiC+j frSVo8Nu0dIBTLr+oFO8c/NvTXVZ7lof2sDLepQy82zGh6uxdMxt9Ei7ebY2HozSXqQh yRz1ExyK6rj5wNbl1Tubb7oTJkDDRuGdPrNhT34l/9O7krGE7qu7UEyF2Pdy5nLt9JMN EK0OaWlQRilLqzAZsLVGy33kDcRkyzJO68Mv+EZAH7zLjTo+wFj4RI8sLSGA7V4sVjgI tq5+nJf0Jm2Q+fjNAnnXUk2icT+7oqcYZqhmYHTF8LAgJ7Paymkyhz0IEJzIOqcIpJJB xxOw== X-Gm-Message-State: AOAM53265dptwjk8IuJTPAAn9DPGiG5AuV4oFev31MZkShsed/NQ4Hog fc+u6tLjxOadgpq/wt+LPlU= X-Google-Smtp-Source: ABdhPJwCJk3evkjv67TSD8Wz/FGSA8Ar72+PXrEdkR1rsL5mWQHK2QW4tPc/WiwS56lj/tiqUG+6cw== X-Received: by 2002:a5d:4983:: with SMTP id r3mr22698421wrq.184.1624820378676; Sun, 27 Jun 2021 11:59:38 -0700 (PDT) Received: from localhost (178-169-161-196.razgrad.ddns.bulsat.com. [178.169.161.196]) by smtp.gmail.com with ESMTPSA id g7sm8759855wmq.27.2021.06.27.11.59.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 11:59:38 -0700 (PDT) From: Iskren Chernev To: Bjorn Andersson Cc: Andy Gross , Kathiravan T , Michael Turquette , Rajendra Nayak , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev Subject: [PATCH v2 4/5] dt-bindings: power: rpmpd: Add SM6115 to rpmpd binding Date: Sun, 27 Jun 2021 21:59:26 +0300 Message-Id: <20210627185927.695411-5-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627185927.695411-1-iskren.chernev@gmail.com> References: <20210627185927.695411-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatible and constants for the power domains exposed by the RPM in the Qualcomm SM4250/6115 platforms. Signed-off-by: Iskren Chernev Acked-by: Rob Herring --- .../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 4807b560f00d..239f37881cae 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml @@ -30,6 +30,7 @@ properties: - qcom,sc8180x-rpmhpd - qcom,sdm845-rpmhpd - qcom,sdx55-rpmhpd + - qcom,sm6115-rpmpd - qcom,sm8150-rpmhpd - qcom,sm8250-rpmhpd - qcom,sm8350-rpmhpd diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 8b5708bb9671..4533dbbf9937 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -192,6 +192,16 @@ #define SDM660_SSCMX 8 #define SDM660_SSCMX_VFL 9 +/* SM6115 Power Domains */ +#define SM6115_VDDCX 0 +#define SM6115_VDDCX_AO 1 +#define SM6115_VDDCX_VFL 2 +#define SM6115_VDDMX 3 +#define SM6115_VDDMX_AO 4 +#define SM6115_VDDMX_VFL 5 +#define SM6115_VDD_LPI_CX 6 +#define SM6115_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 Sun Jun 27 18:59:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 12346999 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 D5D11C48BC2 for ; Sun, 27 Jun 2021 18:59:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C111761C2E for ; Sun, 27 Jun 2021 18:59:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbhF0TCJ (ORCPT ); Sun, 27 Jun 2021 15:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231667AbhF0TCH (ORCPT ); Sun, 27 Jun 2021 15:02:07 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C93C061574; Sun, 27 Jun 2021 11:59:42 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id u8so4618176wrq.8; Sun, 27 Jun 2021 11:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KnnXMNSnCQFUApM8UzwSAzj60/BQdxg5lHcpdV/aFz8=; b=kEg1z5gWa7pXTahuHHV5bjVvQly6SlLrWW2gyrB9+umJZPXleboR5PF8F49kn2p6qz PnWhrtUrMkms15RNOsrZOM3Yit5gsbqaOy7vE8L7DUGc2oQUTwFj856opxe7XtL+0grG pjS+9FUcJeV2Iurhz4xPSg9G2oQLeyxRo5hMnh0fIw5Cu4jJ7XHBDJIe+WBR3MkLiofd JnqZIGOKsDV4nD0qXGGzEer2vXZuJIoQ/4gFyYfwsUSG1J0eaNAJSi4uBxHcT2CAzEDj VW6gNA/2OIAamtm1RzQC0TeDT6ubCUMK7fDhEu4HhPVjHLlw6RQ4a2NbRdv5woD7YhWI M8ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KnnXMNSnCQFUApM8UzwSAzj60/BQdxg5lHcpdV/aFz8=; b=m4qAJEvCdp2xZRZEDVwtcHAzJTnv9hk4kWkXu9c8EV1wffNxZzPWbPq1pkcU3hO8b/ 8QcePSHzy67oyopMLTeUQi7qp9OcR5sDMBMaKhNPrN+AyRonqcyxe6FMrmaVamtKRmZo MwM+xAUjjZSZbtnMMwz5axDD7AVkaWRJkmFR8JzFWJZkHbBPvoNbJZ33+TKGT3RwcYWF LZZ0eea1Ph7aPo3VLZxLLC8eWsO8NByUgC5JLeG5sym4RJTwt9Sa1jJxTfukGS+WBJ4A QJBuqwKq37oL/5/49hrSEq1Nv9d3E9tN6P8v4v3FHpERR0EQwWXWMaGbQ0N83n2ciQMy ljMg== X-Gm-Message-State: AOAM530QH7FCOOunj6qJPFwRCjMec8fUcZ0/PFPHdcNvgB0+qpCGEHsW IebDSaO0jns081Kq8Ez80us= X-Google-Smtp-Source: ABdhPJwnCX+kkMYiigu3NyEa2TjiBgYjLk+R4TNWEa1tjyLI+2QJezS549G5rHAMl9xz4lLgnp2iaA== X-Received: by 2002:a05:6000:10c8:: with SMTP id b8mr22416445wrx.383.1624820380781; Sun, 27 Jun 2021 11:59:40 -0700 (PDT) Received: from localhost (178-169-161-196.razgrad.ddns.bulsat.com. [178.169.161.196]) by smtp.gmail.com with ESMTPSA id t9sm4629168wrq.92.2021.06.27.11.59.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 11:59:40 -0700 (PDT) From: Iskren Chernev To: Bjorn Andersson Cc: Andy Gross , Kathiravan T , Michael Turquette , Rajendra Nayak , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev Subject: [PATCH v2 5/5] drivers: soc: qcom: rpmpd: Add SM6115 RPM Power Domains Date: Sun, 27 Jun 2021 21:59:27 +0300 Message-Id: <20210627185927.695411-6-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627185927.695411-1-iskren.chernev@gmail.com> References: <20210627185927.695411-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The SM4250/6115 have 4 rpm power domains, ported from downstream DT. Signed-off-by: Iskren Chernev --- drivers/soc/qcom/rpmpd.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 0b532a892d60..dbf494e92574 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -346,6 +346,33 @@ static const struct rpmpd_desc sdm660_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; +/* sm4250/6115 RPM Power domains */ +DEFINE_RPMPD_PAIR(sm6115, vddcx, vddcx_ao, RWCX, LEVEL, 0); +DEFINE_RPMPD_VFL(sm6115, vddcx_vfl, RWCX, 0); + +DEFINE_RPMPD_PAIR(sm6115, vddmx, vddmx_ao, RWMX, LEVEL, 0); +DEFINE_RPMPD_VFL(sm6115, vddmx_vfl, RWMX, 0); + +DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_cx, RWLC, 0); +DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_mx, RWLM, 0); + +static struct rpmpd *sm6115_rpmpds[] = { + [SM6115_VDDCX] = &sm6115_vddcx, + [SM6115_VDDCX_AO] = &sm6115_vddcx_ao, + [SM6115_VDDCX_VFL] = &sm6115_vddcx_vfl, + [SM6115_VDDMX] = &sm6115_vddmx, + [SM6115_VDDMX_AO] = &sm6115_vddmx_ao, + [SM6115_VDDMX_VFL] = &sm6115_vddmx_vfl, + [SM6115_VDD_LPI_CX] = &sm6115_vdd_lpi_cx, + [SM6115_VDD_LPI_MX] = &sm6115_vdd_lpi_mx, +}; + +static const struct rpmpd_desc sm6115_desc = { + .rpmpds = sm6115_rpmpds, + .num_pds = ARRAY_SIZE(sm6115_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 }, @@ -356,6 +383,7 @@ static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8998-rpmpd", .data = &msm8998_desc }, { .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc }, { .compatible = "qcom,sdm660-rpmpd", .data = &sdm660_desc }, + { .compatible = "qcom,sm6115-rpmpd", .data = &sm6115_desc }, { } }; MODULE_DEVICE_TABLE(of, rpmpd_match_table);