Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1155599rdb; Fri, 2 Feb 2024 16:14:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4jrixWRfM0e1J7Uw1pCCDezB98L+2r/VmVuKVuQsOBDISEnHR3ez5ef/CpMfZEHiLLVHs X-Received: by 2002:a17:902:dac6:b0:1d9:e40:39cd with SMTP id q6-20020a170902dac600b001d90e4039cdmr8780512plx.2.1706919277618; Fri, 02 Feb 2024 16:14:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706919277; cv=pass; d=google.com; s=arc-20160816; b=sIla6kVmUZPlAoZPJe11/r4pVvthwCKQ2Ba2aO3ANbQB8d8N3HNYPu9nMnzo37wGpW vJ2xYwpPGrB8XePVhs7+Oxd3V0MG5pJ52lMWAicO3ReYWi3f9HrYiY0mlbNtQpdGuHYJ jd1nLQ9EEAkVdfwfzEWI+5Op1kDry2RZNG4TyBIXcLTm1Yi74gIf51QnmkY+1ZimSvYD WddDLfIZYR1WKPUuUTW8E6BU409c0rQ2oNfbNHyxea05aQ/I47tvdW/p5xITHP1qxYE+ thU661RvmT4mD3ik5GFG4WNeh9tE7KvBA9TyNhhJ97rokevXMWsdZx4Y1hb1uTevq2Gb djKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=+i/pqntxef3SaSJAi399Z+K8zvxssthTj40vaMmV808=; fh=iERnNQmrZIP/6fqAdGOoACd3zuDkmunkSqAAugUWg3A=; b=qanTeCiRfnUzULpe9tpOugQjM0I/g5Wavdu52zZKbiZDAa6cxJJsc1gOXKcTYb0sQF EISUDYX7wnSVjdfWAodVSrPSQaZfaH3lAZNa9elo+VkLr+cWeGN2rU61rGPEyODlnJVT mJfvAIFr4GEyW3Ox2Xg0sz2NUhK4j/rvDtkcAAban/LQ3AsoIcP+mT+5Ae3BmWdLCMrZ t2QLBYLDAtO7XXJIbhm1XrpGWkLF7QQHtDjUrLX0lbl2Zd2WxUNWsTfutpR0jMs7VVa3 G0lIw99mVKjkiQua5pK3HES34q42UDN4lJ1weMrZJNv6ChX+cf3f40oaFk2yv8kH4icC PHcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pwo5n540; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50757-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCV3WySJB0+FlAdpPtmMKns+bpEqYHr91LkOuDUNbPCyCTh8DYzBuE04cYd1O7Q1Oww5/Sl01G4QsOsCOv04YFQ1JwkRkjUl02A7RGkkrA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u18-20020a170902e21200b001d8f9b3ed79si2422447plb.86.2024.02.02.16.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 16:14:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50757-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pwo5n540; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50757-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50757-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 99D752858FE for ; Sat, 3 Feb 2024 00:13:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 80CE010E6; Sat, 3 Feb 2024 00:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pwo5n540" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 AFBE3636 for ; Sat, 3 Feb 2024 00:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706919019; cv=none; b=Bh1XhHUsQ+sITHfoAn6zEPxDf1WQiR5IXqWyEVw7LfDQwxdXLZCD8D/pWB0pMVlY8K3Ky1Xcz39YLm2RUWEKgoh6gpN9km9YQpOIylT9614qk6tRx/irGj/wlgaRmCjVKMc3Ps8D1mX+T2RgGveSdqGZvPts7eJgKXLCriv3Ko8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706919019; c=relaxed/simple; bh=lYrl0fMGsQMv4kqgDrYyuon4dy2WZcZ4nXzIifz7B8c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=dv+G3FqugKSK5rURJllXn3NuPDqMjkS1oXlt5qa+3rFA1mm8nriktEkxPivErzOzc3Xn4Nz2hcj9oBra8gqamF28XW45qYlTp+UXu7e1Wkw+1ODDMFdAzY8/3ic1gWqnkEf7VTrI6Nrl+VI62hgLaIhxvOih0wqv/nHwOnC0f2s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pwo5n540; arc=none smtp.client-ip=209.85.167.46 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-lf1-f46.google.com with SMTP id 2adb3069b0e04-5112a04c7acso4402831e87.3 for ; Fri, 02 Feb 2024 16:10:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706919016; x=1707523816; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=+i/pqntxef3SaSJAi399Z+K8zvxssthTj40vaMmV808=; b=pwo5n540YiAMwmMzWpFLlg26V4gpBMvNVCvIeJQ9o/KXppQo23jhYWf911yi/TI2wx Zt8Is5bkeQCHbyOk9UVUpvLkRKa4h5Cx4b60zQBppNgLhS+KDnxpqEZeFUpV7QfagqJ/ hKW8aCUP3aOhg7hjdTj3inybWbUyZTi8FBUY+Wfrzyjv3qudoDvo58/l2SMz7gYCbseB 77x802lxxkQThQFNk3kmxuFqNAqYl6Jau+2OnM59LRRRCP2/1u6aHMSAgEGOZdVZVHbe phQGBJaxOym+FiZf0BNPG6ZxFuJGKSRHJOYpIz291L2kZlelrrVtxhs6R0X4JP951133 eNKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706919016; x=1707523816; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+i/pqntxef3SaSJAi399Z+K8zvxssthTj40vaMmV808=; b=W3Uwlgt8Y530XCD2O+jX5LWdVOkJcbDSrg4Iq8qBO3R6ff+SeWPslfCQv+ZokBxMxC ceAb9Xm+oDT8bxtV917hNQtU3uofAi4LwEH9xlihc9xfITZtc494CtC48bNVscT/eejU K3Y0ItoEZg55vKZpMh/4DObfH0WtynmkPKdIJM5oFkc3Av2PGEXfMHEwgK113fseyG2v pGUPRdyO12WiCuzdvQygJFPG+T0/azhvGxuQkJHuImRL7S5WYJrfDaULl+qXMGNNGzP9 6Zmk0PtjCLghgQzYYRFlkogoabz44wKtNh/cveQu5VUFlbaxFjkeLDcyTc6ZCHRbsvfh xgbg== X-Gm-Message-State: AOJu0Yz4niFZeE2Z8O7OwbF0MzVJro/AybCL9mZ4vkdoI2aQI9dAx8pA 6/iB2ZNbONqJBwkVHBRbVdQV669pAUvedBJaXkj0R3+fGoCCvrO2WP8ewETWyNM= X-Received: by 2002:ac2:531a:0:b0:511:83e:87f with SMTP id c26-20020ac2531a000000b00511083e087fmr2255293lfh.19.1706919015679; Fri, 02 Feb 2024 16:10:15 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVpfq7nsHkCKDeY3juM7KxutkUuUjuCzsgvPID2b8QyfgEAxG4ulY6Koxp679pTujGedhIugehLP7Ve/jgmDajdAu9L2rdew2fCwZ1YJwsPzw2U/LMnMGJnAhvMGMTGv1DLAUNrbz5cpNo659A6CjmGVe2SFU+qReWnLUZ8TI2ohkOqwPnbkaj7/p4ThY+E3/FsDUN51ODHO6Ccj7Ek/pfh13ubKDF2ENEFptu2Hll3ZqsDPRUc492Tx3M7ELmrAFiJqXx4k0LfQD4ljbNCm7a7kB37p3Jrc2wPLfmIRQJtQeolQax05lbO/UejADEeqSo0SxzLjZ05Dp49lCmrPt5+UkaJOUA= Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id jy13-20020a170907762d00b00a2b1a20e662sm1396594ejc.34.2024.02.02.16.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 16:10:15 -0800 (PST) From: Konrad Dybcio Date: Sat, 03 Feb 2024 01:10:11 +0100 Subject: [PATCH v2] 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240203-topic-8550_ufs_oppv2-v2-1-b0bef2a73e6c@linaro.org> X-B4-Tracking: v=1; b=H4sIAGKEvWUC/x2N0QqDMAwAf0XyvECJVsp+ZQxpa5wBaUszZSD++ 4qPd3DcCcpVWOHZnVD5EJWcGtCjg7j69GGUuTGQocGQ6fGbi0R01pppX3TKpRyEITg3j70fonX Q0uCVMVSf4tritG9bk6XyIr/79Xpf1x9/k6ByewAAAA== To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706919014; l=2714; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=lYrl0fMGsQMv4kqgDrYyuon4dy2WZcZ4nXzIifz7B8c=; b=D8EXau7qLW2FEu0QWtjBIB2g9tGLro6lg8B0M7x5mNj8s6R8DKRpY8zY+JUe1ksDpFPcAliVb VSrQ2IxN6o5CDOljZLF+ZgZl2DWuwBs+HVnXFOc4G945qznfSH6AqGl X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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. Signed-off-by: Konrad Dybcio --- Extracted out of: https://lore.kernel.org/linux-arm-msm/15d2bd66-29f3-435b-8494-d82ec4036413@linaro.org/#t Changes since v1: - Set the reference clock rate to 0 in opp entries, it doesn't support ratesetting anyway. Confirmed UFS still works. --- 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 c89d8f3dad21..144e20edf237 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -1966,6 +1966,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>; @@ -1986,18 +1987,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 <0>, + /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 <0>, + /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 <0>, + /bits/ 64 <0>, + /bits/ 64 <0>, + /bits/ 64 <0>; + required-opps = <&rpmhpd_opp_nom>; + }; + }; }; ice: crypto@1d88000 { --- base-commit: 076d56d74f17e625b3d63cf4743b3d7d02180379 change-id: 20240203-topic-8550_ufs_oppv2-bb88d63a4c58 Best regards, -- Konrad Dybcio