From patchwork Tue Aug 8 11:43:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 132590 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2281314vqr; Tue, 8 Aug 2023 10:32:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEI1eLfLeFaRTPlAVUe10+AeGexwbNMT7Ar1UeMpLczNjXusikLAJviu2WODydTnPUylq2R X-Received: by 2002:a05:6402:1a53:b0:521:7ab6:b95d with SMTP id bf19-20020a0564021a5300b005217ab6b95dmr426946edb.29.1691515954741; Tue, 08 Aug 2023 10:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691515954; cv=none; d=google.com; s=arc-20160816; b=JecPZiRVD61GEhM6lKYCk18CXtXcBc0OJeGTZFPxeK+5zAs9zXLnOgsTc1k7H8899Y r+bf3hKflzlxxZ8bEfxp1YJm4gK0HHB7YVPOWM4Z94KgQf8VLQqJmHEGQ7xd1SROcgut KbeF52IlNC8ikMhphtPcdMhZaH4CjAqqWBST56IY4GLS0Zj9/pNu2c07Oh314MAxLyA/ NNUJdW415JtTDM99tJF5ycwwUdwFxJUKJEbV2r8VdjkS/Rg61ZeRDjkHNmdpy82zjfy3 r2Re6EVEvwX+T8lfPwSr92Yl9qDjA3SZZF4+VdOLO9XvxYM+hS134QXZiVDnrBjdwykc +nRA== 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=gCx8RlEOFx8UDQtGNW/6cgXaxJHTs4rAU1l6hTQLDFk=; fh=eQYZoDkT5yiXC4FOuYG6Kem76e5j3IG0APJeW7cmDrc=; b=gh44KHYazNHivoRwIqyBU9sPQT8aNPwskl0G7lrjKH97KWsVX8po2uQ4MleiHfncpq tWfQXF4Tj32wLDSdBOgNnRDkSvudrh648tsW3LZam6guwiAGp+ImebxJ/TETkWLu+0bt KUd+XkC0Oo6FX+MmRt2T9q+U8IWiZBxeot7yGEQP8CnO6i+UCrqavDMDfIdr+X+KE/J4 ElEHGkfn8/wHJYAYaZPcZfyCfMf6esQiM9cCxFGgIp1vQQgSrpMNdhvUiE5/fC+79Oa6 GINl96swIGejDwRpTDLNVB8Zr/tja9nEQqvO2Fdbh9EYTsvdLec9EvQ/UpAUpRdLtwyt ekYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FTmSYdVA; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l23-20020a056402125700b0052247666986si7945528edw.434.2023.08.08.10.32.11; Tue, 08 Aug 2023 10:32:34 -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=FTmSYdVA; 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 S234118AbjHHRPP (ORCPT + 99 others); Tue, 8 Aug 2023 13:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234123AbjHHROf (ORCPT ); Tue, 8 Aug 2023 13:14:35 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34392718 for ; Tue, 8 Aug 2023 09:06:03 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-99bf8e5ab39so865713566b.2 for ; Tue, 08 Aug 2023 09:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691510762; x=1692115562; 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=gCx8RlEOFx8UDQtGNW/6cgXaxJHTs4rAU1l6hTQLDFk=; b=FTmSYdVA9TWOG/QXugmuOOGtZshAt+cwiRPNjpjpBhtNUE2YH7DLctBwkCU9N42G5I zOFNGlSkADItptIisJsOSWOXBLnNwfdnjGSxuU07U+nM8pFgImUr+QKcsIzRUZn9XIj2 RhyOYdtqcA5iTL8vtirwGcIU99VsOTMTLL5b70009C3WzuUCQb11cE5Ax30nxFT8XYZx bQ6lkCCYgzeFkaWt4haSJxoaJ3XV8RkYarQ3qlgPAs9ElZoQcj8WGsvknFSwysbxzdWe V9qV1viKZg1gvylvvLmbdjz6eMok841QTefo9DDxXfsNcdMnwfnBP07DrfmcVJsbAEtY oOHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691510762; x=1692115562; 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=gCx8RlEOFx8UDQtGNW/6cgXaxJHTs4rAU1l6hTQLDFk=; b=juSSSvuMZcx3iUUz8yGBpRUOZubiaLXsVdP1JHvbp2y3rEBhEoPnDVWjxuDzDp/kAU jmXFM6wtTz6RFNgYKRo2VxXT4X55vceLH1WZvz2JF0HzYGgFb9QHSxhBRmmKgr2PQypV bsgUqvzBJmULVw36UErs7hctlzEBA1zBLX6BipHGM/ylQAn5tnJ3Ywj/59Fn9Zp5Jn8x aWX9tlUAG13dDcQLsBypIIGQzs44h0tNnLs5ObrBIfSDTBG8D0YbLWRtQv7P3M1gpbAQ JPzH/zOWa0w8ErhWKB/F1ozl76BWiH1h0IDYLA6B+X6CGeItCImnxSjK33A9dwFN9Xb7 Bz1Q== X-Gm-Message-State: AOJu0Yx3/gpGieeVBRCaZe9gD/dIobish1a8Y+hE0b4RjXj/NdGzxEJK J77FGKAd24R86d3uFee24PxxnWSpaV/4npkdAN4= X-Received: by 2002:a05:6512:2e4:b0:4fe:cca:c6f7 with SMTP id m4-20020a05651202e400b004fe0ccac6f7mr7807040lfq.48.1691495022052; Tue, 08 Aug 2023 04:43:42 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id j20-20020ac253b4000000b004fbdba4b075sm1861679lfh.57.2023.08.08.04.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 04:43:41 -0700 (PDT) From: Konrad Dybcio Date: Tue, 08 Aug 2023 13:43:36 +0200 Subject: [PATCH v3 05/10] interconnect: qcom: qcm2290: Hook up MAS_APPS_PROC's bus clock MIME-Version: 1.0 Message-Id: <20230726-topic-icc_coeff-v3-5-dee684d6cdd2@linaro.org> References: <20230726-topic-icc_coeff-v3-0-dee684d6cdd2@linaro.org> In-Reply-To: <20230726-topic-icc_coeff-v3-0-dee684d6cdd2@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Michael Turquette , Stephen Boyd Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691495013; l=2342; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=baltAV4RoHwcQRz0/eW44USFJNd7n+E9JFHsU6Sjt+4=; b=MAN7N0prQn1s1uUMDQ6ZtSNXTmx17gJ/z3RFDO/h4V4WTWklSZf/hJxh+ULsHiD442q2RovQ8 KHxzAyUUWgKBUDESPgVueFeDu76mSu4J0AXSNzBnfLgjMfDWMV8ZgAD 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773683034144011709 X-GMAIL-MSGID: 1773683034144011709 This single node has its own clock which seems to be responsible for transactions between CPUSS (CPU + some stuff) and the GNOC. See [1] for reference. Define it and hook it up. [1] https://android.googlesource.com/kernel/msm-extra/devicetree/+/02f8c342b23c20a5cf967df649814be37a08227c%5E%21/#F0 Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm-clocks.c | 6 ++++++ drivers/interconnect/qcom/icc-rpm.h | 1 + drivers/interconnect/qcom/qcm2290.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/drivers/interconnect/qcom/icc-rpm-clocks.c b/drivers/interconnect/qcom/icc-rpm-clocks.c index 63c82a91bbc7..ac1677de7dfd 100644 --- a/drivers/interconnect/qcom/icc-rpm-clocks.c +++ b/drivers/interconnect/qcom/icc-rpm-clocks.c @@ -25,6 +25,12 @@ const struct rpm_clk_resource bimc_clk = { }; EXPORT_SYMBOL_GPL(bimc_clk); +const struct rpm_clk_resource mem_1_clk = { + .resource_type = QCOM_SMD_RPM_MEM_CLK, + .clock_id = 1, +}; +EXPORT_SYMBOL_GPL(mem_1_clk); + const struct rpm_clk_resource bus_0_clk = { .resource_type = QCOM_SMD_RPM_BUS_CLK, .clock_id = 0, diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index 4abf99ce2690..a13768cfd231 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -152,6 +152,7 @@ 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 mem_1_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; diff --git a/drivers/interconnect/qcom/qcm2290.c b/drivers/interconnect/qcom/qcm2290.c index 3c3b24264a5b..52a6eb32e832 100644 --- a/drivers/interconnect/qcom/qcm2290.c +++ b/drivers/interconnect/qcom/qcm2290.c @@ -112,6 +112,9 @@ static struct qcom_icc_node mas_appss_proc = { .qos.qos_mode = NOC_QOS_MODE_FIXED, .qos.prio_level = 0, .qos.areq_prio = 0, + .bus_clk_desc = &mem_1_clk, + .ab_coeff = 159, + .ib_coeff = 96, .mas_rpm_id = 0, .slv_rpm_id = -1, .num_links = ARRAY_SIZE(mas_appss_proc_links),