Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25461rwd; Wed, 14 Jun 2023 11:40:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6k1dJFh4VZKmqNY5nUsCKmTPPRZXK9E2YlCMx8Yvb7xTkoM+qr6Xo2v2HUtngk6TsXa3Jt X-Received: by 2002:a17:90a:c206:b0:25b:c91e:8bf2 with SMTP id e6-20020a17090ac20600b0025bc91e8bf2mr1804809pjt.49.1686768002819; Wed, 14 Jun 2023 11:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686768002; cv=none; d=google.com; s=arc-20160816; b=sIqb58o4uU5ZLRNaHDUpwVj5t/g0noQZUjuZMh0tAQQdLS8fkoSB61jG/Vi4yRHyT1 m/dehzImRWgz6PsBTGNPuZp0qieZkB+AueA3icfE8SiDZilyiOQG+PaAuR6W33NDA2Vj x3OMVfN9tJY1NHlh9SxxRFSt6hQTYaR7V+7c9x18beFvYumGK073rajzPTMo+qmPpezN QXH3qjIL6Il9lQ4o20YJLmFTCfZIBgWeZzHqRW74gcz7FVkigp5Cy9rdsqVZoRO9Vpbg f8JvSs3Dp+vSZp7d3r8kLJEwQvLFnf3LkgvcTM5dKuYxN/GKAjRW/nTJn2xvwKzUwSzK 6XJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Hw4WRawxs1UeInGhZDq9K62HhD6piBeFrd3LBHFgURY=; b=esXr0zzphNLAyqlnSr1tPOk9wybYTyfyU/upw0mOB8gNXqhBxGuJu8T5Qow920QT6i WRove4HlKHLY+bg/RMrFilNl/mOjGNMLXbNd5nFW7XWKOxaPYzwbnQGh5d5TkeIpEtlU HyYPwKaawgVVVLDgAAlZQIxkyMG+OR4hVovs/ybSC11a8YUQ3Fp0fW4wauDndP6c9jOG mZJ12brfdkz97nt8gp7nY9iXibxna9uTgqRrA+kkgp2m2dEGQThCb0RaFUs6jG8EFzsx C2zNMpMeGlemb1UYoNZnYNmzE6SjxTsm/BA7J0VNhOz/G6xXAwGK7NDGm5hw8BdMkTE/ /Azg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pbYsJNTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a17090abe1300b0025c1af5672fsi3786861pjs.112.2023.06.14.11.39.50; Wed, 14 Jun 2023 11:40:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pbYsJNTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237251AbjFNSGK (ORCPT + 99 others); Wed, 14 Jun 2023 14:06:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239942AbjFNSE4 (ORCPT ); Wed, 14 Jun 2023 14:04:56 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A1A2682 for ; Wed, 14 Jun 2023 11:04:51 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4f7deee339dso339460e87.0 for ; Wed, 14 Jun 2023 11:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686765889; x=1689357889; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Hw4WRawxs1UeInGhZDq9K62HhD6piBeFrd3LBHFgURY=; b=pbYsJNTMQ3iR6kEkTpcBcb+UBfk2mkKoM/yYugH7xUPXJEwhTh7Mj944P7qIkVh2Hj jwA4zNW+QEx+j7jsn9nX7+iocdQNYq3EZDpPjzRhHEZ2r1G+0EERithXjVroBKrDOmnY Vss/IDYquOv1b9P1grInln+HdMGZZVL/2Z83SpoB7PJnBomb4h3v6avqvmmqD732E3rs +KzGIZyR21ttBKm5lfk9pnlAm0ct7splb3CaD44aGYUyBNlr8kQvwjxKMdbNZd/4OvZR XfujlS1i/h4rer0j2yUBbZ9jmKio5QcIhP96lrqeJ+94bRlqhRNALOLKNLPqe0Rq40ln xUcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686765889; x=1689357889; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hw4WRawxs1UeInGhZDq9K62HhD6piBeFrd3LBHFgURY=; b=jvEb+FJAyLObICVc/2yUB0sa5gLCGNDI80zwUXD0tbMZP3bstH38If4BbfDj12w5Bz zyUlKIg9/RfCghYfy0msMvmvBoB74J9dvfQYNQQRa0y0BgC1qMJLsve023zxrgHKoi/E 3f9zpBTGGnrE13cl/maISzx05Rb3vAePvwTpuUhjp3tiItCWbEucEjtnBjM8OO1xQc02 oJJgZQ5Pxr9llxO2A9Ip3Vz7+gP7HD/30vgMsyrDSTmRRv/QbhfQ08uOWOPeqhh9codS 1rtpmZc4+jeF7TpdK6bNk+kZ6MaO0CW7XGo1tT6NHfLFJ9Mqw76PLXljRt/MPVsQj5Us LXkA== X-Gm-Message-State: AC+VfDxqnsOSZFiZ6xB8IUzELj5qluHQhNAPhqH8ss9MJJtGY8z5DCQB myqY+GV7jr2BPtXvqhS2wFAsJg== X-Received: by 2002:ac2:5b91:0:b0:4f6:14d1:5967 with SMTP id o17-20020ac25b91000000b004f614d15967mr7801175lfn.61.1686765889340; Wed, 14 Jun 2023 11:04:49 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id l18-20020a19c212000000b004eff1f7f206sm2224053lfc.9.2023.06.14.11.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 11:04:49 -0700 (PDT) From: Konrad Dybcio Date: Wed, 14 Jun 2023 20:04:29 +0200 Subject: [PATCH v6 10/22] interconnect: qcom: Define RPM bus clocks MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230526-topic-smd_icc-v6-10-263283111e66@linaro.org> References: <20230526-topic-smd_icc-v6-0-263283111e66@linaro.org> In-Reply-To: <20230526-topic-smd_icc-v6-0-263283111e66@linaro.org> To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Georgi Djakov , Leo Yan , Evan Green , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686765872; l=4129; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=R3Hln5kTqJLo0KxW3WBSL1gR8+B0i+HAtxkzQwO6Pts=; b=ysKIixDFpTluliq5pwu676opWfqMJ2lADTjj2uk9IeIs2mDdxdvz460SAWAD4CaWPV29zQ0Wj xR7D6va7REuAlY7On5IrJj7ldldbDrj4dF3JD5OU9tInrgar5ovXoEy X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the definitions for RPM bus clocks that will be used by many different platforms. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/Makefile | 2 +- drivers/interconnect/qcom/icc-rpm-clocks.c | 77 ++++++++++++++++++++++++++++++ drivers/interconnect/qcom/icc-rpm.h | 13 +++++ 3 files changed, 91 insertions(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/Makefile b/drivers/interconnect/qcom/Makefile index ab988926433c..80d9d2da95d1 100644 --- a/drivers/interconnect/qcom/Makefile +++ b/drivers/interconnect/qcom/Makefile @@ -29,7 +29,7 @@ qnoc-sm8250-objs := sm8250.o qnoc-sm8350-objs := sm8350.o qnoc-sm8450-objs := sm8450.o qnoc-sm8550-objs := sm8550.o -icc-smd-rpm-objs := smd-rpm.o icc-rpm.o +icc-smd-rpm-objs := smd-rpm.o icc-rpm.o icc-rpm-clocks.o obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += qnoc-msm8916.o diff --git a/drivers/interconnect/qcom/icc-rpm-clocks.c b/drivers/interconnect/qcom/icc-rpm-clocks.c new file mode 100644 index 000000000000..63c82a91bbc7 --- /dev/null +++ b/drivers/interconnect/qcom/icc-rpm-clocks.c @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2023 Linaro Ltd + */ + +#include + +#include "icc-rpm.h" + +const struct rpm_clk_resource aggre1_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 1, +}; +EXPORT_SYMBOL_GPL(aggre1_clk); + +const struct rpm_clk_resource aggre2_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 2, +}; +EXPORT_SYMBOL_GPL(aggre2_clk); + +const struct rpm_clk_resource bimc_clk = { + .resource_type = QCOM_SMD_RPM_MEM_CLK, + .clock_id = 0, +}; +EXPORT_SYMBOL_GPL(bimc_clk); + +const struct rpm_clk_resource bus_0_clk = { + .resource_type = QCOM_SMD_RPM_BUS_CLK, + .clock_id = 0, +}; +EXPORT_SYMBOL_GPL(bus_0_clk); + +const struct rpm_clk_resource bus_1_clk = { + .resource_type = QCOM_SMD_RPM_BUS_CLK, + .clock_id = 1, +}; +EXPORT_SYMBOL_GPL(bus_1_clk); + +const struct rpm_clk_resource bus_2_clk = { + .resource_type = QCOM_SMD_RPM_BUS_CLK, + .clock_id = 2, +}; +EXPORT_SYMBOL_GPL(bus_2_clk); + +const struct rpm_clk_resource mmaxi_0_clk = { + .resource_type = QCOM_SMD_RPM_MMAXI_CLK, + .clock_id = 0, +}; +EXPORT_SYMBOL_GPL(mmaxi_0_clk); + +const struct rpm_clk_resource mmaxi_1_clk = { + .resource_type = QCOM_SMD_RPM_MMAXI_CLK, + .clock_id = 1, +}; +EXPORT_SYMBOL_GPL(mmaxi_1_clk); + +const struct rpm_clk_resource qup_clk = { + .resource_type = QCOM_SMD_RPM_QUP_CLK, + .clock_id = 0, +}; +EXPORT_SYMBOL_GPL(qup_clk); + +/* Branch clocks */ +const struct rpm_clk_resource aggre1_branch_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 1, + .branch = true, +}; +EXPORT_SYMBOL_GPL(aggre1_branch_clk); + +const struct rpm_clk_resource aggre2_branch_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 2, + .branch = true, +}; +EXPORT_SYMBOL_GPL(aggre2_branch_clk); diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index 5c43a8023ffa..ecd6104335a7 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -137,6 +137,19 @@ enum qos_mode { NOC_QOS_MODE_BYPASS, }; +extern const struct rpm_clk_resource aggre1_clk; +extern const struct rpm_clk_resource aggre2_clk; +extern const struct rpm_clk_resource bimc_clk; +extern const struct rpm_clk_resource bus_0_clk; +extern const struct rpm_clk_resource bus_1_clk; +extern const struct rpm_clk_resource bus_2_clk; +extern const struct rpm_clk_resource mmaxi_0_clk; +extern const struct rpm_clk_resource mmaxi_1_clk; +extern const struct rpm_clk_resource qup_clk; + +extern const struct rpm_clk_resource aggre1_branch_clk; +extern const struct rpm_clk_resource aggre2_branch_clk; + int qnoc_probe(struct platform_device *pdev); int qnoc_remove(struct platform_device *pdev); -- 2.41.0