From patchwork Mon Apr 11 15:43:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 559724 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 171B3C433FE for ; Mon, 11 Apr 2022 15:44:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348180AbiDKPqY (ORCPT ); Mon, 11 Apr 2022 11:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348153AbiDKPqV (ORCPT ); Mon, 11 Apr 2022 11:46:21 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77D4ADDE for ; Mon, 11 Apr 2022 08:44:05 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id ks6so7119766ejb.1 for ; Mon, 11 Apr 2022 08:44:05 -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=COpNw57lgu0himePeZKRGKWRjP8G0QfB49lG6bBArPo=; b=KijVpViNNcNMkejFTsh0iTzo1brscJx+JZ8eFgBlDRWQVtq4SZbHS5MNvUYGEU/MxN L0OGthoesxBuvzQyg0Cnl9iT5+5qP9g5jBm8ogfos9ZGsB79pSpWkKOCtnQKAm9bUhdh eP55Hmmlrqntt8SZjlMbut6phumsVchdb0lSgUxnPcTN7Qc1oa+2tqi2JLQ9v3AHQGV9 evAjYVYW1IV/xOGj/nJG+UOCZClv19IRVB6bOVlirDbVucpLC6IPI0uWrHBK6XGrF7Hg qi+3QsbPeauFFmkw/Jjq0hz+qedquY0EjzKX3vwbECO2uvl/ZKNaZNn3KDsAc0CsX81O 7ESg== 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=COpNw57lgu0himePeZKRGKWRjP8G0QfB49lG6bBArPo=; b=bea5LPforsbagtEhW0BrvnQJBhmEuBv6oYpWRT7BuuE2BkRq9zV0pdRO8ODKwp/e+u A2UDIr5Z6m/bOgWz7tPpeJineBKXkEA/bgo8s0SqVP91yIND0+NK3A1DMr3k+arq3oqT 9NdRJwSq3I7yKcBuCxtRBgMvxt4veBbDFTeYJoaXvNUJeoUy4moxW9SgLREhFmMlyxOE QZMziSlx/TSyK+8vJPawHsH2GYa2q8R1mlO+lHhJZlO7yBdQqiVKARLlxoQEALzJNuXu VEWnpoNpFnG3RJMzlI6aFxJlR6J4rC/wztWoTs8RK3kjAEttnF5dYgPfCQnSBkWpt5Am CXrA== X-Gm-Message-State: AOAM533GuATZ9xIrUpM+b5LfsMCmFsAivZ7sHWgKg8UW3g9baKPjR2hA 4oeoawdnDwGujqoepnfV3FYqcA== X-Google-Smtp-Source: ABdhPJwMBgmWhN9Jcvz1+nkn4w/kwhwjVuDaMN+onbQcbN0Ysm3OfM9jnty6wEdQqJ/ZbGYwYFTzIA== X-Received: by 2002:a17:907:9720:b0:6e8:3613:6224 with SMTP id jg32-20020a170907972000b006e836136224mr20084190ejc.421.1649691844019; Mon, 11 Apr 2022 08:44:04 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-201-27.adslplus.ch. [188.155.201.27]) by smtp.gmail.com with ESMTPSA id t14-20020a170906608e00b006d1455acc62sm12173177ejj.74.2022.04.11.08.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 08:44:03 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Viresh Kumar , Nishanth Menon , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , "Rafael J. Wysocki" , Taniya Das , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFC PATCH v2 0/6] ufs: set power domain performance state when scaling gears Date: Mon, 11 Apr 2022 17:43:41 +0200 Message-Id: <20220411154347.491396-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, This is a proof-of-concept/RFC for changing the performance state of power rails when scaling gears. Changes since v1 ================ 1. Patch #1 qcom,gcc-sdm845: fix typo (Stephen). 2. Patch #2 ufs dt-bindings: not adding Rob's review because patch changed significantly. 3. PM: add new code for handling multiple clocks. 4. UFS: deprecate freq-table-hz property and use PM opps instead. Dependencies ============ The UFS patch depends on PM opp adding multiple clock support. Best regards, Krzysztof Krzysztof Kozlowski (6): dt-bindings: clock: qcom,gcc-sdm845: add parent power domain dt-bindings: opp: accept array of frequencies dt-bindings: ufs: common: add OPP table PM: opp: allow control of multiple clocks ufs: use PM OPP when scaling gears arm64: dts: qcom: sdm845: control RPMHPD performance states with UFS .../bindings/clock/qcom,gcc-sdm845.yaml | 3 + .../devicetree/bindings/opp/opp-v2-base.yaml | 8 + .../devicetree/bindings/ufs/ufs-common.yaml | 34 ++- arch/arm64/boot/dts/qcom/sdm845.dtsi | 43 +++- drivers/opp/core.c | 205 ++++++++++++++---- drivers/opp/of.c | 48 ++++ drivers/opp/opp.h | 9 +- drivers/scsi/ufs/ufshcd-pltfrm.c | 69 ++++++ drivers/scsi/ufs/ufshcd.c | 115 +++++++--- drivers/scsi/ufs/ufshcd.h | 4 + include/linux/pm_opp.h | 23 ++ 11 files changed, 475 insertions(+), 86 deletions(-)