From patchwork Sat Apr 16 15:40:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 563801 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 D4BB1C433EF for ; Sat, 16 Apr 2022 15:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232429AbiDPPnA (ORCPT ); Sat, 16 Apr 2022 11:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232424AbiDPPm7 (ORCPT ); Sat, 16 Apr 2022 11:42:59 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FD47434A2 for ; Sat, 16 Apr 2022 08:40:27 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id k62so5193391pgd.2 for ; Sat, 16 Apr 2022 08:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rmGiO08X0yEC4elXRkAdRalPc23L32HC464CcWqkvSQ=; b=zU5WUq0XkuFzWaKAEZsCe9l09Fz1VCPVZgtigC0cBIhdxUqT1ZyNquREemeMXkT1v8 DwZvodCv8lIcWjL4dJZPatmR7Bb+qboehmyV6rPuCRecVHwio7ySS4b37BA8YHHI49uz vZ83/4Qwfga+E4XfXfEDmWzV9JoHaB4y3svjtyuUrLDKm0Nhb61OG2RKs1KEmy40VXTY J21rGFfiCaXi0Uh20/XVKjYN5cleV+czjVTEc98+lWF8sTL3Yu6VyUNI9brPvEEYiqgt 8IKvKKebzjL4a4g/VJifxJ30VyJ3WrBg43LV42Rb2/ngzfz7n7PORIRpsm24XMhI1aKH Ezkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rmGiO08X0yEC4elXRkAdRalPc23L32HC464CcWqkvSQ=; b=jDv2jpa1CCKc2/C0KzQe/hWRBnzpaoeieJdfTY4FabTYKqhEW54/SfOYNVG27Bma5U e5le3Ay3fI8iytXa+g0g2XqGL3T9p0yW9aFkD+lzgSvFr0Z607Xd2eAvvVRdbtGI7uzD rP3AS0o1YvBVwK0UryfLlPItKsYS/lw+IsIX7NEFcWr3yTtoQnJVX15udWvtZ9fWZUkZ qiovQ4ulfAuy0LUgEmQoMku24w3xJ9OzqmeoDjrFYJajpUqhwkdxOZqfTnfdUvMrDf0u FPDB7jucHgUzTPg1ENn937wwnKi8DgH1IxJBkMQiXloIroyFGOUZxOvo1kZM8lnYPOjp BtFw== X-Gm-Message-State: AOAM531CU6TH5Is2S6IJPMOkW11EjHt0VyWHuHmZrsg+FT1xjjn+qDck vN0rievQplCjulG+LhjjDv6Rmg== X-Google-Smtp-Source: ABdhPJwBAYLkiJ8r9Q6T/TfFVkAQPtSFDLa1AMnXZTVuLrztSziUCHqQSmOJ/9AYgib7OM/xqfcvsQ== X-Received: by 2002:a65:568b:0:b0:378:86b8:9426 with SMTP id v11-20020a65568b000000b0037886b89426mr3322626pgs.70.1650123626385; Sat, 16 Apr 2022 08:40:26 -0700 (PDT) Received: from localhost.localdomain ([134.195.101.46]) by smtp.gmail.com with ESMTPSA id z16-20020a056a00241000b004f3a647ae89sm6358681pfh.174.2022.04.16.08.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Apr 2022 08:40:25 -0700 (PDT) From: Leo Yan To: Andy Gross , Bjorn Andersson , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Bryan O'Donoghue , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v1 0/5] interconnect: qcom: icc-rpm: Support voting bucket Date: Sat, 16 Apr 2022 23:40:08 +0800 Message-Id: <20220416154013.1357444-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This patch set is to support bucket in icc-rpm driver, so it implements the similar mechanism in the icc-rpmh driver. We can use interconnect path tag to indicate the bandwidth voting is for which buckets, and there have three kinds of buckets: AWC, wake and sleep, finally the wake and sleep bucket values are used to set the corresponding clock (active and sleep clocks). So far, we keep the AWC bucket but doesn't really use it. Patches 01, 02, 03 enable interconnect path tag and update the DT binding document; patches 04 and 05 support bucket and use bucket values to set the bandwidth and clock rates. This patch set is dependent on another patch set "interconnect: qcom: icc-rpm: Fix setting clock rate" [1], and it has been tested on QCOM msm8939 platform. [1] https://lore.kernel.org/lkml/20220416031029.693211-1-leo.yan@linaro.org/ Leo Yan (5): dt-bindings: interconnect: Update property for icc-rpm path tag interconnect: qcom: Move qcom_icc_xlate_extended() to a common file interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended() interconnect: qcom: icc-rpm: Support multiple buckets interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values .../bindings/interconnect/qcom,rpm.yaml | 2 +- drivers/interconnect/qcom/Makefile | 3 + drivers/interconnect/qcom/icc-common.c | 34 +++++ drivers/interconnect/qcom/icc-common.h | 13 ++ drivers/interconnect/qcom/icc-rpm.c | 134 ++++++++++++++++-- drivers/interconnect/qcom/icc-rpm.h | 6 + drivers/interconnect/qcom/icc-rpmh.c | 26 +--- drivers/interconnect/qcom/icc-rpmh.h | 1 - drivers/interconnect/qcom/sm8450.c | 1 + 9 files changed, 178 insertions(+), 42 deletions(-) create mode 100644 drivers/interconnect/qcom/icc-common.c create mode 100644 drivers/interconnect/qcom/icc-common.h