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: 681400 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 495C7C7EE23 for ; Fri, 12 May 2023 00:13:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239597AbjELANj (ORCPT ); Thu, 11 May 2023 20:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239524AbjELANi (ORCPT ); Thu, 11 May 2023 20:13:38 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2DCD18C for ; Thu, 11 May 2023 17:13:36 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4eff4ea8e39so10496591e87.1 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=XVGW5mGFKVQvG79LFBRVASlKWSaIjU08PSXYVs7CfycHhaGfwDqqSg2gzcf/uVzHvu D1iIbptU/A7wyZ033YKzS4lo1+ePccL6NOKWVcsdVkFyUSggq4PszeGA+KxocLC3Eo02 oKxNDC+ojRtopE786Wg1VHo1NNdkFLjZkb/poZ7zDMXzgAEGRufOohTwmAt3ro3ztLiS iG40z6+WKPgo6gc/Z4a2Rzflt12/VnVtj8KmWCQNzu8U1GMsyKqdKA7i7iTg6W3On1pY rrxOU6UnEQsUAWO0zWAEPthR0DjeDGVPsguFY/DAIMX9/Nm6W9Qbk1UU5KK8jfHFByj4 8rLg== X-Gm-Message-State: AC+VfDzdyrWl3SzJnUh6DN5Kjic9x/MiJTCAikis/rqSZPP4/ORwUm5B +v8grUznNMjA41QAfU/PHmaFiA== 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: devicetree@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