From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2AED740A2 for ; Mon, 18 Dec 2023 21:32:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YPytoR8U" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2cc7087c6c4so19630951fa.2 for ; Mon, 18 Dec 2023 13:32:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702935120; x=1703539920; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BSXNxdoZhofQ5RCoswX0f1+//hwvnN3EjdXTFtoy2HI=; b=YPytoR8UoXXL5CGUcl3dfCdIiBvwg6cv8N9QJ1ZrnuxwfYhVI+fQCxLtSjas1k3fMa dQSj5awbalo7vQ+36AI1X8F5cFYniL39UP1LqmBtfa2LV0yvMIHXsOOAm1jOu3H81FhM FaRlOAA65obniearn1MSBnImUrhJM7rGMnia5ABUqfkbVdty9TK/Hwn0nkVlVEmwmrFh P3Y5iW3pqbOYxMb1RT6LqECTLm7b382KNKOh87nHTw6cit8j4VYO1OtNIbLk7N0nEwQA 7XWp7Ts8E8S+b1bMvEO/m1FA7hSAerod1ude64Cuv/cddqnfcoakG82l9aGFQq3pLsN5 UTkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702935120; x=1703539920; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BSXNxdoZhofQ5RCoswX0f1+//hwvnN3EjdXTFtoy2HI=; b=lhjF6Bv2CU3nt+omJ1PC8CCWqi6Km152sS889UTZWPFmocs4xQQ8hcK44ozjAJ6Wgl quo48FHoXZOfV1rLkbReWYdP0F0oZNS/Hxd1mre4fx/kBuotO0p4RJl3Am/HDry7+V1y 9cT6Vg7+SM60fBXhsUVo1tTYIypJot/bqaB6R96+wKEuqV2o7eRwmxjwhBq7ohR+vrEW YDx5DB1d7iL8Bw3XK4NF5A6aVxU07fQPmWeZ7dkcIbSOnjMr0o3azFsndhSYzp5hI2tt r2+JekAoPvlNyqOPQYGFnWu0e0pyYivzUoIVBPoJiAkKk53OLhxlpyH1ItFaxqznbTiN M7ug== X-Gm-Message-State: AOJu0Yxy6eJhQYH7GvWbuYRwUqmQTQQLOz6jXNuwmKhJYWAYr66OjvBR jrqhZDJE+S8yLMH6reGeW6h4+g== X-Google-Smtp-Source: AGHT+IGb9L/7IjmEK6JBuwbQuFPw/cgebNIiMG+aI27+Ezg3cWXCBXy+3+3B2cUOYWuEJ4oyHG7dOg== X-Received: by 2002:a05:651c:2009:b0:2cc:63e4:884c with SMTP id s9-20020a05651c200900b002cc63e4884cmr1666186ljo.50.1702935119890; Mon, 18 Dec 2023 13:31:59 -0800 (PST) Received: from [172.30.205.119] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id w22-20020a2e9bd6000000b002cc710614besm507393ljj.0.2023.12.18.13.31.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Dec 2023 13:31:59 -0800 (PST) Message-ID: <15d2bd66-29f3-435b-8494-d82ec4036413@linaro.org> Date: Mon, 18 Dec 2023 22:31:57 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/12] arm64: dts: qcom: sm8550: Switch UFS from opp-table-hz to opp-v2 To: Nitin Rawat , Bjorn Andersson , Georgi Djakov , Abel Vesa , Michael Turquette , Stephen Boyd , Taniya Das , Jagadeesh Kona , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sai Prakash Ranjan Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org References: <20231218-topic-8550_fixes-v1-0-ce1272d77540@linaro.org> <20231218-topic-8550_fixes-v1-10-ce1272d77540@linaro.org> <62f0c623-3819-f6be-115f-6b471ab79a58@quicinc.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <62f0c623-3819-f6be-115f-6b471ab79a58@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/18/23 17:35, Nitin Rawat wrote: > > > On 12/18/2023 9:32 PM, Konrad Dybcio wrote: >> Now that the non-legacy form of OPP is supported within the UFS driver, >> go ahead and switch to it, adding support for more intermediate freq/power >> states. >> >> In doing so, add the CX RPMhPD under GCC to make sure at least some of >> the power state requirements are *actually* propagated up the stack. >> >> Signed-off-by: Konrad Dybcio >> --- >>   arch/arm64/boot/dts/qcom/sm8550.dtsi | 50 +++++++++++++++++++++++++++++------- >>   1 file changed, 41 insertions(+), 9 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi >> index d707d15cea5b..d6edd54f3ad3 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi >> @@ -1930,6 +1930,7 @@ ufs_mem_hc: ufs@1d84000 { >>               iommus = <&apps_smmu 0x60 0x0>; >>               dma-coherent; >> +            operating-points-v2 = <&ufs_opp_table>; >>               interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI1 0>, >>                       <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>; >> @@ -1950,18 +1951,49 @@ ufs_mem_hc: ufs@1d84000 { >>                    <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, >>                    <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, >>                    <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>; >> -            freq-table-hz = >> -                <75000000 300000000>, >> -                <0 0>, >> -                <0 0>, >> -                <75000000 300000000>, >> -                <100000000 403000000>, >> -                <0 0>, >> -                <0 0>, >> -                <0 0>; >>               qcom,ice = <&ice>; >>               status = "disabled"; >> + >> +            ufs_opp_table: opp-table { >> +                compatible = "operating-points-v2"; >> + >> +                opp-75000000 { >> +                    opp-hz = /bits/ 64 <75000000>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <75000000>, >> +                         /bits/ 64 <100000000>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>; >> +                    required-opps = <&rpmhpd_opp_low_svs>; >> +                }; >> + >> +                opp-150000000 { >> +                    opp-hz = /bits/ 64 <150000000>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <150000000>, >> +                         /bits/ 64 <100000000> > +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>; >> +                    required-opps = <&rpmhpd_opp_svs>; >> +                }; >> + >> +                opp-300000000 { >> +                    opp-hz = /bits/ 64 <300000000>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <0>, >> +                         /bits/ 64 <300000000>, >> +                         /bits/ 64 <100000000>, > Hi Konrad, > > This entry is for ICE clock ? Shouldn't the entry be 403000000 ? > Same for svs as well ? Hi Nitin, this entry is for the TCSR_UFS_PAD_CLKREF_EN/"ref_clk" clock, which doesn't support ratesetting, so it should probably be 0 (or its actual value if we know it - I assumed it was 100 MHz as it was there before). The ICE clock is handled separately by the crypto@1d88000 node. Thinking about it again, the original submission probably included the ICE clock within the UFS node and when TCSRCC was created, somebody might have omitted the wrong rate value. Konrad