Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp186201rwd; Mon, 12 Jun 2023 11:58:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hWBrK5iX3/fvFLYvrbUHfYhisgeIHVSjTd2Mkg35SChyMb+OvXqzVoxILQSBsV2BB59tb X-Received: by 2002:a19:e30d:0:b0:4f6:2473:f1cb with SMTP id a13-20020a19e30d000000b004f62473f1cbmr4371403lfh.67.1686596280100; Mon, 12 Jun 2023 11:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686596280; cv=none; d=google.com; s=arc-20160816; b=lKXWVxZZTIjyA7Im5YXA9kTj8t05CnEem9NeIF93B6eVGeoQuzxHnUegQjSyadFARk 2+29UROLN7vmLckg7y8UKN3OgqKydR/hLml8oiwRLybqnRdVgDj10goKxp+RD2bnqbat PoYiXBZhWcydmwMbXFNua8YaJnpNhOYrJOiB0Ym2Sa003E8GKNszjhaUsbFFk5Bk9PsY ZF5PjKZqgpKgWDg416GMS7NvnRyTVcNmiMvat8IB/Fqwp98fO9OKznIXdlEl5ZBASCJV I1A4g9tNF0PvVmlLCmJMH9K3FTsm/uckej+hxPjxaFtscdAs6rFeZlhkyrHIsronae0V dBbg== 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=h+fKLnlHalDuAg33z9Jtbv/mJQQ+EEa4+LdoMppCsko=; b=AjEOeyFi6f+lTleTLOdI98JkS7xKHq7+BLDmwb27ZH565m/YXG5VMJ+fWrEzz4k366 7E0WAgkzz47TFnK2WKXZsf8ZOnPPfcD+qbr6qYAKwhDQWl+WxkWlfzvCG4keqQINIq+c xRyHURVEO1WKDfTTyto89Bf1FCda5c2r2yDyZygvL9Zckz7Kj/GTBIUTYFgKlNdh9toT m8Whhis7sZWsj9cFbUQiFplG8DHiEqIxfLHbgKfGHcxDMT360Pmh6GB5hpdgcDOBtOiU EMVt+NKykGJMefG1PZKBTYCi80imEAVs0H1h5JQq2MF2nyjDEKjgFp9wCC/xbYZIkXLA dCBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=La2OgBxv; 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 l24-20020a056402125800b00514ae068a6bsi5893456edw.625.2023.06.12.11.57.34; Mon, 12 Jun 2023 11:58:00 -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=La2OgBxv; 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 S238364AbjFLS0P (ORCPT + 99 others); Mon, 12 Jun 2023 14:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237817AbjFLSY4 (ORCPT ); Mon, 12 Jun 2023 14:24:56 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB987E69 for ; Mon, 12 Jun 2023 11:24:54 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f62b512fe2so5755358e87.1 for ; Mon, 12 Jun 2023 11:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686594293; x=1689186293; 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=h+fKLnlHalDuAg33z9Jtbv/mJQQ+EEa4+LdoMppCsko=; b=La2OgBxvBFrtW4m4CplAemsIBFvAxmMnIWokZAFiAB+Q697qjtl40sY1Io0vhc5RgD GYMlYKRYh7RIGaVZGmmEbKspnsSxR8R0QoXUlcBvJoAikFOrRij+4ELJAjG/1KKwFjwx LgGFvEoeiTZh/NMFhZOJYeJ4OZNk5dEjCcD+e3o42mxNRiVzWT9D+Pw0NHfnSQT7/dWF 4nhtr6l5omaRV+a8ZI9kmvi3kLzksYMG2AViYtKq9MPDXsTXMGM9J9jR5gil20HRW+qy bi75dm1OCv4vLeFcGfPe+nQGrQju6UZMTZVIDHliFZMfqrxDbNXw+JzPpJj3VVi7yefQ Tkwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686594293; x=1689186293; 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=h+fKLnlHalDuAg33z9Jtbv/mJQQ+EEa4+LdoMppCsko=; b=PJ9Dft/AvbyDQN6jjg8iImGWb6CnekAaDb/j+M8KCDej7q73ZUvOLdC9gRnab9WaVO 835cqbrunuOa8pcnF7dFB8H57fcdGF94tTPgxw7ZjG9dV03atZ6MznJaNZs9+aSUP74z 1x1bY24eV2m+AYhVdGso8KEQhIA4MBp94Zf/nR596qYdcG32fQSV84yLjWe/kSjOCqoK 3XoM/MwJaO8mX+FGc7+8k/20ZgYuXYW4wOo7P3a+bkw3AmTbAWItG7Ku9Y3KbwhBCAPc GlDOPikpmEQi1QlRnOvypsKJ5eybnDM4X4rX2P576M1phmUp1wfsUUIayL4xOJYiW9xl S/dw== X-Gm-Message-State: AC+VfDwoq4j8uOIN/ASDWKFgaz7UzrKOEIlR7w/pY+It3hmBM/iEQs88 NUT98QE03CNae3hWsm5DuK2+ew== X-Received: by 2002:a19:5f16:0:b0:4f6:25a3:95ab with SMTP id t22-20020a195f16000000b004f625a395abmr4056807lfb.25.1686594293179; Mon, 12 Jun 2023 11:24:53 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id v24-20020ac25938000000b004f64073a252sm1502035lfi.96.2023.06.12.11.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 11:24:52 -0700 (PDT) From: Konrad Dybcio Date: Mon, 12 Jun 2023 20:24:28 +0200 Subject: [PATCH v3 11/23] 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-v3-11-5fb7d39b874f@linaro.org> References: <20230526-topic-smd_icc-v3-0-5fb7d39b874f@linaro.org> In-Reply-To: <20230526-topic-smd_icc-v3-0-5fb7d39b874f@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=1686594276; l=3759; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=x0HK0TeLMEP7kpXmLD7jervQe77EX+FiCHoc2go6cXk=; b=RPPe1rZlc5NDivCFl9EM8aDcII2KaEHhRxDvpA2ebjzmGlNHBMAS8MvdmxDBbf7KBp+W7FBR/ jwBVMenGv12Cb72fuyw7x2aoLv1z5QfRLp3nTNsoib2yRCsIDNh5v8b 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 autolearn=unavailable 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 | 66 ++++++++++++++++++++++++++++++ drivers/interconnect/qcom/icc-rpm.h | 13 ++++++ 3 files changed, 80 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..a195bf32aff4 --- /dev/null +++ b/drivers/interconnect/qcom/icc-rpm-clocks.c @@ -0,0 +1,66 @@ +/* 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, +}; + +const struct rpm_clk_resource aggre2_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 2, +}; + +const struct rpm_clk_resource bimc_clk = { + .resource_type = QCOM_SMD_RPM_MEM_CLK, + .clock_id = 0, +}; + +const struct rpm_clk_resource bus_0_clk = { + .resource_type = QCOM_SMD_RPM_BUS_CLK, + .clock_id = 0, +}; + +const struct rpm_clk_resource bus_1_clk = { + .resource_type = QCOM_SMD_RPM_BUS_CLK, + .clock_id = 1, +}; + +const struct rpm_clk_resource bus_2_clk = { + .resource_type = QCOM_SMD_RPM_BUS_CLK, + .clock_id = 2, +}; + +const struct rpm_clk_resource mmaxi_0_clk = { + .resource_type = QCOM_SMD_RPM_MMAXI_CLK, + .clock_id = 0, +}; + +const struct rpm_clk_resource mmaxi_1_clk = { + .resource_type = QCOM_SMD_RPM_MMAXI_CLK, + .clock_id = 1, +}; + +const struct rpm_clk_resource qup_clk = { + .resource_type = QCOM_SMD_RPM_QUP_CLK, + .clock_id = 0, +}; + +/* Branch clocks */ +const struct rpm_clk_resource aggre1_branch_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 1, + .branch = true, +}; + +const struct rpm_clk_resource aggre2_branch_clk = { + .resource_type = QCOM_SMD_RPM_AGGR_CLK, + .clock_id = 2, + .branch = true, +}; diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index 057a1a8b3cb9..99e34f684c85 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -136,6 +136,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