From patchwork Tue Sep 20 02:37:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Acayan X-Patchwork-Id: 12981253 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 208E8C6FA91 for ; Tue, 20 Sep 2022 02:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230141AbiITChY (ORCPT ); Mon, 19 Sep 2022 22:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbiITChX (ORCPT ); Mon, 19 Sep 2022 22:37:23 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB4AA4B0C0; Mon, 19 Sep 2022 19:37:22 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id x13so696455ilp.3; Mon, 19 Sep 2022 19:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=1KloQjGmkbRl50KmGneRd/ko6fDK65hd7ZW5J/tAhcU=; b=GfhY2RdYfxL2rj/djXVp2evFUzqmT5vCrNLYFo4aejf6ZzEy10lGIWriE/OO2e3DOg ram5DeryyVpAziOusT6MOLZGNlOfbpEt8YyGT91dnQ5jmKvLkX7elsAt+wVZwSREDCbk viWDGw83QaDcj/jDxvKvBZ23YI4nNWPidGWdCZu04iEpIMXqYiIxTksuAMSkFfkB3apk ZJNwgAFcYa2SzOEY3QlidhM/gS38dJOgij7rtkjVIAEvNCbD7oqDORvjtXbT75j+fMmB xbTY1OfTYWZV8geirAlk3vhEs4w3blN39LZCKBzOfivoqLpxV00FZVAmTFNN6YFUSW01 +dYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=1KloQjGmkbRl50KmGneRd/ko6fDK65hd7ZW5J/tAhcU=; b=HbdrUFGSwlYnc3weqocyqPz9sK2vaWaCvVWWXPXiKyD3/KlffrWukq+gahVfLB8x8u d4ZtcAYMoMIcfouWpTq9T5Oky0afK0qEgV92r3LqD4q+iQk1YxYcyRPVGNFD5xR3sund UlK1ODF6CLuaP/4LU4jSztwX/cVAFEy16yRIYdLXpI8i4hB9VGNSj1UMzytdJsJ8ldqZ OTgf/5jdVFsxAwceW1oUR0gedG2LkZSN0umhdBS53GEfJuX+Jy3d3fjhsoDg+95G1+7Y LV4YCM7v5uxgsQ14JQQeWoUDA3apgLgDdgEG/pxaGz/HCfWbqR7IJPmdeH8X4xo3djoo k0LQ== X-Gm-Message-State: ACrzQf18Yv8Vi8x7XK2g1obKZh2CXZhp9a+xUFTo93frzJdEu8NO9UuE rjJK0tdeu1gNycFW14lVvewb3f0pXFU= X-Google-Smtp-Source: AMsMyM7OxFZI7Ep8LSSWMgqMoPJKLXAdfRQl4nOZYnPuTHIvP/qocCUOcpqnxv3+gup/AF/6mTBYaA== X-Received: by 2002:a05:6e02:2162:b0:2ee:872b:2061 with SMTP id s2-20020a056e02216200b002ee872b2061mr8860371ilv.256.1663641442385; Mon, 19 Sep 2022 19:37:22 -0700 (PDT) Received: from localhost ([2607:fea8:a2e2:2d00::58d4]) by smtp.gmail.com with UTF8SMTPSA id x17-20020a92cc91000000b002f5447b47f8sm195048ilo.33.2022.09.19.19.37.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Sep 2022 19:37:21 -0700 (PDT) From: Richard Acayan To: linux-arm-msm@vger.kernel.org Cc: Bjorn Andersson , Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Taniya Das , linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: clock: add rpmhcc bindings for sdm670 Date: Mon, 19 Sep 2022 22:37:08 -0400 Message-Id: <20220920023709.4865-2-mailingradian@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220920023709.4865-1-mailingradian@gmail.com> References: <20220920023709.4865-1-mailingradian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Snapdragon 670 uses the RPMh mailbox for some clocks. Document its support. Signed-off-by: Richard Acayan Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml index 8fcaf418f84a..437a34b930e3 100644 --- a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml @@ -21,6 +21,7 @@ properties: - qcom,sc7280-rpmh-clk - qcom,sc8180x-rpmh-clk - qcom,sc8280xp-rpmh-clk + - qcom,sdm670-rpmh-clk - qcom,sdm845-rpmh-clk - qcom,sdx55-rpmh-clk - qcom,sdx65-rpmh-clk From patchwork Tue Sep 20 02:37:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Acayan X-Patchwork-Id: 12981254 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 78236C6FA8B for ; Tue, 20 Sep 2022 02:37:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbiITCh1 (ORCPT ); Mon, 19 Sep 2022 22:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbiITCh0 (ORCPT ); Mon, 19 Sep 2022 22:37:26 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFA2D46231; Mon, 19 Sep 2022 19:37:25 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id g6so685718ild.6; Mon, 19 Sep 2022 19:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=P1/PWyZC7cH6dybv83f3MjBvFzTbkhJTNLgRxtu1aIA=; b=FZ5dSx8ihzsVAheNEgOv3NgjP7xNmlAAZzyIclGFKdW4zzVkGVo2C10jzlpZiwh5v4 UHeomiiPjdxgm6+ZrncIKsDaJthTKCuhte+QGOpuvyBCHORXqv32ZjWRMLVoeJiXi887 dAgw0x/0KAF3bFTifUhsdWU2RbRQfZCwCXGo76DaYAUNSmDIEn6p5+az+ee/DE4mhFpo p/sUkZEs8T3XIjwJRUODCiz3El3/gO7gJth0LMHDXqYHkkQqZwdVDHyyWGTJX0Iz7EtB 5Mbf1bPfHn0kKqxxeiR0SQ5BnzYOBmXp2JsmY74ttgw2/a7sJEw1kciDv2yA36huWOc/ hxbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=P1/PWyZC7cH6dybv83f3MjBvFzTbkhJTNLgRxtu1aIA=; b=gYT2PZW7T5Gl6yhA3FHhQgOLEkd2Bmvr8Xe8P6nI/Fm0hw85+nXxCx/q9+9+de5n9X OZN1D1K77klOQlSZEYTs5vN4cmY+r+aC1+j4g/xMPAEJWmbIQ3hqhxHRmLGent9xo87m 0kZIELM4injMEnY8Yb8lIoCFxe2Z7pCliET9F8uzCTW3/DBwo/OZTRmUUI8Fo1UF6Kov BadaBFdGL6lpBXEXdW1Ri1fahuvcBDtQo4KwWZhUCdbaQ1kY2Hu2JQ+1y4Eky9PXN5Oe Yp7i9F5uxBh0OYoEcyON7P74N541EmVXYSyDmstgCeqysP2KVwwftibi+p21tyTUlgBC f5Sg== X-Gm-Message-State: ACrzQf1oeg8SYtgBx+OTEXxbOXDWsaXYqBqELwXOWxxzDgnp8Sahw/Pu KyBm9qqYsdW2LGZxJxAkEN2aMbHp8p0= X-Google-Smtp-Source: AMsMyM4q6NzEVmH4wSVhGVzZfBL0trXYkdZUb5qpcrUPC8AAxr/0T05xrtIaF9QAV1BcKQJBfWIQtQ== X-Received: by 2002:a05:6e02:1074:b0:2f6:15d9:4719 with SMTP id q20-20020a056e02107400b002f615d94719mr1761756ilj.123.1663641444930; Mon, 19 Sep 2022 19:37:24 -0700 (PDT) Received: from localhost ([2607:fea8:a2e2:2d00::58d4]) by smtp.gmail.com with UTF8SMTPSA id x14-20020a02908e000000b00349c8fe9109sm141060jaf.174.2022.09.19.19.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Sep 2022 19:37:24 -0700 (PDT) From: Richard Acayan To: linux-arm-msm@vger.kernel.org Cc: Bjorn Andersson , Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Taniya Das , linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] clk: qcom: rpmhcc: add sdm670 clocks Date: Mon, 19 Sep 2022 22:37:09 -0400 Message-Id: <20220920023709.4865-3-mailingradian@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220920023709.4865-1-mailingradian@gmail.com> References: <20220920023709.4865-1-mailingradian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Snapdragon 670 uses the RPMh mailbox for most of the clocks used in SDM845 but omits two. Add clock data for SDM670 so the driver doesn't fail to resolve a clock. Link: https://android.googlesource.com/kernel/msm/+/444bd8d6e2cf54698234c752e6de97b4b8a528bd%5E%21/#F7 Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio --- drivers/clk/qcom/clk-rpmh.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index 9739aab0fe82..0471bab82464 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -378,6 +378,26 @@ static const struct clk_rpmh_desc clk_rpmh_sdm845 = { .num_clks = ARRAY_SIZE(sdm845_rpmh_clocks), }; +static struct clk_hw *sdm670_rpmh_clocks[] = { + [RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw, + [RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw, + [RPMH_LN_BB_CLK2] = &sdm845_ln_bb_clk2.hw, + [RPMH_LN_BB_CLK2_A] = &sdm845_ln_bb_clk2_ao.hw, + [RPMH_LN_BB_CLK3] = &sdm845_ln_bb_clk3.hw, + [RPMH_LN_BB_CLK3_A] = &sdm845_ln_bb_clk3_ao.hw, + [RPMH_RF_CLK1] = &sdm845_rf_clk1.hw, + [RPMH_RF_CLK1_A] = &sdm845_rf_clk1_ao.hw, + [RPMH_RF_CLK2] = &sdm845_rf_clk2.hw, + [RPMH_RF_CLK2_A] = &sdm845_rf_clk2_ao.hw, + [RPMH_IPA_CLK] = &sdm845_ipa.hw, + [RPMH_CE_CLK] = &sdm845_ce.hw, +}; + +static const struct clk_rpmh_desc clk_rpmh_sdm670 = { + .clks = sdm670_rpmh_clocks, + .num_clks = ARRAY_SIZE(sdm670_rpmh_clocks), +}; + DEFINE_CLK_RPMH_VRM(sdx55, rf_clk1, rf_clk1_ao, "rfclkd1", 1); DEFINE_CLK_RPMH_VRM(sdx55, rf_clk2, rf_clk2_ao, "rfclkd2", 1); DEFINE_CLK_RPMH_BCM(sdx55, qpic_clk, "QP0"); @@ -711,6 +731,7 @@ static const struct of_device_id clk_rpmh_match_table[] = { { .compatible = "qcom,sc8180x-rpmh-clk", .data = &clk_rpmh_sc8180x}, { .compatible = "qcom,sc8280xp-rpmh-clk", .data = &clk_rpmh_sc8280xp}, { .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845}, + { .compatible = "qcom,sdm670-rpmh-clk", .data = &clk_rpmh_sdm670}, { .compatible = "qcom,sdx55-rpmh-clk", .data = &clk_rpmh_sdx55}, { .compatible = "qcom,sdx65-rpmh-clk", .data = &clk_rpmh_sdx65}, { .compatible = "qcom,sm6350-rpmh-clk", .data = &clk_rpmh_sm6350},