From patchwork Wed Jul 12 10:31:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 704885 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 C5CCDEB64D9 for ; Wed, 12 Jul 2023 10:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbjGLKwO (ORCPT ); Wed, 12 Jul 2023 06:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjGLKwN (ORCPT ); Wed, 12 Jul 2023 06:52:13 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1909E5C for ; Wed, 12 Jul 2023 03:52:11 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-666eef03ebdso3368467b3a.1 for ; Wed, 12 Jul 2023 03:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689159131; x=1691751131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:resent-to:resent-message-id :resent-date:resent-from:from:to:cc:subject:date:message-id:reply-to; bh=CX3sPcIP3SsQXddpGgAhiwMO6lb232ip/HjkD9sXmB4=; b=MjClDuBbSzHLsxKIGpCQm3CqjoRq59wiM5D5SxiK1SZgvaJkH2vj3daPsA4s/8hlNu gIlG+j3GLaQ3jnH2rZuVGeyST1fej1rvQA+vGbt6762ESOCrYQkNziM21yuDKE7AxpIY Kl1IAESkUl47xOeC4b1SQupOoox9Srh5++nSPrcjkG9hT7fo7qBmAO0/jaSHUdHcQZHh hfL2+ytYZQjmWN4817DrJB1WpAY3tfheuvSer1AmhLw1dkQ32SlNvgmbDMTtfObZEL7f LXajEBLTj6i37bH0f8GCzgzM0W3VdURNrKqM/CEihv1PxH//iEQg1gzjbSScj5Vn6Xj2 SYVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689159131; x=1691751131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:resent-to:resent-message-id :resent-date:resent-from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CX3sPcIP3SsQXddpGgAhiwMO6lb232ip/HjkD9sXmB4=; b=lXCGOF3d69ckzntqqY3nFcgAOy14gzsAKIBx5c/O9WtkjTXvrR8edI8AQrzJTXfsT5 WpJBPMUtCBYCOdl4ukEzWfKoDLlmAdGUBLDPAR18XYUwS91YwkcoHwSrbYg1Vr8w7AuU kLg6hdI2n2X3f7XsvHcBk6ZSX4dLOzLlpfR05W84wPjcbmom+Aqq3upS1iC+VeaocCLE bj2LPvqrqjxLpx11OTsfzhbQVU+1hcR3xpYl8hu1To0NV/D7pB/ko7zTHEs7NF4hPDpx V1FLal6KGnTh/tAcpstPX4wdn/DVF7d9tubbnA6ocD5CRos86ZDjDmAnpLcKxkVg/oXf B0tQ== X-Gm-Message-State: ABy/qLaiBNYGrsopNAA+MLzhp59qjhZhjRrMBKCazTDa8hn4mXepYVqd t0aLXZZys65JaWL7nDv++yWgLe4Lbe4VFYfoLw== X-Google-Smtp-Source: APBJJlFvgWF/Fn3FpebLiQaLiU5k0lFVLMiDcpf9KL3q2oc2XLkIPJwrFAeGTQzQ4ErSwibceohswg== X-Received: by 2002:a05:6a00:2e92:b0:682:2152:45df with SMTP id fd18-20020a056a002e9200b00682215245dfmr14734048pfb.9.1689159131138; Wed, 12 Jul 2023 03:52:11 -0700 (PDT) Received: from thinkpad ([117.207.27.131]) by smtp.gmail.com with ESMTPSA id y12-20020aa7854c000000b006829969e3b0sm3335070pfn.85.2023.07.12.03.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 03:52:10 -0700 (PDT) Received: from localhost.localdomain ([117.207.27.131]) by smtp.gmail.com with ESMTPSA id k15-20020aa790cf000000b00666b3706be6sm3247860pfk.107.2023.07.12.03.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 03:32:47 -0700 (PDT) From: Manivannan Sadhasivam To: vireshk@kernel.org, nm@ti.com, sboyd@kernel.org, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, cw00.choi@samsung.com, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_asutoshd@quicinc.com, quic_cang@quicinc.com, quic_nitirawa@quicinc.com, quic_narepall@quicinc.com, quic_bhaskarv@quicinc.com, quic_richardp@quicinc.com, quic_nguyenb@quicinc.com, quic_ziqichen@quicinc.com, bmasney@redhat.com, krzysztof.kozlowski@linaro.org, Rob Herring , Manivannan Sadhasivam Subject: [PATCH 01/14] dt-bindings: ufs: common: add OPP table Date: Wed, 12 Jul 2023 16:01:56 +0530 Message-Id: <20230712103213.101770-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230712103213.101770-1-manivannan.sadhasivam@linaro.org> References: <20230712103213.101770-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 X-TUID: aF7G0kvCKECv Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Krzysztof Kozlowski Except scaling UFS and bus clocks, it's necessary to scale also the voltages of regulators or power domain performance state levels. Adding Operating Performance Points table allows to adjust power domain performance state, depending on the UFS clock speed. OPPv2 deprecates previous property limited to clock scaling: freq-table-hz. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam --- .../devicetree/bindings/ufs/ufs-common.yaml | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/ufs/ufs-common.yaml b/Documentation/devicetree/bindings/ufs/ufs-common.yaml index 47a4e9e1a775..d7d2c8a136bb 100644 --- a/Documentation/devicetree/bindings/ufs/ufs-common.yaml +++ b/Documentation/devicetree/bindings/ufs/ufs-common.yaml @@ -20,11 +20,24 @@ properties: items: - description: Minimum frequency for given clock in Hz - description: Maximum frequency for given clock in Hz + deprecated: true description: | + Preferred is operating-points-v2. + Array of operating frequencies in Hz stored in the same order - as the clocks property. If this property is not defined or a value in the - array is "0" then it is assumed that the frequency is set by the parent - clock or a fixed rate clock source. + as the clocks property. If either this property or operating-points-v2 is + not defined or a value in the array is "0" then it is assumed that the + frequency is set by the parent clock or a fixed rate clock source. + + operating-points-v2: + description: + Preferred over freq-table-hz. + If present, each OPP must contain array of frequencies stored in the same + order for each clock. If clock frequency in the array is "0" then it is + assumed that the frequency is set by the parent clock or a fixed rate + clock source. + + opp-table: true interrupts: maxItems: 1 @@ -75,8 +88,23 @@ properties: dependencies: freq-table-hz: [ 'clocks' ] + operating-points-v2: [ 'clocks', 'clock-names' ] required: - interrupts +allOf: + - if: + required: + - freq-table-hz + then: + properties: + operating-points-v2: false + - if: + required: + - operating-points-v2 + then: + properties: + freq-table-hz: false + additionalProperties: true