From nobody Sun Oct 5 09:07:58 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ECE12957BA; Wed, 6 Aug 2025 15:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495048; cv=none; b=sCHlLGnXykPGfLUt0norpAGE0aaCn3llZcf3+plC7V2dDXtKTo0VY5DTCGQkNkPoYSudByUGiU4kccH1iK1yzRCY+4KztYJ0Z8n8AQLe1bFFTxYbtp06GmUoHMGxX00zuGi1aEbsULYVxVWdZXY2bQ6LUQC5tOnqUsnNhrX3o2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495048; c=relaxed/simple; bh=hiVvPnlUoDJv8y3YvQWQe0w/UHLvZIgAQ2BmGgHUWr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FzQ5bqxkhPRwo5elTpt1RF9xZp0PX9JZ6BL8GBAGhWskcpuHShv91HHuz69T6BdXF+tZ4bbdP5wtupMBTGK9I6oKqPhT5HiYXcULm8M1xSYJ8aSVq1gjkXid+vx8KheOGs/vulUA2J5+7yLVkwpoVs2PbMbwS12nC9mLKPFljYg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=LtQNasrt; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="LtQNasrt" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 576C6Hqa025397; Wed, 6 Aug 2025 15:43:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=+z4Dv1rIbSn o3/QJyTK16zE5TdC68aFCLduPh7Pp9Cs=; b=LtQNasrtOXWV8aGN2wTmbOCWMKO cg5BOKmeAr+Vb5L6q6DvvmHTszQo/J6dHElRoyy2OAD0ObfxrVYJeRyYndw87KXl KD01gA7wtJ8q4/oi8VeQZTDkluk7vo9ewtrvvzpwxOVDF2+dbPV8hbKmZbp9afrE cPOce+O6TK8BiTv5jUO2l6SzyNfWJaD/yt6A5C0Gdn5nmmSolKC5qsSrDfixD5Bu in4arYj3dGt8z4md4A0+66ZpUVgwjH00+sQhFTFzNXff3xkbBGhR/FQJsmJoW2N/ mQszE7UKNFrONqUV0ddi68oRAN09pfJQYxk1/74TDJ1PM17uwgmyXev9BQQ== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48bpvyubgg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Aug 2025 15:43:47 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 576Fhi0v022942; Wed, 6 Aug 2025 15:43:44 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 489brkx9uc-1; Wed, 06 Aug 2025 15:43:44 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 576FhhfW022934; Wed, 6 Aug 2025 15:43:43 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-nitirawa-hyd.qualcomm.com [10.213.109.152]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 576Fhhel022931; Wed, 06 Aug 2025 15:43:43 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2342877) id 367AC571922; Wed, 6 Aug 2025 21:13:43 +0530 (+0530) From: Nitin Rawat To: vkoul@kernel.org, kishon@kernel.org, mani@kernel.org, conor+dt@kernel.org, bvanassche@acm.org, andersson@kernel.org, neil.armstrong@linaro.org, dmitry.baryshkov@oss.qualcomm.com, konradybcio@kernel.org, krzk+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Nitin Rawat Subject: [PATCH V1 1/4] dt-bindings: phy: Add max-microamp properties for PHY and PLL supplies Date: Wed, 6 Aug 2025 21:13:37 +0530 Message-ID: <20250806154340.20122-2-quic_nitirawa@quicinc.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250806154340.20122-1-quic_nitirawa@quicinc.com> References: <20250806154340.20122-1-quic_nitirawa@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 57_GQ1A3fNl3838E02W_MQHJUy_UGByA X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA2MDAwOSBTYWx0ZWRfXylC3LIACHqsA EKCE59814cWRvWxVvFH7Inkq4qb47Vh99ok5km/ZLG66tTWnoOC0KGW2WFzJfdhrB+UMs+Roq1i NxiQ6oMdc3uD8pclgdue8/kj++8zdQpw9uIiwZgdi5mcg9geDzwp/95GNZ8vdQS/qfuYKCnnOFX BBDrXepOPGUXiKpapudjE4w54yXPM4Q4oLpOt5ZiN20R9D8mKuB+4TQVVLbumECQNk9T5W2r3JC tP9DpuETi1O5fZ/M+/G1n2yl8tRVqvnVa0Myu1uU7ZWLvix00hTgHJBQ8pi74X743ybXXcvv5jx QyDRJiWn6O/spRa28VTWZ4f89YkoEkrwqSaDxPECDbotgMqv6/uaK/kwgtP6mnIigjYBLpqq0UF 9I0Zt8qy X-Proofpoint-ORIG-GUID: 57_GQ1A3fNl3838E02W_MQHJUy_UGByA X-Authority-Analysis: v=2.4 cv=NsLRc9dJ c=1 sm=1 tr=0 ts=68937833 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=WuqA9S0JYpAbhd1HrewA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-06_04,2025-08-06_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 impostorscore=0 bulkscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508060009 Content-Type: text/plain; charset="utf-8" Add two new optional properties to the SC8280XP QMP UFS PHY device tree binding: - `vdda-phy-max-microamp`: Specifies the maximum current (in microamps) that can be drawn from the PHY supply. - `vdda-pll-max-microamp`: Specifies the maximum current (in microamps) that can be drawn from the PLL supply. These additions help define power requirements more precisely for regulators supplying the PHY and PLL blocks and ensuring the regulators is kept in correct mode based on the client load requirements. Signed-off-by: Nitin Rawat --- .../bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-ph= y.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.ya= ml index a58370a6a5d3..4648642dc974 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml @@ -71,6 +71,16 @@ properties: =20 vdda-pll-supply: true =20 + vdda-phy-max-microamp: + maxItems: 1 + description: + Specifies max. load that can be drawn from phy supply. + + vdda-pll-max-microamp: + maxItems: 1 + description: + Specifies max. load that can be drawn from pll supply. + "#clock-cells": const: 1 =20 --=20 2.48.1 From nobody Sun Oct 5 09:07:58 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBAB826E16C; Wed, 6 Aug 2025 15:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495049; cv=none; b=jfS8KC9BLlvcMgUUCVAV9VSpKxGz5tfMk8DAAeJSzgLDu3SOjLEE6ATgGxCg/FqG3gi9lEqjHebYwku9Y8um5igut+dcqLfML8GWNZLfu8hlqJ8xwNoeo7JFyXk1fv17KgrY2gMwePPrC5LpdrOt65rttAiu7KO1AJkTv3Eso60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495049; c=relaxed/simple; bh=Fx/AzB1VdT4A0BYESZ8aS2oZiMkubyjmoWcCxJ+vwBs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pByR+Mda0vJf8+YxlzqmUXKLwtby2DMb1HTB/mAPK3HJ828xiEFDzYBJsPJMA7VuMznqTbsHM48mksrYJjMMrB/ZRTznP5p8h61yIGt8u/5m5DMYLk/jB9pLeGEmEHVmUWdbfKuhMCD5Lcz263u5o9KFwOqtvGRtGZyoJaQceEs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=UstRywn2; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UstRywn2" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 576DRJlh010872; Wed, 6 Aug 2025 15:43:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=y9V7wO4CcM3 kmBxThhFmI681e3jv6WhpYKEn1D50iRQ=; b=UstRywn2TWkOtV3N+PX7XBBGf8N ovGcU/8Rms4egDZtKrCIpKLKNCT8aCPrJ255OTlsgN4TptULTLSVNKkoclk3pwz6 eIxQ/Z8JB0wwK9nXa+tQ6buinuvI1QggEcyT2ya9uswiWrqeK3f25g4zyMa6Ktjr /glwCF5FZlF4NMns69Nh8//DuNHG0YOlOEyTmkzX1GWpMjLyzt5FKhNwLI59ZDmC 5ogkdLulQE4dtVTD7a0N6bly3lz3FlOO+eZMRO0Wyx0tF3Eomo/uy/w0TiU3y1qF lYqkfBtQnYFQxaUKV43kJ40LbxrnBqnSPVB7FRgYl0MM1ohfYe5TqLI/9/A== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48bpy7u981-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Aug 2025 15:43:48 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 576FhiKx022941; Wed, 6 Aug 2025 15:43:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 489brkx9un-1; Wed, 06 Aug 2025 15:43:45 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 576Fhj0d022952; Wed, 6 Aug 2025 15:43:45 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-nitirawa-hyd.qualcomm.com [10.213.109.152]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 576Fhieh022948; Wed, 06 Aug 2025 15:43:45 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2342877) id 5BCB4571922; Wed, 6 Aug 2025 21:13:44 +0530 (+0530) From: Nitin Rawat To: vkoul@kernel.org, kishon@kernel.org, mani@kernel.org, conor+dt@kernel.org, bvanassche@acm.org, andersson@kernel.org, neil.armstrong@linaro.org, dmitry.baryshkov@oss.qualcomm.com, konradybcio@kernel.org, krzk+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Nitin Rawat Subject: [PATCH V1 2/4] arm64: dts: qcom: sm8750: add max-microamp for UFS PHY and PLL supplies Date: Wed, 6 Aug 2025 21:13:38 +0530 Message-ID: <20250806154340.20122-3-quic_nitirawa@quicinc.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250806154340.20122-1-quic_nitirawa@quicinc.com> References: <20250806154340.20122-1-quic_nitirawa@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=Mftsu4/f c=1 sm=1 tr=0 ts=68937834 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=qHNMRFmMqv0oFAATxPMA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: -PmlNWDDSx1qn18EtVWacmOUKMyWfI8k X-Proofpoint-GUID: -PmlNWDDSx1qn18EtVWacmOUKMyWfI8k X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA2MDAwOSBTYWx0ZWRfX15C21FLVXoCq B0MhSQc7xLn++zMOwcnmEqWTOSqEqElOZa//ar+BV19i49c7jLjR1dWc1XWz0OydmGibBjYXEpJ anR86Udz3cQPUdecMkPCR+0yT6d51s6vjTb0QRR90A5V0P2BpmFZdHnRaIdMajSjKtHGZ1jnLZA 3n9G1n8Bn80dVHOAdVupbQrTIHSLohA+H5QjQ47ml0CJBayHPZFybGsxiijTKJhcfimH1Kw8rEs JrmEfgYSO4NF4sH2b8Kvzl5/ywxQt4aHbkXHO/Mo2j2Pq/J7QQHya+9fJN5lLx9mlClhZf7dei9 r0qzE3zfGB/Lke2mmvGyXFsQQmu5AG7+Ag8uH2ya00/vduyWLZ1/uzcoBtx32XGmLdYfnZmwdQr saUOLbpf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-06_04,2025-08-06_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 priorityscore=1501 phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508060009 Content-Type: text/plain; charset="utf-8" Add `vdda-phy-max-microamp` and `vdda-pll-max-microamp` properties to the UFS PHY node in the device tree. These properties define the maximum current (in microamps) expected from the PHY and PLL regulators. This allows the PHY driver to configure regulator load accurately and ensure proper regulator mode based on load requirements. Signed-off-by: Nitin Rawat --- arch/arm64/boot/dts/qcom/sm8750-mtp.dts | 2 ++ arch/arm64/boot/dts/qcom/sm8750-qrd.dts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8750-mtp.dts b/arch/arm64/boot/dts/= qcom/sm8750-mtp.dts index 75cfbb510be5..2ae5915fe38d 100644 --- a/arch/arm64/boot/dts/qcom/sm8750-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8750-mtp.dts @@ -1032,7 +1032,9 @@ wcd_default: wcd-reset-n-active-state { =20 &ufs_mem_phy { vdda-phy-supply =3D <&vreg_l1j_0p91>; + vdda-phy-max-microamp =3D <213000>; vdda-pll-supply =3D <&vreg_l3g_1p2>; + vdda-pll-max-microamp =3D <18300>; =20 status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sm8750-qrd.dts b/arch/arm64/boot/dts/= qcom/sm8750-qrd.dts index 13c7b9664c89..e9a41d34e2d6 100644 --- a/arch/arm64/boot/dts/qcom/sm8750-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8750-qrd.dts @@ -1039,7 +1039,9 @@ &uart7 { =20 &ufs_mem_phy { vdda-phy-supply =3D <&vreg_l1j_0p91>; + vdda-phy-max-microamp =3D <213000>; vdda-pll-supply =3D <&vreg_l3g_1p2>; + vdda-pll-max-microamp =3D <18300>; =20 status =3D "okay"; }; --=20 2.48.1 From nobody Sun Oct 5 09:07:58 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1225E28A1E7; Wed, 6 Aug 2025 15:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495049; cv=none; b=hCXWhvXpCnb5+eCJ0zpFTKoyLfCZftAfDgIt7bNSIqBZOKtrpFffIFU5EEZQlUFgottEq4TZ1nHqv5DRGEUUsQzs5GWrutsf4294CC00k0chx2vKe4JTcNRml172ryb+yVZeBfGHMyOOwqYVCLSJf/+1ecOLxYET2MoKDGp4nN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495049; c=relaxed/simple; bh=pDy/1qOeOChmM2CV8ZaLiCDdTP7HScPcVGzC73YD5e0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uzi1jzVxDLWOA8DxEzZPUpTo/rp+1WJM+MqWG8rRGbiIaPmceTWZxBRqglU7huuc6lic1eYIcNynlLIvjw7KS7O54uPMyhMIRxNKme3AZ9uk68SiYr8dr9k3zdkuNZYD2Ihywl2dcU26vziLAORXgmStgyvCHGpnXBh+bw2fwLI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Eg1LCu56; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Eg1LCu56" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 576AMsZp017483; Wed, 6 Aug 2025 15:43:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=IsWfsVTApBM Ug9Jimj6VrDClaqRQJrZuUah8ATnJRMQ=; b=Eg1LCu56k+CIqS8VJfboyc5am0l smV6jLWzAo30LsMHdkqnRVjjhEh1okYGYSl68Q5sft9TnyeUvVIH1TTGmsp1uYDS orkPIeT2pIhFuzNA07FidWKiUMqReUqFtj/uqXD3pe7QMQoxv614hYTaWP83gf6f mWGIH1qw8C0xW3x+s4o3rtFV6Azd8gd+jhrUuNJqA0SxgCrXuQ9JuPwuqQLLzAuz CVTRNF+gv09hpWV5AmnrWVKOM3ilRoOm8sa8ljAX7OcCE2UTqbBsOnTyKa5EgYPi 4ZSUhNPzu+/qI1W/ZgPdBEKxlPYUHeIy2tXtNxLprQ6P1+NQmfcCIy3ULXw== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48c5868uqp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Aug 2025 15:43:49 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 576Fhki5022969; Wed, 6 Aug 2025 15:43:46 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 489brkx9ut-1; Wed, 06 Aug 2025 15:43:46 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 576FhkZb022964; Wed, 6 Aug 2025 15:43:46 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-nitirawa-hyd.qualcomm.com [10.213.109.152]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 576FhkOB022963; Wed, 06 Aug 2025 15:43:46 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2342877) id AE62D571922; Wed, 6 Aug 2025 21:13:45 +0530 (+0530) From: Nitin Rawat To: vkoul@kernel.org, kishon@kernel.org, mani@kernel.org, conor+dt@kernel.org, bvanassche@acm.org, andersson@kernel.org, neil.armstrong@linaro.org, dmitry.baryshkov@oss.qualcomm.com, konradybcio@kernel.org, krzk+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Nitin Rawat Subject: [PATCH V1 3/4] arm64: dts: qcom: sm8650: add max-microamp for UFS PHY and PLL supplies Date: Wed, 6 Aug 2025 21:13:39 +0530 Message-ID: <20250806154340.20122-4-quic_nitirawa@quicinc.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250806154340.20122-1-quic_nitirawa@quicinc.com> References: <20250806154340.20122-1-quic_nitirawa@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: r3Ml9cxUFq3SHXZfhmPHG0j8Pvb6SCmn X-Authority-Analysis: v=2.4 cv=MZpsu4/f c=1 sm=1 tr=0 ts=68937835 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=b944Eujiixzs7VeoIpIA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: r3Ml9cxUFq3SHXZfhmPHG0j8Pvb6SCmn X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA2MDA2NCBTYWx0ZWRfX6hREKWPeXzKS i26sicA17rer7Lly2/RFWCo9NOeVrYEDV0+nG6nXEQoyRhuP047/d/9yuNtR9yd2UlOTRt3kDxO dY75RReyXRgT9dDuhV8PeS1lh+GaDtGzyPiohqVue4I8XVT+IHohG2yQmn8J7PtmeMPsT/k7xMY TSeiUCsXgnY3fs6uT4dFbc3j6Hny/zbBYEncsig/k31dODj6dJPUfh0jA714HOXxE72ysX2G+iH 48ungKB0zvi4hDOD0lKMXKhhlgAYCiWchKoXf799lXBkZFbthDtI7JJ7WorPfqcKPfApHZqeMKS ChH3Be+P+U0QdaB07rzO/9+3qHXtubOoGtj8fR8C63eCam01J4hvKX1yQeXK1oFGU/Ad4q5dwTf s45hAKv8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-06_04,2025-08-06_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 spamscore=0 clxscore=1015 bulkscore=0 adultscore=0 suspectscore=0 phishscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508060064 Content-Type: text/plain; charset="utf-8" Add `vdda-phy-max-microamp` and `vdda-pll-max-microamp` properties to the UFS PHY node in the device tree. These properties define the maximum current (in microamps) expected from the PHY and PLL regulators. This allows the PHY driver to configure regulator load accurately and ensure proper regulator mode based on load requirements. Signed-off-by: Nitin Rawat --- arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 2 ++ arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 3 ++- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/= qcom/sm8650-hdk.dts index d0912735b54e..356254b11906 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts @@ -1294,7 +1294,9 @@ &ufs_mem_hc { =20 &ufs_mem_phy { vdda-phy-supply =3D <&vreg_l1d_0p88>; + vdda-phy-max-microamp =3D <211000>; vdda-pll-supply =3D <&vreg_l3i_1p2>; + vdda-pll-max-microamp =3D <18300>; =20 status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/= qcom/sm8650-mtp.dts index 76ef43c10f77..f47f62e0b0d9 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts @@ -841,8 +841,9 @@ &ufs_mem_hc { =20 &ufs_mem_phy { vdda-phy-supply =3D <&vreg_l1d_0p88>; + vdda-phy-max-microamp =3D <211000>; vdda-pll-supply =3D <&vreg_l3i_1p2>; - + vdda-pll-max-microamp =3D <18300>; status =3D "okay"; }; =20 diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/= qcom/sm8650-qrd.dts index 71033fba21b5..c4359f8033e3 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts @@ -1277,7 +1277,9 @@ &ufs_mem_hc { =20 &ufs_mem_phy { vdda-phy-supply =3D <&vreg_l1d_0p88>; + vdda-phy-max-microamp =3D <211000>; vdda-pll-supply =3D <&vreg_l3i_1p2>; + vdda-pll-max-microamp =3D <18300>; =20 status =3D "okay"; }; --=20 2.48.1 From nobody Sun Oct 5 09:07:58 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6CD229CB3E; Wed, 6 Aug 2025 15:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495052; cv=none; b=ncxL32KMn7lFTGn1HHzE9+xH+J1Y04z0DmHfmFCjVWUNak0Y6M6Q5TQLoNIIk+mYmnv4jVGp8WnUIB5Gn7HZ8PVqEbDxZAN351eT1MAWWPtG0RUW/lOZqN1FzOhDFS6dPnOlznYsASOIQZ/+gRMBTVehNp99zv2jgPsZC2hQMm8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754495052; c=relaxed/simple; bh=EjZ/DqORYPlgqOegKmCXffYhm7VH9ePWwNyMgG4EBiM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LjSub2ofV0UyPbAzofMjkaG7dZ4CXituc6DK2P/2Ka9wgtduoiACeshFuplUlP21rTS98ARB9Hl74kKcnWEpynUX9doLqqJ1iEvnAVLQ++yUPqjDtmGDg60LmLePUlHRIYtOZb8yemuGh4yrRTGl36JNzoBdkVbEcVMtODHb6LI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=QVl9K2I1; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="QVl9K2I1" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 576Cieg0031794; Wed, 6 Aug 2025 15:43:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=ajTxLat5914 gJlG1INUPF3AMODh4GFphEfW4X7h3aag=; b=QVl9K2I1lw23w8LqQ+HGeuzryKc PueOEREy/jxyfb1J132s3V6f1e587WwhiFIcJ0wLbnYBH4WVRDF11+65z94uSsem 1XUUUW9++9Uml9tNRbQwBrySuvbw6tKjRE388qvZLJ+xLsEDoG6k3ID+goiLydsY WJ+Mb2aqgftZweEU5HfMkHQ6TBYZQYQQHc9R+eL/7hE/KcMTR7ugdlMbw8sTPhuQ Hg2ubaiwBfJldj8oe4PzBEZQrFwp5t4QmRocvlfEwGEWLPvn2s0L4ZN/2z2MWL2h VmAqv1rH31+hdum1RVZT0eHWyUav+PJ2GzJix9fVL0J1IfhEHGRtBkBPW3Q== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48bpybb9gk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Aug 2025 15:43:51 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 576Fhm9E022987; Wed, 6 Aug 2025 15:43:48 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 489brkx9v1-1; Wed, 06 Aug 2025 15:43:48 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 576FhhfY022934; Wed, 6 Aug 2025 15:43:48 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-nitirawa-hyd.qualcomm.com [10.213.109.152]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 576FhlIp022976; Wed, 06 Aug 2025 15:43:48 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2342877) id 39E0D571922; Wed, 6 Aug 2025 21:13:47 +0530 (+0530) From: Nitin Rawat To: vkoul@kernel.org, kishon@kernel.org, mani@kernel.org, conor+dt@kernel.org, bvanassche@acm.org, andersson@kernel.org, neil.armstrong@linaro.org, dmitry.baryshkov@oss.qualcomm.com, konradybcio@kernel.org, krzk+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Nitin Rawat Subject: [PATCH V1 4/4] phy: qcom-qmp-ufs: read max-microamp values from device tree Date: Wed, 6 Aug 2025 21:13:40 +0530 Message-ID: <20250806154340.20122-5-quic_nitirawa@quicinc.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250806154340.20122-1-quic_nitirawa@quicinc.com> References: <20250806154340.20122-1-quic_nitirawa@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA2MDAwOSBTYWx0ZWRfX0gO8BORbdZ9o O+S8NO+74WjIl33VTMsn3nyMohNGrru8UXtySi9HwxIOq74Z8uD3rHd3I/7W5UlZS+C9CR4/b0l ddbDYGhW0pNS3UgWTV39Y8tEV/8oAsijxwNjS3j6MG4FafoRv9BubOwsaZCiBB84p7a8r8YEsVh m3CRICd0Ag/19246bISZIlLUMs5i2R7ck/5MBjEi9aWD1NMM0odKTc/ZjRLMlh0Zax2+fqs4Msr wBpyjtQOLr4ev5vKh9NCEK8AY1SlkoJv3sBm2sZ5nE7A7EMKU2Z8EF3FVVoH8eqscaF/iemXcD3 Pkc0H64rAeOwglNyTA70mK0zv4S7KAmTxhLbutixc940zf9JoBiUlN/s5389092qjQ/xgbxFuAz O9f0/TB3 X-Proofpoint-GUID: qR9AKQ1lFiuSarQ5PofuYQekFUHDsni2 X-Authority-Analysis: v=2.4 cv=EavIQOmC c=1 sm=1 tr=0 ts=68937837 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=MdcHHQUUFhuGihZeNYkA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: qR9AKQ1lFiuSarQ5PofuYQekFUHDsni2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-06_04,2025-08-06_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 priorityscore=1501 adultscore=0 bulkscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508060009 Content-Type: text/plain; charset="utf-8" Add support in QMP PHY driver to read optional vdda-phy-max-microamp and vdda-pll-max-microamp properties from the device tree. These properties define the expected maximum current (in microamps) for each supply. The driver uses this information to configure regulators more accurately and ensure they operate in the correct mode based on client load requirements. If the property is not present, the driver defaults load to `QMP_VREG_UNUSED`. Signed-off-by: Nitin Rawat --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm= /phy-qcom-qmp-ufs.c index 9c69c77d10c8..6e116f7370c3 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -39,6 +39,8 @@ #define PHY_INIT_COMPLETE_TIMEOUT 10000 =20 #define NUM_OVERLAY 2 +#define QMP_VREG_UNUSED -1 +#define MAX_PROP_NAME 32 =20 /* set of registers with offsets different per-PHY */ enum qphy_reg_layout { @@ -1894,15 +1896,29 @@ static int qmp_ufs_vreg_init(struct qmp_ufs *qmp) { const struct qmp_phy_cfg *cfg =3D qmp->cfg; struct device *dev =3D qmp->dev; + struct device_node *np =3D dev->of_node; + char prop_name[MAX_PROP_NAME]; int num =3D cfg->num_vregs; - int i; + const char *supply; + int i, ret; =20 qmp->vregs =3D devm_kcalloc(dev, num, sizeof(*qmp->vregs), GFP_KERNEL); if (!qmp->vregs) return -ENOMEM; =20 - for (i =3D 0; i < num; i++) - qmp->vregs[i].supply =3D cfg->vreg_list[i]; + for (i =3D 0; i < num; i++) { + supply =3D cfg->vreg_list[i]; + qmp->vregs[i].supply =3D supply; + + /* Defaults to unused */ + qmp->vregs[i].init_load_uA =3D QMP_VREG_UNUSED; + + snprintf(prop_name, sizeof(prop_name), "%s-max-microamp", supply); + ret =3D of_property_read_u32(np, prop_name, &qmp->vregs[i].init_load_uA); + if (ret) + dev_dbg(qmp->dev, "No max microamp for %s, using default %d\n", + supply, QMP_VREG_UNUSED); + } =20 return devm_regulator_bulk_get(dev, num, qmp->vregs); } --=20 2.48.1