From mboxrd@z Thu Jan 1 00:00:00 1970 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 DCCF72FE582 for ; Fri, 16 Jan 2026 08:18:51 +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=1768551533; cv=none; b=KH1HJUZgWSIRR34UGR8xD24awG5sGozDFE+CENiCoMwycTQ+NPUt9poUHqwlDRihcfIhziEWCvam34cJbSYj5OCf/cVAFFW9FK2VzmwK/GMUUZ3ClkSNizxehMxtgTv3i9QncOw0hiaWwaW17sp1BpMQ/Ez0SNDfBJSzbc1OEfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768551533; c=relaxed/simple; bh=U+I94Iug51nnAGv9ldMSSkhYbbafjdGKXLZnJRVe/2M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OSOyveneyLdtW6K6eEH+PNVBeErC/r2aIjqflSoOcPYqWbe9A6OFQn0qBI3RPvP3fTIGCCG/7Dt0znwWXvCJ4kloLC9z3RY3RF74Cw/9kVNfDNStJW+kwZJlBCj0h111ejl2moNocyOg8xYR3THAsQ+vzIDywx/+mhoS4YF42e0= 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=PUSJ/j1r; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kCuiLE0u; arc=none smtp.client-ip=205.220.168.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="PUSJ/j1r"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kCuiLE0u" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60FMkuUM3892921 for ; Fri, 16 Jan 2026 08:18:51 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= iGunpU00SNV3xbEPHhyWD3SLNLFixk/WUO0vwRyUqcQ=; b=PUSJ/j1rXH0/BX/3 KoYxXb0PrnVDSc6NtD2MRhAHjmd3CfwsMbQ/iCRwQLk4dEOSSBCztCFVVWzxdLMI tED4Vh44z+mzG6mYFmlspui0p9VvtT/X40wzMJazTbkj1vVlSNTwcO0Fri2sdQ1u BdDIcYjvzFPpkgIqEOxRVOKOOZg+hS+9jGcUcqoNYik/O3exFGczTjB5Cm4ISrJx pVMoBabWzSCuumgcIl0QGP6zUNLacLaEFX6cum1tITu0lsyGKNs6ps81xgtVyrGQ uLeDE9oTBO+pf7dfOCHsOfTEVBYw82YkJePQ4Es8WtplIcMYTK5YuwHXKluWQhlU kYjVHg== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bq9b09c4h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 16 Jan 2026 08:18:51 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2a351686c17so17679995ad.0 for ; Fri, 16 Jan 2026 00:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768551530; x=1769156330; 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=iGunpU00SNV3xbEPHhyWD3SLNLFixk/WUO0vwRyUqcQ=; b=kCuiLE0uSZuOdLkRruR5VPevY4xCBxjO5Ng8MFUKFzgKLaEzFaA115b3wc8oILQHcW INH6mXqbBluejYCtIkEyHBCWf6PfWpRVhNs6QxW3GLQj4jEivS9MZX0ClwX/ypJdbxDD VeGwWfqx0ZMI66Ocy+q7gTlTHBVcGjYormAV9PTqivKjy//rVMkI6dqSqc0tiBjRMHaA o7GlUzj0UWN8enqpbeGOD0r2HWHbQePFTlVlCT0JcJk9K5LrKU6CI5Bkp+dLzAhYtIi+ X95nD80OpkfSUoereQNpQ4HRtO/kX3Eo2p+YOI7KEXW4gNIEiNkG0+y2jKCD9d4DNh6e eztg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768551530; x=1769156330; 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=iGunpU00SNV3xbEPHhyWD3SLNLFixk/WUO0vwRyUqcQ=; b=GT69iM9Rd48je+tkXOd2v4KY3ayzk0/Qk5glxTPIMgcCzxny702j8m+lUrZp4MC1b6 gWTTVY0Is2C6T2RNrLBz5/dW5uduEmP5gtzBruBmhwoG/g7tTphWl1D8jI5IyC1p6rv5 dqWUVA3RQQCl7wqpdM29yHZybHiuXxRqRE9AAS73NxH3/xAfjPpj7rb5KeJgbI4M81Yh p4Xg5bSQtSRAik7yDMUpUbTADx7hg+5TSXA4tKXwXNNvXJ7fek1S1/foEAhPby2qo/0N bwH7Yxw3VtjmOXJrqXcmstd4+GlYfFWdt/x7rkqRicJaPKiG39UQ2jCw4KLOGOHazJxz tJ1g== X-Forwarded-Encrypted: i=1; AJvYcCVO4C78zuAfBJNPBxBMjMI0Gm9vS63nmLV0cJYXTHb0FOm9YmmVTRUUc9iWDoEUNNwHN0hF6ccKkqS7X2g=@vger.kernel.org X-Gm-Message-State: AOJu0YxkYyTaDdrzbh150hhopJcgghrbWZGDLtTaJo5lgTcNZ7viXZU+ zbyNN8DfUqcqMrfE4NLleoVbanH89EVsnkpIMJ9iXGZRh2RLn+qfazb8QIp8SYkjT1BbpjRIWNH g2vOerSv+GmzpqmFWTL66RUVtWkACyWG92dogno9UyZJTI1cKHbryf1djhyrKvLB9SyY= X-Gm-Gg: AY/fxX64WbRiftKmQLbNuRe2NU9b17aBA9UoKrWK6as9nWTAbA+OcuHHcNY+hpy91T1 aTg0p3feqmoydCyrFg7n78MHvg+Pv5fksglEqme9I/519KlKSHM2VRvi05CF4HJnDIjgs0lGmyu hUSEjGLo60nPtp3aRby2T8y0nUidAq9e2GDbEu3HEPksGiCK3Xm1DvwNy6qOSQNDbnAPMAi2Xy+ Q4tG47AkVQLkb5oBV7OJu4p4So6vZ3lgMGtS/Na+e+SJKjeyGFmCQpo/svADdlsvXb7HJEzK52q PpEvv8uIogxU48Wgpcra47ktEJaduUqxlYEwfOPtQe/QJhrxg+ek4ABtoihbQlYD7/LKIGIsiqB b1PSnbhvV6LHxcAJem6nfBmxIgDY9lZJNWZCsL8PGxcmDLo6TAqhFm/RRfl++pjBWReKCd/C9zS OgLXOk X-Received: by 2002:a17:902:da83:b0:2a1:3dae:8f22 with SMTP id d9443c01a7336-2a717808b49mr17698935ad.61.1768551530391; Fri, 16 Jan 2026 00:18:50 -0800 (PST) X-Received: by 2002:a17:902:da83:b0:2a1:3dae:8f22 with SMTP id d9443c01a7336-2a717808b49mr17698695ad.61.1768551529909; Fri, 16 Jan 2026 00:18:49 -0800 (PST) Received: from [10.133.33.64] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a7193dbb7fsm13994655ad.64.2026.01.16.00.18.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jan 2026 00:18:49 -0800 (PST) Message-ID: <80411ac4-6143-4c2e-bc9e-20a734f15987@oss.qualcomm.com> Date: Fri, 16 Jan 2026 16:18: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] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting To: Dmitry Baryshkov Cc: Konrad Dybcio , Vinod Koul , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com> <5187dc04-a1a1-4537-9c80-aaa100dd0033@oss.qualcomm.com> <33d57a53-93b4-4ea3-a7bb-0b2015501bad@oss.qualcomm.com> Content-Language: en-US From: Yongxing Mou In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: 6a4Bvw7wG_CV1gG_koJY-o1z6FdbD_T6 X-Proofpoint-ORIG-GUID: 6a4Bvw7wG_CV1gG_koJY-o1z6FdbD_T6 X-Authority-Analysis: v=2.4 cv=TcmbdBQh c=1 sm=1 tr=0 ts=6969f46b cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=lPA2UZEUP2jnaNcI3IQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTE2MDA2MCBTYWx0ZWRfXxT6p2DwgUn8o oxOeUyA3KmDV3Gx3SA5b6JDu9A5dP8hZWcdWbhcGNoG4ZjwOdElQmOsBmyqtkRKxNccZj8az31G Mepvls+xQgvcfMx0BYgTvlO3P/4QaEA7+3sN/bUlrGNr8OPViLeejdGF1X/wIX7Cjl6gmhqaY9Z R9l3PNxL+hZu0IHofVxae5tslaVx33ncAYUc+njvG4SfV0vU0gh0w7ITtBIxipCYD1jPP7+8TzH qjARFrPfrEiMAL12AvzazpDNlPJSHlwxnq54sG0VIVHOGePbUwAfxfUdv+a/j2kp2aGV5n6dulH QbX6Q70V4BeXjZDz8wuA6ut4CLmgYlck0sPiPT3ibPjnC8TpJAznx2irCDW3ve4E87ioWTo9TsH vezge2cSWpRI7M94vOaCUohJTo+s8EHAHJRmK5al+a0YmFrfA1UhXmq7pzrelh4mpoUJHT6SN97 gODmHU1jB9GJ1w6Hc2A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-16_02,2026-01-15_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601160060 On 1/14/2026 2:55 AM, Dmitry Baryshkov wrote: > On Tue, Jan 13, 2026 at 08:04:06PM +0800, Yongxing Mou wrote: >> >> >> On 1/9/2026 5:58 PM, Konrad Dybcio wrote: >>> On 1/9/26 9:30 AM, Yongxing Mou wrote: >>>> Currently, the LeMans/Monaco DP PHY operates in DP mode rather than eDP >>>> mode. Per the PHY HPG, the Swing and Emphasis settings have been corrected >>>> to the appropriate DP-mode values. >>>> >>>> Additionally, the HPG specifies that the LDO value should be set to 0 when >>>> in DP mode. These misconfigurations can lead to link training failures on >>>> certain dongles. >>>> >>>> Signed-off-by: Yongxing Mou >>>> --- >>>> drivers/phy/qualcomm/phy-qcom-edp.c | 27 ++++++++++++++++++++++++--- >>>> 1 file changed, 24 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c >>>> index 13feab99feec..5b0d774bd715 100644 >>>> --- a/drivers/phy/qualcomm/phy-qcom-edp.c >>>> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c >>>> @@ -122,6 +122,13 @@ static const u8 dp_swing_hbr_rbr[4][4] = { >>>> { 0x1f, 0xff, 0xff, 0xff } >>>> }; >>>> +static const u8 dp_swing_hbr_rbr_v1[4][4] = { >>>> + { 0x07, 0x0f, 0x16, 0x1f }, >>>> + { 0x11, 0x1e, 0x1f, 0xff }, >>>> + { 0x16, 0x1f, 0xff, 0xff }, >>>> + { 0x1f, 0xff, 0xff, 0xff } >>>> +}; >>> >>> For these platforms, I see 4 tables of settings: >>> >>> (Low/High) Swing/Pre-em for (Low/High) HBR >>> >>> None of them exactly match your change >>> >> Emm, this table is in LeMans eDP HPG, here are 6 tables. 4 of them use for >> eDP mode and reset 2 tables used for DP mode. If my understanding is >> incorrect, please correct me. Thanks ~~~ > [...] >>> >>>> - ldo_config = edp->is_edp ? 0x0 : 0x1; >>>> + ldo_config = !edp->is_edp ? 0x0 : 0x1; >>> >>> You'll notice that this is further wrong, because for eDP, it should be >>> 0x81 at low-swing-high-HBR and 0xc1 at low-swing-low-HBR, and 0 at both >>> cases of high-swing >>> >>> Please split the LDO change into a separate commit because it touches >>> more platforms >>> >>> Konrad >>> >> >> Yes, you are right, here seems something not correct. i will separate this >> change into single one.Here are some parts I don't fully understand here. >> Could you please point it? How do we know whether it is in low‑swing or >> high‑swing. I didn’t see any logic in the current code that determines this. >> Also, the value in Hamoa seems not same with LeMans,it is 0x51 and 0x91. >> >> While going through the Hamoa HPG, I noticed a potential issue. >> >> static struct qcom_edp_phy_cfg x1e80100_phy_cfg = { >> .aux_cfg = edp_phy_aux_cfg_v4, >> .vco_div_cfg = edp_phy_vco_div_cfg_v4, >> .swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg,...It use >> dp_phy_swing_pre_emph_cfg not edp_phy_swing_pre_emph_cfg, but Hamoa really >> use edp-panel here.. so does this phy cfg correct here? > > All PHYs should support eDP and DP modes, so most of the configuration > tables need to be updated/fixed. I tried going through all the tables, > but I never had time to do it in a sane and complete way. As you started > looking into it, would you please review programming for all chipsets > starting from SC8180X? > I don't got the SC8180X PHY HPG permission now. once i got it, will check it's configuration and see what i can do. But first i want to correct the LeMans and Hamoa configuration and post the LDO change. Do you mean switching between the eDP and DP mode tables based on is_edp, instead of using a fixed table?