From patchwork Thu Oct 31 11:29:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11221073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14EA41668 for ; Thu, 31 Oct 2019 11:30:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E78B4208C0 for ; Thu, 31 Oct 2019 11:29:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cnf2dvm5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726677AbfJaL37 (ORCPT ); Thu, 31 Oct 2019 07:29:59 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38618 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfJaL37 (ORCPT ); Thu, 31 Oct 2019 07:29:59 -0400 Received: by mail-wm1-f65.google.com with SMTP id z19so1350956wmk.3; Thu, 31 Oct 2019 04:29:57 -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=085bmSl01OMFBIIZZqeSQwIRLRP5SejXg7Kp0q59UNc=; b=cnf2dvm5r/pkKFmA181xCkWtE9edK5RA5p+BltyIBC9F+MbmhBOCbzTX4NLVZtwZsL iJ7mPF9A4DrW5k4M2y32pjlDJKEPKkaZK4+BBY4MVmwrjbrATCclW/JnW+iEtClDt8Cf gPZC8UnaUz5ZC4Xjh8+Tk5cMV92QBTzWuVpkUoLJC+RKuL7dwUII4EQrJngQ96NsTlz4 Wm4JIB/IoEdYL+7Wf+uOk5UHfYEYR0Iflvv9tI96qCimYUjfpvXikzwzhLXoBnpybBgE SGKDzjCpFwFJluv+KKPHXL/gFPpKgFKBzIybH/NFK0DKuDnFKIoj2rEVw0UKExEVziER 556w== 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=085bmSl01OMFBIIZZqeSQwIRLRP5SejXg7Kp0q59UNc=; b=N+5jmiYziP7/Wu5WsZEu4k3WdmFgWJ8xDzVnEPcoogPtQ706imoyWBO9zM5ZVCGbBT Y7gMwKNpxG0SrllhgviIdlrMt1kHW2Y9Zv7lfcrxfcNVYOm7BigQQMZI4HtR9XSN20Kq Q1xV/ExZK40Ey5KJoemfxFY7NlJ1ptOsFBsJB19VVNkbXVC/MX5IOJub3a4UegRPnzBy En32Q0E/aT5jByorJIWR0BA9vLIVwOJQebCdA9TXufEA5ttGa0NGE1H6mEr61Z9SH71E IPuiC2D2pgrmn/ainaO594cfoWcKu91TubHyq/ltBbcXGOTYXqMEz1wbzHDJSa8VGyOg cA+A== X-Gm-Message-State: APjAAAXJOu5dIRMdJC5pJLzo8yenxOgG2vsiE1iEBSAsgXo0sI5f5S1y S3gxqJoiyXweiynRbGbHjgoUAzYclis= X-Google-Smtp-Source: APXvYqxOT/yPqdzRH5tfxbF0D8sY2C5rJBp+Wg0KnMiykXnHPsy8G8W8nxs+s6s3uKD91XGFxwjk+A== X-Received: by 2002:a1c:7f54:: with SMTP id a81mr4712017wmd.48.1572521395990; Thu, 31 Oct 2019 04:29:55 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id r13sm4563586wra.74.2019.10.31.04.29.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Oct 2019 04:29:54 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, agross@kernel.org, mturquette@baylibre.com, bjorn.andersson@linaro.org, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/2] clk: qcom: smd: Add support for MSM8976 rpm clocks Date: Thu, 31 Oct 2019 12:29:50 +0100 Message-Id: <20191031112951.35850-2-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191031112951.35850-1-kholk11@gmail.com> References: <20191031112951.35850-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: AngeloGioacchino Del Regno Add rpm smd clocks, PMIC and bus clocks which are required on MSM8976, MSM8956 (and APQ variants) for clients to vote on. Signed-off-by: AngeloGioacchino Del Regno --- drivers/clk/qcom/clk-smd-rpm.c | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c index fef5e8157061..d8ae38daff63 100644 --- a/drivers/clk/qcom/clk-smd-rpm.c +++ b/drivers/clk/qcom/clk-smd-rpm.c @@ -523,6 +523,55 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8974 = { .num_clks = ARRAY_SIZE(msm8974_clks), }; + +/* msm8976 */ +DEFINE_CLK_SMD_RPM(msm8976, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0); +DEFINE_CLK_SMD_RPM(msm8976, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1); +DEFINE_CLK_SMD_RPM(msm8976, mmssnoc_ahb_clk, mmssnoc_ahb_a_clk, + QCOM_SMD_RPM_BUS_CLK, 2); +DEFINE_CLK_SMD_RPM(msm8976, bimc_clk, bimc_a_clk, QCOM_SMD_RPM_MEM_CLK, 0); +DEFINE_CLK_SMD_RPM(msm8976, ipa_clk, ipa_a_clk, QCOM_SMD_RPM_IPA_CLK, 0); +DEFINE_CLK_SMD_RPM_QDSS(msm8976, qdss_clk, qdss_a_clk, + QCOM_SMD_RPM_MISC_CLK, 1); +DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, bb_clk1, bb_clk1_a, 1); +DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, bb_clk2, bb_clk2_a, 2); +DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, rf_clk2, rf_clk2_a, 5); +DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8976, div_clk2, div_clk2_a, 12); +DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8976, bb_clk1_pin, bb_clk1_a_pin, 1); +DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8976, bb_clk2_pin, bb_clk2_a_pin, 2); + +static struct clk_smd_rpm *msm8976_clks[] = { + [RPM_SMD_PCNOC_CLK] = &msm8976_pcnoc_clk, + [RPM_SMD_PCNOC_A_CLK] = &msm8976_pcnoc_a_clk, + [RPM_SMD_SNOC_CLK] = &msm8976_snoc_clk, + [RPM_SMD_SNOC_A_CLK] = &msm8976_snoc_a_clk, + [RPM_SMD_BIMC_CLK] = &msm8976_bimc_clk, + [RPM_SMD_BIMC_A_CLK] = &msm8976_bimc_a_clk, + [RPM_SMD_QDSS_CLK] = &msm8976_qdss_clk, + [RPM_SMD_QDSS_A_CLK] = &msm8976_qdss_a_clk, + [RPM_SMD_BB_CLK1] = &msm8976_bb_clk1, + [RPM_SMD_BB_CLK1_A] = &msm8976_bb_clk1_a, + [RPM_SMD_BB_CLK2] = &msm8976_bb_clk2, + [RPM_SMD_BB_CLK2_A] = &msm8976_bb_clk2_a, + [RPM_SMD_RF_CLK2] = &msm8976_rf_clk2, + [RPM_SMD_RF_CLK2_A] = &msm8976_rf_clk2_a, + [RPM_SMD_BB_CLK1_PIN] = &msm8976_bb_clk1_pin, + [RPM_SMD_BB_CLK1_A_PIN] = &msm8976_bb_clk1_a_pin, + [RPM_SMD_BB_CLK2_PIN] = &msm8976_bb_clk2_pin, + [RPM_SMD_BB_CLK2_A_PIN] = &msm8976_bb_clk2_a_pin, + [RPM_SMD_MMSSNOC_AHB_CLK] = &msm8976_mmssnoc_ahb_clk, + [RPM_SMD_MMSSNOC_AHB_A_CLK] = &msm8976_mmssnoc_ahb_a_clk, + [RPM_SMD_DIV_CLK2] = &msm8976_div_clk2, + [RPM_SMD_DIV_A_CLK2] = &msm8976_div_clk2_a, + [RPM_SMD_IPA_CLK] = &msm8976_ipa_clk, + [RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk, +}; + +static const struct rpm_smd_clk_desc rpm_clk_msm8976 = { + .clks = msm8976_clks, + .num_clks = ARRAY_SIZE(msm8976_clks), +}; + /* msm8996 */ DEFINE_CLK_SMD_RPM(msm8996, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0); DEFINE_CLK_SMD_RPM(msm8996, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1); @@ -712,6 +761,7 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8998 = { static const struct of_device_id rpm_smd_clk_match_table[] = { { .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 }, { .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 }, + { .compatible = "qcom,rpmcc-msm8976", .data = &rpm_clk_msm8976 }, { .compatible = "qcom,rpmcc-msm8996", .data = &rpm_clk_msm8996 }, { .compatible = "qcom,rpmcc-msm8998", .data = &rpm_clk_msm8998 }, { .compatible = "qcom,rpmcc-qcs404", .data = &rpm_clk_qcs404 }, From patchwork Thu Oct 31 11:29:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11221077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F6D117E6 for ; Thu, 31 Oct 2019 11:30:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C9812086D for ; Thu, 31 Oct 2019 11:30:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pa0y0BDf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbfJaL37 (ORCPT ); Thu, 31 Oct 2019 07:29:59 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33217 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfJaL37 (ORCPT ); Thu, 31 Oct 2019 07:29:59 -0400 Received: by mail-wr1-f68.google.com with SMTP id s1so5865788wro.0; Thu, 31 Oct 2019 04:29:57 -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=Ro53YB+MKod/Y42OOMgHzLxbEZJXl+SagwYe7xZuvMo=; b=pa0y0BDfbi5Zscq0yZu1N18Y2EDGD7Rdpm3U4pMstfiv1MDH5GTX5wJqGhBhptglo+ RwGkGc/nyMbfXU8PrCTtk8cHyJLnXSR285Zs2OXpINcS2GKZCGIjRothWjPN+zSeM3fW seo1T1QIrlhKNBb/3efE8JoR3ejrV/F2UNM4lPblBOGSxHUTDANmKJUwI7lgrKGQ4IGE HvZ62cKFB3uC46QM3zWxMWBMnxL9UuGcVRTk+f7XTEliXGZsjh8uTT+v5XKhYi+CcM3A BBvniP0QkINKaJkuvGhIAMIBLaWOpR4L4BnnlV6JaQZCXoKZG2/nr+8V6hrVRSgVhv3h J8xA== 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=Ro53YB+MKod/Y42OOMgHzLxbEZJXl+SagwYe7xZuvMo=; b=GooJebXmOU4W3Q169h0UAIkuZhBqzv2cs5QBTq0iaiEJGEbgjEjwvEvw//j3cGZyKO sSwHqT1yqDn15zTiLA743Zl7mbCEcdDmp26N9r1/bZd1Ri4ZUeykMYy6zx60rMMqr7RA 7UJhJ2N8kUqOUQzhe/y6Zioa20te07IQZVNjz+ESNGdRUP+Zc2b9HBZLqpwyOfn79elA ohTrIq1b4NgBLBb4joC7ATR24HxlemdBNu0iqaXhx+WxnqsAyzPaOFzQwyuAAymABO1b GdDddZME6/fjbw4VKPX1ra3E71y4gF5836Vs0vm3Gn9px9nOHWsjxK1RAaoBzfJmAmDU 30Jw== X-Gm-Message-State: APjAAAUbKbINu1BRhbWW2xEXL8Cofm4XMdL2hBYFqMQ54meX3FsfeaSh LFRXz1mW7LvpJ1mWXSlfz6sB5MJ3Cj4= X-Google-Smtp-Source: APXvYqw8evn6JduYCXCmfwMv/bQgxouPphyHjCR7CCpd1qVlYHDdoH2YSXDpXVl6Dk8JYcug3q1Jiw== X-Received: by 2002:adf:9481:: with SMTP id 1mr5095177wrr.77.1572521396878; Thu, 31 Oct 2019 04:29:56 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([93.51.16.173]) by smtp.gmail.com with ESMTPSA id r13sm4563586wra.74.2019.10.31.04.29.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Oct 2019 04:29:56 -0700 (PDT) From: kholk11@gmail.com To: linux-arm-msm@vger.kernel.org Cc: kholk11@gmail.com, marijns95@gmail.com, agross@kernel.org, mturquette@baylibre.com, bjorn.andersson@linaro.org, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: clock: rpmcc: Document msm8976 compatible Date: Thu, 31 Oct 2019 12:29:51 +0100 Message-Id: <20191031112951.35850-3-kholk11@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191031112951.35850-1-kholk11@gmail.com> References: <20191031112951.35850-1-kholk11@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: AngeloGioacchino Del Regno Support for MSM8976 was added to the clk-smd-rpm driver: let's document here the newly added compatible string. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring --- Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt index 944719bd586f..356cabcd844d 100644 --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt @@ -14,6 +14,7 @@ Required properties : "qcom,rpmcc-apq8060", "qcom,rpmcc" "qcom,rpmcc-msm8916", "qcom,rpmcc" "qcom,rpmcc-msm8974", "qcom,rpmcc" + "qcom,rpmcc-msm8976", "qcom,rpmcc" "qcom,rpmcc-apq8064", "qcom,rpmcc" "qcom,rpmcc-msm8996", "qcom,rpmcc" "qcom,rpmcc-msm8998", "qcom,rpmcc"