From patchwork Fri May 12 00:13:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 682642 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 C5767C7EE23 for ; Fri, 12 May 2023 00:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239619AbjELANk (ORCPT ); Thu, 11 May 2023 20:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239603AbjELANj (ORCPT ); Thu, 11 May 2023 20:13:39 -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 B32CBE4A for ; Thu, 11 May 2023 17:13:36 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f13bfe257aso10483557e87.3 for ; Thu, 11 May 2023 17:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683850415; x=1686442415; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8vXWsYBVQ6fbfhImzVmNrZ7KIf2Nh83Q0Y/f2HJbonU=; b=ke+VD4d38T34P9YvH3jv5n2uLWRSYlGZkauyTrFcp3JDSLKylhR+SfN0Te14UTX8DW QHmuljjMN0wMmk8GRB+9enMjpqKHug0rekF+pCZYpc7mC3XJNFzvZL0uIYyVrsAX5xYz KuARiQlhvoI3JSWHAZYxhB8R5qLnZcJdbid6I+ZmZGF0ZaTjVxBnm3pSF6KHsrzwWkO3 POJfXt5qWUODtPgE7lb6995kkEyMdL7W6fHTFrjr6aaVgFH9XLlWBXnKqMG5qtubojrU +7jNenQGEnTmwDyc3Y+XOmzo9im2LWG1afZcxADgKcgTLHmt3AlATjFsM3OrI1FciMBP Yw3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683850415; x=1686442415; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8vXWsYBVQ6fbfhImzVmNrZ7KIf2Nh83Q0Y/f2HJbonU=; b=l00VmdaSzJMV+dLD5BxKXlfLIW/8MPc5CPY2Gf7YEapMgQoH8nRRpMJOdW5erB9R5h 7LP2yuS9+AbWu8J8Q1ob049deZJ1B3h362bFlnN0pHckxvxLrftm23WoD8+hRv1qUnuJ Ln2Toij2rNWF8jH/Ud6EtTtO8LGVgL3VkCSbLlEWCo9jkF2V9NGBhXoEixNeCwp+Riou vNwet5deLsz2d/ZJI0FT/h6YqYBdtENYcgJaL50Sk3pEIlpllkOEzVsjf30oHMC2upOP rBixpEZo0kKlzJEA6IZZQQH9TFDuZ7ssw73hsaocDCaueB05p5/xucjkNiFQRdB8b3EY Yj7A== X-Gm-Message-State: AC+VfDybBlSyFTQ9rqRML26bFn+el8SSOp3Q9aZaVxnMrHZeppW80175 bamTIiZ+XcLXTql52653YjZG+A== X-Google-Smtp-Source: ACHHUZ5ipOmBCCs95o29BHFEojWXb4HSYqv5FmFsuBgFkAAsTTATvkiyGaYwFO0c+lQPZh/+g08ZOA== X-Received: by 2002:a05:6512:909:b0:4d8:6540:a731 with SMTP id e9-20020a056512090900b004d86540a731mr2764683lft.47.1683850414945; Thu, 11 May 2023 17:13:34 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p15-20020ac246cf000000b004f13c3cb9ffsm1258109lfo.200.2023.05.11.17.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 17:13:34 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Stephen Boyd , Michael Turquette , Rob Herring , Krzysztof Kozlowski , Taniya Das , Georgi Djakov Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Yassine Oudjana , linux-pm@vger.kernel.org Subject: [PATCH v6 0/4] clk: qcom: msm8996: add support for the CBF clock Date: Fri, 12 May 2023 03:13:30 +0300 Message-Id: <20230512001334.2983048-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On MSM8996 two CPU clusters are interconnected using the Core Bus Fabric (CBF). In order for the CPU clusters to function properly, it should be clocked following the core's frequencies to provide adequate bandwidth. Register CBF as a clock (required for CPU to boot) and add a tiny interconnect layer on top of it to let cpufreq/opp scale the CBF clock. Changes since v5: - Fixed !INTERCONNECT warning (Konrad) - Fixed the sync_state wrapper for !INTERCONNECT case Changes since v4: - Fixed typos in commit messages Changes since v3: - Dropped merged patches - Moved interconnect shim to drivers/interconnect/icc-clk.c Changes since v2: - Added interconnect-related bindings - Switched CPU and CBF clocks to RPM_SMD_XO_A_CLK_SRC Changes since v1: - Relicensed schema to GPL-2.0 + BSD-2-Clause (Krzysztof) - Changed clock driver to use parent_hws (Konrad) - Fixed indentation in CBF clock driver (Konrad) - Changed MODULE_LICENSE of CBF clock driver to GPL from GPL-v2 - Switched CBF to use RPM_SMD_XO_CLK_SRC as one of the parents - Enabled RPM_SMD_XO_CLK_SRC on msm8996 platform and switch to it from RPM_SMD_BB_CLK1 clock Dmitry Baryshkov (4): dt-bindings: interconnect/msm8996-cbf: add defines to be used by CBF interconnect: add clk-based icc provider support clk: qcom: cbf-msm8996: scale CBF clock according to the CPUfreq arm64: dts: qcom: msm8996: scale CBF clock according to the CPUfreq arch/arm64/boot/dts/qcom/msm8996.dtsi | 51 ++++++ drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/clk-cbf-8996.c | 60 ++++++- drivers/interconnect/Kconfig | 6 + drivers/interconnect/Makefile | 2 + drivers/interconnect/icc-clk.c | 168 ++++++++++++++++++ .../interconnect/qcom,msm8996-cbf.h | 12 ++ include/linux/interconnect-clk.h | 22 +++ 8 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 drivers/interconnect/icc-clk.c create mode 100644 include/dt-bindings/interconnect/qcom,msm8996-cbf.h create mode 100644 include/linux/interconnect-clk.h