From patchwork Mon Dec 18 16:02:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 180547 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1351039dyi; Mon, 18 Dec 2023 08:12:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4osWkBJhr6c2AxygRDLqaHL4OM9CyIBNrTsnA12PYyMIv2FA02qIj9xxmaVlbqqOglTwb X-Received: by 2002:a17:906:b796:b0:a23:65c9:c882 with SMTP id dt22-20020a170906b79600b00a2365c9c882mr568998ejb.58.1702915925612; Mon, 18 Dec 2023 08:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702915925; cv=none; d=google.com; s=arc-20160816; b=Tdshsugw4CeRo/rA8Wrb/e9lxmNrVRJbmmFtc3EInSqm5F/X1H7rZHSLDRiHSaacZl h2fiRVFBCbGG1+YybRBIztK/x9mAbXQe26nKmbDlYRQ1Ct2af/IjpwMX1K7CClD8A4JZ bRnPd1PteBER2xAEEObJijavqMUK87hEIJIxG308bQG7S1EQzM658ShJioHstrtZToAb QizFvDUnXgJ0GWAk25hekBOIo/KV8osTKmcwPs+ORy/gACMO907iqDAbj4SwCsPGFJ2T AAYL6W3gTpo09FfjaCadouWXSFXAuwrzYFtn6YhHe9HTsKQT5tjUptunLI1OP6M1Co9D y7mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=68epx+8M61EWdIAHlB2jaH+zZGGljEe5sZXZT/JYXwQ=; fh=rEVFm9YKCHx5M/iMjT98S44/HnQ1Oqs3Kh4kDoUSPds=; b=JX3a9uOOXcdTmhkYfwKY0FafWfcpxAVdguRsX3KPWgTg0Elq7ehKhO6SLd20UIBeyw Y/gT30otTDtx1vZ39TzUpluZRWzCs7hFJYah+oX4VJ0VN8k2MVSk7bkTKv3qSdoWIZPp Tt96tDzMy8a/7JtBDxM1wY9cHi8pZfuSyxh7z9AATa45kxo/toaxQ6hUNOLgAi2B/FvF NdxyNn1PCDmLEW3wjVbwih+uitVftRZn2hbRScBLBWiQpUubEFy2sRjq6GNfPE6sQ6IG la3NTdn1ZoRVrG9WlwQzLCEXBdv6el7SJLYxNxrL2+jCkp8G8GMRO3dI6zlAhQjSUZ70 Gz/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rbrVfNMI; spf=pass (google.com: domain of linux-kernel+bounces-4023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gs14-20020a170906f18e00b00a23548a1b3esi1105829ejb.25.2023.12.18.08.12.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rbrVfNMI; spf=pass (google.com: domain of linux-kernel+bounces-4023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BBE161F267D3 for ; Mon, 18 Dec 2023 16:06:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EE89740BD; Mon, 18 Dec 2023 16:02:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rbrVfNMI" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 9DC6973472 for ; Mon, 18 Dec 2023 16:02:40 +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 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a235e394758so120121166b.1 for ; Mon, 18 Dec 2023 08:02:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702915359; x=1703520159; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=68epx+8M61EWdIAHlB2jaH+zZGGljEe5sZXZT/JYXwQ=; b=rbrVfNMIVyQlidrVqwAk7nr9mwdeNMl15IDMnUl0bZapRcmb7Pg5Rgjud5VjdbdbH8 SNbKrPrbC7A3FM0mAiGTbNs8TVqA7Z80INlliPwcjlvCqsyuuiqZeU7momCtL0wWRnDE 9cOZPDpG09fjUsQl20sehykDCakZ8AkD1M5dTONXofU9YESDWtKtMOoM6UKwEURWnlXN ayc1q8oPsE0JSA2YOK4J1rFaGi6tf1qxJA1GEasE89yO1xFBJIC+/tr/s/UsBvohmAeh 7LYr+NOer3bgbMAs81d503Xor0fETV7ftu0uf/PdI2TFKPi5DUVOSTLHNGHwH7epx/my QAHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702915359; x=1703520159; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=68epx+8M61EWdIAHlB2jaH+zZGGljEe5sZXZT/JYXwQ=; b=dNk+B8x+JBNotaTx4J1wpIbRjRKmyeUebEJDMfXGLQNI+zLANg/mS57LFhHpVPt4sF oV1F8Z2DRHe7Wy/afz/zJ61ykPKD0uXLItK18p0+XKJPKfUrYiIbJD6cCE3WyscOr3sd VvZDWQmmJjxKt+d+YHSVSNExly2RtP7Fw1ORG5/I8pj3hX1ccmgmFtBmtH5Dazc2Y1V8 ZOohRw9sb6RMuCL9C5awocg3JV2hZDreTES9ZoK7pzbAZy6AuDPeDto/REUU4tIo9Gmu M/bYGNEUGamXnyvqP/bLfuv/9mvEyCpfBvg4x4jJ+S7odeqG30Fpbf1qPVm/2uyEIytU LK3Q== X-Gm-Message-State: AOJu0Yz6WMhmAe6NzYuhlquFnylflN4fBb0X8G78FqSc5TfKmNO4wZbu m6eSMjGp5d4aheRtnncbJNKHdw== X-Received: by 2002:a17:906:208a:b0:a23:32bd:d166 with SMTP id 10-20020a170906208a00b00a2332bdd166mr1900324ejq.48.1702915358698; Mon, 18 Dec 2023 08:02:38 -0800 (PST) Received: from [10.167.154.1] (178235179137.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.137]) by smtp.gmail.com with ESMTPSA id ts7-20020a170907c5c700b00a1dd58874b8sm14260693ejc.119.2023.12.18.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:02:38 -0800 (PST) From: Konrad Dybcio Date: Mon, 18 Dec 2023 17:02:11 +0100 Subject: [PATCH 10/12] arm64: dts: qcom: sm8550: Switch UFS from opp-table-hz to opp-v2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231218-topic-8550_fixes-v1-10-ce1272d77540@linaro.org> References: <20231218-topic-8550_fixes-v1-0-ce1272d77540@linaro.org> In-Reply-To: <20231218-topic-8550_fixes-v1-0-ce1272d77540@linaro.org> To: 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, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1702915332; l=2459; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=wNcQ3JT7sEMsU1w+gTv+f8IeE+qRg1HUjZAHm9x8uUo=; b=Tn2VqR3OuQzlYgOYCLyuUJ5lFuNNXNnfMBUCl1Uvy4X11c3bfrVFS75n0/96CCvsEOnj0ozi0 3fnv6kuQZRcBPa1nVbVDDkVfSgl9/d1C2N4x3cC2gCHBoI6SlSHtYNq X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785636769980261391 X-GMAIL-MSGID: 1785636769980261391 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>, + /bits/ 64 <0>, + /bits/ 64 <0>, + /bits/ 64 <0>; + required-opps = <&rpmhpd_opp_nom>; + }; + }; }; ice: crypto@1d88000 {