From patchwork Sat May 27 09:39:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 686571 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AF4BC7EE2F for ; Sat, 27 May 2023 09:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231710AbjE0JkP (ORCPT ); Sat, 27 May 2023 05:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232038AbjE0JkO (ORCPT ); Sat, 27 May 2023 05:40:14 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE09ADE; Sat, 27 May 2023 02:40:12 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-970056276acso247010666b.2; Sat, 27 May 2023 02:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685180411; x=1687772411; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BYU8DIZ4LFg3qtG4sMU0TrZZjEkZx2DAGPUz4yxPtkQ=; b=MiHVekn2dSfJv23gVug5N1DWYZCh42FwDNmDYfoFnkLjVIJj9gbiuzgEpbkQQxx1CA i0fc7/ve7cRHPs4U2tVmfSzHcKvu7GVB/pkfeuE9CzX01ly8H//73uC1mFJVFqHBS/n9 vuaZ40KRTb31Bv+t4zwzl3Tw6csrARby9Sf6wWU1C3ZGxV3HZSl5A5zuouMgjqKwOmkj BRiqBpLFjUK29/WwMHQPs2/jU2FEE3x6vMLyu+386y1/Zl2Rs6v/Jv8sZV1dt/xIytUY inTdCVgeyNqfHKUbrCpNciUTLmM2dHeywfIBrqNkKhUkvTecufYFOeaNi71CTfO6pN9Q MrEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685180411; x=1687772411; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BYU8DIZ4LFg3qtG4sMU0TrZZjEkZx2DAGPUz4yxPtkQ=; b=QSKpos7dYwkSDjJegI6Ce4LJ36jOk0L2/HwJfqT1OgwOLCjKQcNRgBKMtaLDuY0a9t xQ+otoraArMMjYm6T0O1XYyXnT2pCKLIdi+eVp66DRDH8kAOpsCeGlyUHCjbuX/y+UFf LxqavMi8bCqDPp+eCgj9Q/nI+15JNTC2+/DcdV0/lk1u7tMJoRy3S0fGedHrp2ZsHSWh KRgYoEKYRlF9K2JwuE9eEhjtgLFe1PR2vL2r2SvZUkJ+4IkDkfNEdeEVbaPuUDFEgwRL be5qQLIwcnsXr//MiGddT6Ct2LcIHY/14tPzhJGZ4Qx5iEqn3duqWlfsAlEJ6VDQWGH2 rA6w== X-Gm-Message-State: AC+VfDykUJhNDvZ6CZkcDWigZdusIl3vP0UB2gYkSc+E8nPiX5PI6Ps8 0OZYK0VtsJ5oRYeYYNaIUwk= X-Google-Smtp-Source: ACHHUZ57NUw5hsNGLDK9WItLKApipqy0WT+YEapN79ko9MMyAXgY8BxIgAr1OuYIIV/6rgZLxRmgpg== X-Received: by 2002:a17:907:80e:b0:96f:5747:a0de with SMTP id wv14-20020a170907080e00b0096f5747a0demr4112464ejb.6.1685180411121; Sat, 27 May 2023 02:40:11 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id kq12-20020a170906abcc00b009596e7e0dbasm3163623ejb.162.2023.05.27.02.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 02:40:10 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov Cc: Yassine Oudjana , Yassine Oudjana , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v2 1/3] dt-bindings: clock: qcom,msm8996-cbf: Add compatible for MSM8996 Pro Date: Sat, 27 May 2023 12:39:32 +0300 Message-Id: <20230527093934.101335-2-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230527093934.101335-1-y.oudjana@protonmail.com> References: <20230527093934.101335-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Yassine Oudjana The CBF clock on MSM8996 Pro has a different divisor compared to MSM8996 and is therefore not fully compatible with it. Add a new compatible string to differentiate between them. Signed-off-by: Yassine Oudjana Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/clock/qcom,msm8996-cbf.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/clock/qcom,msm8996-cbf.yaml b/Documentation/devicetree/bindings/clock/qcom,msm8996-cbf.yaml index 3ffe69d8cdd5..0dfbd8c4d465 100644 --- a/Documentation/devicetree/bindings/clock/qcom,msm8996-cbf.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,msm8996-cbf.yaml @@ -15,7 +15,9 @@ description: > properties: compatible: - const: qcom,msm8996-cbf + enum: + - qcom,msm8996-cbf + - qcom,msm8996pro-cbf reg: maxItems: 1 From patchwork Sat May 27 09:39:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 686682 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EFDEC7EE2F for ; Sat, 27 May 2023 09:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbjE0JkX (ORCPT ); Sat, 27 May 2023 05:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232038AbjE0JkV (ORCPT ); Sat, 27 May 2023 05:40:21 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B09F135; Sat, 27 May 2023 02:40:19 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-969f90d71d4so223263066b.3; Sat, 27 May 2023 02:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685180417; x=1687772417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kfu8MrzbDydbuvkp4SRT/b0XpIQRCecIzUFORTCytPI=; b=WXqZ+B1kX654EDm7kTkh1ni1yQ78LZIHRbfNlEXnzchqCCYdXvkBBYRxvC16No56DH iYlcO7P+EvMrf+2ZuJvF6dbhgkVno7kOvK9IBil/YrseQNXRkY2XV4P2brAprSPg03xW Hnq9pg9dljoQCiT7i6bOVnBTQD9UjuG4hshvFWbyo01LZiZRME/wQg7zIRv3dJuPhPXY 8nkIJvfV++i08RGVg/Lufvhlt5mEYWDbQP+9jsBnnq82jJnkopa6T569QQycXSXiLNdo FixD1nEL38jhZ4gan3SEsmpB3Q0faL1GSYpR2dxG+Sz44wMdjBNRA7F5VZ7AdllAby+Q b6zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685180417; x=1687772417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kfu8MrzbDydbuvkp4SRT/b0XpIQRCecIzUFORTCytPI=; b=No7kYGkQM66SQwyPWrmSZw5lLYoxVXlV4bxH7Yj4raKTikKFiybmV5/qYBVuZWgebf p/Wm19aEwkcq3vvIBbptLvl9y2AHYjndkzbHg8izEBgvJuBpMU2RJFWzwKuhidaUnCIO c1vyVeukJ9DMEJaP7Bo2oz/Y7f/avJH21FXb6tT1cOaiQ8iW1WR7WrKsuk2zOZIFYvZY xmvo7+M2h3O9wi+SVejpFvTqqcxLet/KnKqDmFFNHK3YIMPssFshGlK1ev4Fsp9Smnx8 O4fMDoNzm2AT1a+YETVPkDMqbvlIeFWm2FQFN2bWAGy1+uuF6Vz0NQLXNPtNFmZNn3dC 40pg== X-Gm-Message-State: AC+VfDywt+8+XNk5JoaaEYftOp2QHV49LT674TUpu3Ex0NGVLSuHo5A9 PEsvMlL6W0sJBcAt9187R4c= X-Google-Smtp-Source: ACHHUZ7+DgiyxKDfvRe0x697wO82hu3TN6bROMLnapvrn5GVIW6dpNfty6Y/KXxNB2/65cE5D/ctCA== X-Received: by 2002:a17:907:7b87:b0:92b:3c78:91fa with SMTP id ne7-20020a1709077b8700b0092b3c7891famr4355640ejc.28.1685180417527; Sat, 27 May 2023 02:40:17 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id kq12-20020a170906abcc00b009596e7e0dbasm3163623ejb.162.2023.05.27.02.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 02:40:17 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov Cc: Yassine Oudjana , Yassine Oudjana , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] arm64: dts: qcom: msm8996pro: Add CBF scaling support Date: Sat, 27 May 2023 12:39:33 +0300 Message-Id: <20230527093934.101335-3-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230527093934.101335-1-y.oudjana@protonmail.com> References: <20230527093934.101335-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Yassine Oudjana Add opp-peak-kBps to CPU OPPs to allow for CBF scaling, and change the CBF compatible to reflect the difference between it and the one on MSM8996. Signed-off-by: Yassine Oudjana Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/msm8996pro.dtsi | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8996pro.dtsi b/arch/arm64/boot/dts/qcom/msm8996pro.dtsi index a679a9c0cf99..b74cff06f300 100644 --- a/arch/arm64/boot/dts/qcom/msm8996pro.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996pro.dtsi @@ -24,101 +24,121 @@ opp-307200000 { opp-hz = /bits/ 64 <307200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-384000000 { opp-hz = /bits/ 64 <384000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-460800000 { opp-hz = /bits/ 64 <460800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-537600000 { opp-hz = /bits/ 64 <537600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-614400000 { opp-hz = /bits/ 64 <614400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-691200000 { opp-hz = /bits/ 64 <691200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <307200>; }; opp-768000000 { opp-hz = /bits/ 64 <768000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <307200>; }; opp-844800000 { opp-hz = /bits/ 64 <844800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <384000>; }; opp-902400000 { opp-hz = /bits/ 64 <902400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <441600>; }; opp-979200000 { opp-hz = /bits/ 64 <979200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <537600>; }; opp-1056000000 { opp-hz = /bits/ 64 <1056000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <614400>; }; opp-1132800000 { opp-hz = /bits/ 64 <1132800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <691200>; }; opp-1209600000 { opp-hz = /bits/ 64 <1209600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <768000>; }; opp-1286400000 { opp-hz = /bits/ 64 <1286400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <844800>; }; opp-1363200000 { opp-hz = /bits/ 64 <1363200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <902400>; }; opp-1440000000 { opp-hz = /bits/ 64 <1440000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <979200>; }; opp-1516800000 { opp-hz = /bits/ 64 <1516800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1132800>; }; opp-1593600000 { opp-hz = /bits/ 64 <1593600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1190400>; }; opp-1996800000 { opp-hz = /bits/ 64 <1996800000>; opp-supported-hw = <0x20>; clock-latency-ns = <200000>; + opp-peak-kBps = <1516800>; }; opp-2188800000 { opp-hz = /bits/ 64 <2188800000>; opp-supported-hw = <0x10>; clock-latency-ns = <200000>; + opp-peak-kBps = <1593600>; }; }; @@ -131,136 +151,163 @@ opp-307200000 { opp-hz = /bits/ 64 <307200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-384000000 { opp-hz = /bits/ 64 <384000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-460800000 { opp-hz = /bits/ 64 <460800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-537600000 { opp-hz = /bits/ 64 <537600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-614400000 { opp-hz = /bits/ 64 <614400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <192000>; }; opp-691200000 { opp-hz = /bits/ 64 <691200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <307200>; }; opp-748800000 { opp-hz = /bits/ 64 <748800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <307200>; }; opp-825600000 { opp-hz = /bits/ 64 <825600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <384000>; }; opp-902400000 { opp-hz = /bits/ 64 <902400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <441600>; }; opp-979200000 { opp-hz = /bits/ 64 <979200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <441600>; }; opp-1056000000 { opp-hz = /bits/ 64 <1056000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <537600>; }; opp-1132800000 { opp-hz = /bits/ 64 <1132800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <614400>; }; opp-1209600000 { opp-hz = /bits/ 64 <1209600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <691200>; }; opp-1286400000 { opp-hz = /bits/ 64 <1286400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <768000>; }; opp-1363200000 { opp-hz = /bits/ 64 <1363200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <844800>; }; opp-1440000000 { opp-hz = /bits/ 64 <1440000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <902400>; }; opp-1516800000 { opp-hz = /bits/ 64 <1516800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <979200>; }; opp-1593600000 { opp-hz = /bits/ 64 <1593600000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1056000>; }; opp-1670400000 { opp-hz = /bits/ 64 <1670400000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1132800>; }; opp-1747200000 { opp-hz = /bits/ 64 <1747200000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1190400>; }; opp-1824000000 { opp-hz = /bits/ 64 <1824000000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1286400>; }; opp-1900800000 { opp-hz = /bits/ 64 <1900800000>; opp-supported-hw = <0x70>; clock-latency-ns = <200000>; + opp-peak-kBps = <1363200>; }; opp-1977600000 { opp-hz = /bits/ 64 <1977600000>; opp-supported-hw = <0x30>; clock-latency-ns = <200000>; + opp-peak-kBps = <1440000>; }; opp-2054400000 { opp-hz = /bits/ 64 <2054400000>; opp-supported-hw = <0x30>; clock-latency-ns = <200000>; + opp-peak-kBps = <1516800>; }; opp-2150400000 { opp-hz = /bits/ 64 <2150400000>; opp-supported-hw = <0x30>; clock-latency-ns = <200000>; + opp-peak-kBps = <1593600>; }; opp-2246400000 { opp-hz = /bits/ 64 <2246400000>; opp-supported-hw = <0x10>; clock-latency-ns = <200000>; + opp-peak-kBps = <1593600>; }; opp-2342400000 { opp-hz = /bits/ 64 <2342400000>; opp-supported-hw = <0x10>; clock-latency-ns = <200000>; + opp-peak-kBps = <1593600>; }; }; }; @@ -289,3 +336,7 @@ opp-560000000 { }; /* The rest is inherited from msm8996 */ }; + +&cbf { + compatible = "qcom,msm8996pro-cbf"; +}; From patchwork Sat May 27 09:39:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 686570 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86469C77B7C for ; Sat, 27 May 2023 09:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231741AbjE0Jk0 (ORCPT ); Sat, 27 May 2023 05:40:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbjE0JkZ (ORCPT ); Sat, 27 May 2023 05:40:25 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EC0418D; Sat, 27 May 2023 02:40:23 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-96f850b32caso305550666b.3; Sat, 27 May 2023 02:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685180421; x=1687772421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RnO2+f52DGNhkJXeV3dwSMun1/oWC09Jx7AM2r6DtMM=; b=bhBfYdtLAdF6L9i7h/QEU4O1n2pyT0ratFM/0CCSnFZ+1ag/9kGSXIVWY+JPRlZuU6 8sIuzlmUqGslfpnquwD2dzgiThRbA8Ig20vFlcatq6xaS4ZX4kE329bJ55BLmNLCC4MQ RW8UrzI16v/4RPahN1+UKDFtJgWDhX1a+cF3JXPGtacKP3CZBFoe1z9ndNv0JUzSfQfQ yK/Cxt78lIf+81MyyQ92LhOZXhgcY8vn5c9ujmdvLgH2BFj9A2RCxwCIxC7oYAiDUlBc OjyjtSTKQW76iDlejBV6SO0ER9PbS3dP8Gnn1DMGCeNeQTmn9CqJQTgYKA0N52wYRONI Hxpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685180421; x=1687772421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RnO2+f52DGNhkJXeV3dwSMun1/oWC09Jx7AM2r6DtMM=; b=bMFVsNxC3txMIfjv1Dyto5ByyPWGf8HdZ1TrhXP2+SgA4p9LhxjXcTDIocWGtON5KE ZM/OskFDMXCFDI6ED8WzHbTUr77BAoyP5g8cjYncDy97jvFDuv4O6a5NscuEUDeH6NEm sQpiV0Aq8tYx53jJ5o8beo3dJgEpqVj/DJ0KRS5oCd9m6aJQJqseWS3uvNL1jI2l2hgB 5AF06I2YltN2D1qjweKImYbJ9OZZdGjurz2FpTIn+4dLlYubFs8+rxT/oNAKA146ptYP U7a0CPBkrI46d39PtW7zLiZhxC5lSAxOpVyTQLhuSMfxCJGysrHW2LDTDkdrQFvO9nTb rP8g== X-Gm-Message-State: AC+VfDz45CRyRy3O1oup4RddHKehOcWF+puJrT7CVKzjpWoMZP5eLBvd Y4tAGZ3GIyDbMOeIoEHbptE= X-Google-Smtp-Source: ACHHUZ75m2h7jCFKbjxh54OtTIyPOiFEaOUI6ExlmRmORTaiabRV2QhaoiuLmbLCXbW9uA5/5Vfziw== X-Received: by 2002:a17:907:9289:b0:966:63ac:3706 with SMTP id bw9-20020a170907928900b0096663ac3706mr4018706ejc.26.1685180421286; Sat, 27 May 2023 02:40:21 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id kq12-20020a170906abcc00b009596e7e0dbasm3163623ejb.162.2023.05.27.02.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 02:40:20 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov Cc: Yassine Oudjana , Yassine Oudjana , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] clk: qcom: cbf-msm8996: Add support for MSM8996 Pro Date: Sat, 27 May 2023 12:39:34 +0300 Message-Id: <20230527093934.101335-4-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230527093934.101335-1-y.oudjana@protonmail.com> References: <20230527093934.101335-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Yassine Oudjana The CBF PLL on MSM8996 Pro has a /4 post divisor instead of /2. Handle the difference accordingly. Signed-off-by: Yassine Oudjana --- drivers/clk/qcom/clk-cbf-8996.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/clk-cbf-8996.c b/drivers/clk/qcom/clk-cbf-8996.c index cfd567636f4e..ab988e6f1976 100644 --- a/drivers/clk/qcom/clk-cbf-8996.c +++ b/drivers/clk/qcom/clk-cbf-8996.c @@ -48,7 +48,7 @@ static const u8 cbf_pll_regs[PLL_OFF_MAX_REGS] = { [PLL_OFF_STATUS] = 0x28, }; -static const struct alpha_pll_config cbfpll_config = { +static struct alpha_pll_config cbfpll_config = { .l = 72, .config_ctl_val = 0x200d4828, .config_ctl_hi_val = 0x006, @@ -137,7 +137,7 @@ static int clk_cbf_8996_mux_determine_rate(struct clk_hw *hw, { struct clk_hw *parent; - if (req->rate < (DIV_THRESHOLD / 2)) + if (req->rate < (DIV_THRESHOLD / cbf_pll_postdiv.div)) return -EINVAL; if (req->rate < DIV_THRESHOLD) @@ -265,6 +265,11 @@ static int qcom_msm8996_cbf_probe(struct platform_device *pdev) /* Switch CBF to use the primary PLL */ regmap_update_bits(regmap, CBF_MUX_OFFSET, CBF_MUX_PARENT_MASK, 0x1); + if (of_device_is_compatible(dev->of_node, "qcom,msm8996pro-cbf")) { + cbfpll_config.post_div_val = 0x3 << 8; + cbf_pll_postdiv.div = 4; + } + for (i = 0; i < ARRAY_SIZE(cbf_msm8996_hw_clks); i++) { ret = devm_clk_hw_register(dev, cbf_msm8996_hw_clks[i]); if (ret) @@ -286,6 +291,7 @@ static int qcom_msm8996_cbf_probe(struct platform_device *pdev) static const struct of_device_id qcom_msm8996_cbf_match_table[] = { { .compatible = "qcom,msm8996-cbf" }, + { .compatible = "qcom,msm8996pro-cbf" }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, qcom_msm8996_cbf_match_table);