From mboxrd@z Thu Jan 1 00:00:00 1970 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 986283E5A04 for ; Mon, 15 Jun 2026 12:12:51 +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=1781525572; cv=none; b=CqCk6zdTXD8UwmQI9ikJKPsHLFyxXHvkgJLkVfgxtXPfoUwzHeMxDNSF3ukI5oBu1iXnzlz+JfFuMZbKpjwlNymSwwQwWU0gT7KVweqSWoNrd6U/e6kL4eBYnEcXxJl/iSjy1+RSc5RXXSXWag+d5VDwvOdm4SrW9+AeY7husH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781525572; c=relaxed/simple; bh=GsQoEQnPlKYnZPQmyrDFZUSt2mrMQVwGy2vgcNIQTZk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fqU6G5lAkZ0cV9iTXZeZ2GZ8U3ta4+r293++s91VRgrUr+Zk2UrAIvJD+jSCJeslSR05LmbV11opTsyG0elThl6OChssch3L9GKsJpmqc0VaFCEgpnWtdTGvy5nkMLbHAxh1WkOhAohsH1cxyKJ4o6JlmZcTYjWkvtoofISHO4k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=jeM7KCim; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hQVkpjge; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="jeM7KCim"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hQVkpjge" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FBoVUS464209 for ; Mon, 15 Jun 2026 12:12:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 6DrWIt30qa8JhqcqMonL+wcWL/FZS9HuUKd2HFVHsiA=; b=jeM7KCimtOWvqj47 +EeRXB4p1cmlIowdf9n4/A69FM/UpeJlq1Ewxk+jFKJ2UDm/cgrwxb4dGKLpD3fV zv+Qhl+D2WzkbEF70QGKJ+7pAe0YKXKk20zKWoNHaRWmgSvSDG55Lwa+LsLkZe0L qFeuQ+mVYlWlHUy7HbOcx7VBHIPpPVxraVnntu+HwvByJyjEVrdh1r1gP6c6OcXV EGqrgEFyet0+CmRX6+qO2n8AB0aR4YDQTqqoK7J1nu1YXgU831NEmySKHdm1rFdV NBPUhsRdt1YNA+IhkR0ZbqmjNVdWKKOyXXNi2Z7pozlzCLsyS5GkX7LoCuyIoODm 4pH+JQ== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etgvhg2kt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 12:12:50 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c8611b27631so2379506a12.0 for ; Mon, 15 Jun 2026 05:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781525569; x=1782130369; 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=6DrWIt30qa8JhqcqMonL+wcWL/FZS9HuUKd2HFVHsiA=; b=hQVkpjgeAQ6N2lcxzRM1a2FFgUCNA464D3Y8iadFx2yj1nJva9nAN8jt7KIK1J5meq B7pf6TuG6nAWxHxbGKyxjyIA2dFAq6P0ATR+qUoIBclC81at//kgM9O715KLUTnnmJgX Scda0W0rbazOdOBiFSfbCo/XQdN4G3m82IdIiqS50Hrq5cXZb6B+zvY6IqDx116yvVoP dNKOavMcVQQxCOMuSTSdXqSjc+3sm7VRzcQn2af2EMhd/zE2SMmUgPhI9L/INq5JGueD EsYv7/CoUs4Fao80C68P11yuR1v/cfRAxHP0W5kMh2E7HI/kkYbnXaZ9qTwJ2tPRkArO D7EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781525569; x=1782130369; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6DrWIt30qa8JhqcqMonL+wcWL/FZS9HuUKd2HFVHsiA=; b=RCWQZo5X5RoUrdT+f2HK6sucsHG8gar3HMVi66/PVBn/348aImdy5vJBM+g9VCEA4F oqdxkWSTVysgv6m1GrOFQDGtZ89ejdjrM1wPi/leoBG1ShNo2nryC9o/RYYjuGHKZxgB NUDEtNGk2owkCoWSi5NP0Yv2h7PtVh30oNiADrODC1T4LnHQfC18CFU7TWXtkB1Nqc8R /LJsys2XvIkJ3oO8lQXMhN4zdew45IY724oRh987PRaAPGURINjObuShw5+leh9I/oDv FtStd2O3jct7J6MWd87YjxVcx/dDeWFBIXsap6u3llkyne5qVbHkLvv544HXsRf2O0eP BrWg== X-Forwarded-Encrypted: i=1; AFNElJ/lIdmVXQGSLx7P1vIDZTZ3AMuSjEnkBq6LoZXPtbgCAByiPO9lwFREGJYZ7HX4B8YnMHFzY8HsU7pnLik=@vger.kernel.org X-Gm-Message-State: AOJu0YyHyQEa0wk9Vc1LOGflzLXLcvSPoSdOtG1muSkcVeHhn9dj5Xk5 o5skvw18eM3cbp26RnuUTOV+gOl1ecvphZ9IdVQmQtXUcdDztJwBBPgtLSDZ1ujMI7vMU4l8edq XxsLC4fQ723qaCNyhGQareQ4p4OeLqt2s5ERJdcF7dUcsWOI5tuKsor0om6zdo9YNQsA= X-Gm-Gg: Acq92OFyK/jJlPswcbn1UM1Aav+GU6rNuegN6sg4FPbbIWACBeKtc6BH+JjeW7l1pM1 GwZ1dBbJV2xJCBXAS/pX4PybsVMo/E7GzvyCNoQJLWhfSMfwK2lsDU7j/bZ79rXlu1+ZtXUo4jX h5Xw9HrGOVhZ2pscXcbK0s+YVzbeE6dudEtv5pO0hOgsHTd2T1zPQrDAReZ5/+Vqio4yUI9zKVH caw/EkPQqFFpYnrO36EM30l1IpCpbT0Ia8ArfWTemNSI0jWJ9E+WA6Pek7iXZv9rhkcf2iT/jkz I3jpa34X1xFPCYU9GIZTbM9qUrsFGiKMn49O26ZG4k11pLpBhHIOqNOa7ixAgvPe6msAIFtvW62 yWdDc8H2syhSisqSrjPusMWX2ZfkgZcQP8sKj7WH6LqqpZX4egKoO0zW6d1S7NuOxEeTGHIC/Oo sL5rUbqdspaQ== X-Received: by 2002:a17:902:ea07:b0:2b2:4fc1:f653 with SMTP id d9443c01a7336-2c42c819bf8mr95953045ad.3.1781525569437; Mon, 15 Jun 2026 05:12:49 -0700 (PDT) X-Received: by 2002:a17:902:ea07:b0:2b2:4fc1:f653 with SMTP id d9443c01a7336-2c42c819bf8mr95952755ad.3.1781525568854; Mon, 15 Jun 2026 05:12:48 -0700 (PDT) Received: from [10.133.33.44] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c4327ac794sm100277845ad.46.2026.06.15.05.12.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2026 05:12:48 -0700 (PDT) Message-ID: <41e340c6-f1a5-4541-8842-2bfad2ad90bf@oss.qualcomm.com> Date: Mon, 15 Jun 2026 20:12:43 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 1/2] dt-bindings: ufs: Document static TX Equalization settings properties To: Krzysztof Kozlowski , bvanassche@acm.org, beanhuo@micron.com, peter.wang@mediatek.com, martin.petersen@oracle.com, mani@kernel.org Cc: linux-scsi@vger.kernel.org, Alim Akhtar , Avri Altman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ram Kumar Dwivedi , Zhaoming Luo , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list References: <20260615085027.2102882-1-can.guo@oss.qualcomm.com> <20260615085027.2102882-2-can.guo@oss.qualcomm.com> <8ee6bfe0-71aa-4d3a-a583-f7495a86fc58@kernel.org> Content-Language: en-US From: Can Guo In-Reply-To: <8ee6bfe0-71aa-4d3a-a583-f7495a86fc58@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDEyNyBTYWx0ZWRfX6VEDUvgOpEkh EaXeTgNnYIhjuyek/vBBe/4X/qll8suLsFUofwJLRj6hzP0hS5PE+iapEbHK6Te6VA5tJ8FzJ0M Im2eZfbVV0Le5OlxSV0qnUzoeJBsaTs= X-Authority-Analysis: v=2.4 cv=Zqnd7d7G c=1 sm=1 tr=0 ts=6a2fec42 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=D4ZC7sO_Y8teBw1Q4O0A:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-GUID: g6l9lbspRsieHMzRS4xFwKwYpD89eq8X X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDEyNyBTYWx0ZWRfX5w5AseLI6eVc DQhmY4EzT2dcCaADK/7qn22KUbu2xeVNikQFSgc6SAzXEy31ZlVbvBces6Sbc6OFbJef+SxfpB4 57YllOSmxR3wxG6pN0+Rdian/TvJHfQAB9DZj3wbuPU4byE2762t3HBgTx5cjRSJFHVwCigYSpJ V5RaJ2DjxJOiLtMvqrX9u/NSlCCwLFk7tQn98J0Mr0wj7BRyNQ/TIzFhsd3v6I7Rm15Fp3Xrroe ars9O09+nz1MRR1ZlykEH9dh46LOoTbWDPqCs4p419za2oGRWSI1iHpdLqGfFYGlPor09oQryTp BfFlP8is8QhcxocY/sBCPzCu3Gejoz3Ci7UJjPdcyXEpNTglblgxV1iqJIh6wU34AYp2Z7AIeq8 5xeP7sI1x71MTjV0ZHh9MCvlJO+A80ZDiLth4EEuIuHvNuFssrN/PXxJP/G9KpZJIMVK26MX2NJ Z865jZHmDK5FmlmBCCA== X-Proofpoint-ORIG-GUID: g6l9lbspRsieHMzRS4xFwKwYpD89eq8X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_03,2026-06-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150127 On 6/15/2026 7:26 PM, Krzysztof Kozlowski wrote: > On 15/06/2026 10:50, Can Guo wrote: >> UFS v5.0/UFSHCI v5.0 adds HS-G6 support (46.6 Gbps/lane) via UniPro >> v3.0 and M-PHY v6.0. These specs define TX Equalization for all >> High-Speed Gears (not only HS-G6) to compensate channel loss and >> improve signal integrity at high speed. >> >> For HS-G6, M-PHY uses PAM4 1b1b line coding. Pre-Coding may also be >> required depending on channel characteristics. >> >> Document vendor-neutral properties in ufs-common.yaml: >> - txeq-preshoot-g[1-6] >> - txeq-deemphasis-g[1-6] >> - tx-precode-enable-g6 >> >> Values are per-lane Host/Device tuples (2 values for x1, 4 values for >> x2). PreShoot/DeEmphasis range from 0..7, and Precode is 0/1. >> >> These are board-specific signal-integrity tuning values. They depend on >> channel SI/PHY characterization and validation (host PHY, device PHY, >> package, and board routing), and are determined by HW/PHY designers. >> >> Although UFSHCI v5.0 supports TX Equalization Training via UniPro v3.0, >> which allows host software to determine optimal TX Equalization at >> runtime, static board-specific TX Equalization settings in the Device >> Tree are still necessary because: >> - TX Equalization Training is not supported for HS-G3 and below >> - TX Equalization Training is disabled on some platforms >> >> Signed-off-by: Can Guo >> --- >> .../devicetree/bindings/ufs/ufs-common.yaml | 55 +++++++++++++++++++ >> 1 file changed, 55 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/ufs/ufs-common.yaml b/Documentation/devicetree/bindings/ufs/ufs-common.yaml >> index ed97f5682509..145a6416e1df 100644 >> --- a/Documentation/devicetree/bindings/ufs/ufs-common.yaml >> +++ b/Documentation/devicetree/bindings/ufs/ufs-common.yaml >> @@ -105,6 +105,61 @@ properties: >> Restricts the UFS controller to rate-a or rate-b for both TX and >> RX directions. >> >> + tx-precode-enable-g6: >> + $ref: /schemas/types.yaml#/definitions/uint32-matrix >> + oneOf: >> + - items: >> + - description: Host_Lane0 precode >> + - description: Device_Lane0 precode >> + - items: >> + - description: Host_Lane0 precode >> + - description: Device_Lane0 precode >> + - description: Host_Lane1 precode >> + - description: Device_Lane1 precode >> + items: >> + enum: [0, 1] >> + description: >> + Static TX Precode enable values for HS-G6 only. > My bad here, that was my mistake. I wanted matrix, but gave you array > syntax. Proper code would be: > > tx-precode-enable-g6: > $ref: /schemas/types.yaml#/definitions/uint32-matrix > minItems: 1 > items: > - items: > - description: Host_Lane0 precode > enum: [0, 1] > - description: Device_Lane0 precode > enum: [0, 1] > - items: > - description: Host_Lane1 precode > enum: [0, 1] > - description: Device_Lane1 precode > enum: [0, 1] > description: > Static TX Precode enable values for HS-G6 only. > > > I tested it with DTS and seems to work fine. Please use the same for > other properties, but enum will be 0-7. Sure, I will correct it and validate the same for the next version. Thank you for helping me out. Best Regards, Can Guo. > > Best regards, > Krzysztof