From nobody Thu Apr 2 20:20:43 2026 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 18B902F260E for ; Fri, 13 Feb 2026 07:31:53 +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=1770967916; cv=none; b=JOz5/QwgUrP959H8Gklm8OdSFzRTU8iG2Q3fktKFsVpzO9O5D10My7C5NrAHbVpN+73QG1PWMG7MEc6YKHpt27BIi71Bf4QtZhkvfD6MFZQnsXA3EZNP6qsmBEDraD/aq54P7Cw4+gPH38RgkUV+4MH4mh1P8qVsWdHtExADkoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967916; c=relaxed/simple; bh=MMBXeitiZuY878Tcd7dZwXtn6YzjgtXAK6zo5LiGnbg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TTbDQwTVXuPg6Fg2HGmqaZTcWyA/wVOtk4asXa9FWpwSzyHacxy3xMOxa4DdnRevHzt9kMWwAQb/lwr2l8WzI5X/lzRq4K8VUvSmdhdUim9m8jBv1mjfDPF9ujLfKCZOu57ZBIbqaa1qR5X4KSvmfYdaz/iO0mL3nABdscoEmhw= 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=YVLB5vHx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=O2Yn+5Ll; 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="YVLB5vHx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="O2Yn+5Ll" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61D75gfi3332780 for ; Fri, 13 Feb 2026 07:31:53 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= XeRLOEGF763fWVcc6AlQsZ4UUThF/GMTjGHcT0L0/c0=; b=YVLB5vHxhW9WZ096 U446gyAfYof9GZJ5X+DsjDkfUFrGbTeWU3yXqlaw4N+qCUoYhf3KnYwhrOl8U5bF pUAC6P36o4v8lk28n4sjsvkWAtcl2NmhwIrCDktifsmmvPjAbHEmZQpCx/xItgqB JeTFt6hfN2TCptNFjkAE/P/WuFf5XdBXB89WPwU9/9Axsi4ORhXxCDXGqs05AA14 zKuwx0ojKxLCSQy8skbgCS2CsgWha/d0OYXGlh/GDB0ggh+7t6Mm/MnQkp9UDcgE rrTxdVO1MBTUjfSuhbTW7XnskEDKpMSkDnlaDsspvwc9uLs55tx9ygYhYnrO4DmU VM4N0Q== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c9mb12b7m-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Feb 2026 07:31:53 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8c70d16d5a9so211958685a.3 for ; Thu, 12 Feb 2026 23:31:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770967912; x=1771572712; 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=XeRLOEGF763fWVcc6AlQsZ4UUThF/GMTjGHcT0L0/c0=; b=O2Yn+5Ll6hfapVFWW5OFfZ+n9HpWsb8Ro4l6HN0hU9OeBaWqCM/P/tzjjG2hMpZfrP uj4F7kermGYbk69kxVSm7S77Tqxw1+bxpUZ7cOb36a+LNSyEwKniozTjGCEJKTShGiPf BffSzU+CD8FvN9olvvn4qYFXjDkdMKg/bv7xa097wwrl882MQeQZBncBfu0/vNom+cPQ ZTIuaGnf4ZcRLyT6n067ZJWxID0OR7Mh8vmNsTBocSnB5e8JlTeQRSGXH0/1CGEBXYLz GTg7DHdmW9gwQeSlgpzLM5Fjzxgum+mJyOb70A/x4k0vyd0hmJHgJGpsTR/0OkyT5MfJ 9M/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770967912; x=1771572712; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XeRLOEGF763fWVcc6AlQsZ4UUThF/GMTjGHcT0L0/c0=; b=Cwzk6lHzAFriyD6aaSaOw8WsM1m5cq0o7TjvLsdX7GvRe7834T70Jxiq4fZy0SJ2YC 6RYgIp06zcgRCOChT4a6/Ssqs+KlQjbfOt1Z2pY8fpVw2/46ZccfqlU7aUX9KeC4JysC xfupYit6afw+C/yKTlcRPiFdXu68sbbMuxCeFqPpqy0SbKMtm6mRDENVfPAKi7R/DKyO BdX+scPcptMq8bdHsRtiwJpngq7p5Zdv3UbObKoYtBIhA4ypHbkBZqECUGSyVkyw5V6k PQ+gIKXGfDbVkbvpvn2e9llkgauYzSFMjtY1fRL/cPBDX314k1BNnBQ38Pql9aNlMTJp qbfw== X-Forwarded-Encrypted: i=1; AJvYcCW975vm3WJY2UZlkOz4FigiB6xfjPnpYuVBVrFNRQOIT1eVQ7QKWLENAjWcjTfIv3VEcS9fOM0Dn/HlRLc=@vger.kernel.org X-Gm-Message-State: AOJu0YzsUJiTMHr1ukff1NYoC5z100PUtFHJsafbYuDKgQ6yosB5ZCMX YMVp/5cN9y9qFrQvgNRZxP2B1k4OD8Us2/BrE3DNvAhkd2AuyBDtzZYsA1NiqKt+/Ds77+ZD5nw XAuz3iYLoYOwlD9L6kNnFTHXs+2/o+j5O+jfF3sfIAPxXB4jW0Q2V0pr2cwvcgiQ9z179jnQ0w9 PBdA== X-Gm-Gg: AZuq6aJ1edKgS5w2kCtlqSvLCHjWUh9+l90oULAAPVJPJo5Bjo6hujTV6rPc8L9UmWJ 0q465QXhdF/kaN+ssxz2rJLh4CZrsMSwTJydDONs/ukW7G7wN6MM4Crp91uOyLmeT0rjM5Rj1pC AmtMrzWYW69FZ8v6F+CNRomcU5Jg6QfO0Mh1PPqoZ2Roq9EQtu27GdmfsTVYbNXdSfoMKhidtWU nFQtGdOGnW+Ist7eLgx0qJOiTlSdv5+lqM7xZkr/TgBygpAGk6wGffe9fvKpzQ61lkh8zvNz9n0 W9fl/54jK/Re81zrFL8mk9F5994jQdgmstgP0UN8q0DtlHoreeFUtcXix1XiA00urN+fPTNpswP BkdfhPNriTF23ZNDBDrZpY+8oT0L2Hwu8PM7JP1Z19CH9ZVw9pl6cUtH+SvzRS09DUKGr+yW9Bv yxiSBSYwI= X-Received: by 2002:a05:620a:4809:b0:8c7:1b3c:8e8 with SMTP id af79cd13be357-8cb423c1ecamr101122985a.40.1770967912311; Thu, 12 Feb 2026 23:31:52 -0800 (PST) X-Received: by 2002:a05:620a:4809:b0:8c7:1b3c:8e8 with SMTP id af79cd13be357-8cb423c1ecamr101121885a.40.1770967911743; Thu, 12 Feb 2026 23:31:51 -0800 (PST) Received: from yongmou2.ap.qualcomm.com (Global_NAT1_IAD_FW.qualcomm.com. [129.46.232.65]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8cb2b0bda6fsm541156485a.9.2026.02.12.23.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 23:31:51 -0800 (PST) From: Yongxing Mou Date: Fri, 13 Feb 2026 15:31:42 +0800 Subject: [PATCH v2 1/2] phy: qcom: edp: Add eDP/DP mode switch support 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: quoted-printable Message-Id: <20260213-edp_phy-v2-1-43c40976435e@oss.qualcomm.com> References: <20260213-edp_phy-v2-0-43c40976435e@oss.qualcomm.com> In-Reply-To: <20260213-edp_phy-v2-0-43c40976435e@oss.qualcomm.com> To: Vinod Koul , Neil Armstrong Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Yongxing Mou , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1770967906; l=8385; i=yongxing.mou@oss.qualcomm.com; s=20250910; h=from:subject:message-id; bh=MMBXeitiZuY878Tcd7dZwXtn6YzjgtXAK6zo5LiGnbg=; b=qbTjOlraNg+3CjGW1D9kjHriy/TcD7Anng0ItMYgX6qqV0xIbxb5F3a2e6GNUYzm0SCuunh5p 2dLRHweALrtBjiKlr3EOrE2pU0+suCf7t8lvH8vk9aVzxNyNIezgtN3 X-Developer-Key: i=yongxing.mou@oss.qualcomm.com; a=ed25519; pk=rAy5J1eP+V7OXqH5FJ7ngMCtUrnHhut30ZTldOj52UM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjEzMDA1NyBTYWx0ZWRfX5Pz+58EJXDNN zjpDDhLUnnZ3BgKfGIblOZMURCgjTrBEBiv+dmEBtR1DnQIAacj8+NN5dTvsW93gEy6HQOEHjOC I7I8zzD70KcdhB+rdh1hmLxE2x/i2jVa3x0/v5W6e792o/flfc1NEHNh8h+dmrgNea3aVm8uQui W1ikYmgtx5DsPOIKkyx6cEZmBI8d2I7QQzelp+rC+QWqWDjbdNYUZffL6sG5CUx1xbUI+ILjxDw Z0y03Zpx0YZlEBZRyhKH5+i5GpzQOv/pzJP7N46cGol7PlXipKiBrDLrvO1Vm99TowXNe7y2MYZ uxUT1QWoHm3X8O4vXZJ8dMs0WAAjwBdKlT8PppFNET+zXsSBWekj03Upkxkm94E9qSsxXfpvikF PaSl77rntWlDw6Pik7hCLmkIt5keshNN0jOF9OumL+QBfh1WGDRV6nymp8S3m8quzTZ3d94erq/ CyfXyuqMVkQMa0nRUyg== X-Proofpoint-ORIG-GUID: OHNmKOAqVWu_pZ5dRRZjrbIddhcNlZwS X-Authority-Analysis: v=2.4 cv=asC/yCZV c=1 sm=1 tr=0 ts=698ed369 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=C3Dk8TwHQYyIj7nOf9RCJw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=fAMMRUVWeN1gI5VMqOgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: OHNmKOAqVWu_pZ5dRRZjrbIddhcNlZwS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-13_01,2026-02-12_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602130057 The eDP PHY supports both eDP&DP modes, each requires a different table. The current driver doesn't fully support every combo PHY mode and use either the eDP or DP table when enable the platform. In addition, some platforms mismatch between the mode and the table where DP mode uses the eDP table or eDP mode use the DP table. Clean up and correct the tables for currently supported platforms based on the HPG specification. Here lists the tables can be reused across current platforms. DP mode=EF=BC=9A -sa8775p/sc7280/sc8280xp/x1e80100 -glymur eDP mode(low vdiff): -glymur/sa8775p/sc8280xp/x1e80100 -sc7280 Cc: stable@vger.kernel.org Fixes: f199223cb490 ("phy: qcom: Introduce new eDP PHY driver") Signed-off-by: Yongxing Mou --- drivers/phy/qualcomm/phy-qcom-edp.c | 90 ++++++++++++++++++++++-----------= ---- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy= -qcom-edp.c index 13feab99feec..ff14de41cb1c 100644 --- a/drivers/phy/qualcomm/phy-qcom-edp.c +++ b/drivers/phy/qualcomm/phy-qcom-edp.c @@ -87,7 +87,8 @@ struct qcom_edp_phy_cfg { bool is_edp; const u8 *aux_cfg; const u8 *vco_div_cfg; - const struct qcom_edp_swing_pre_emph_cfg *swing_pre_emph_cfg; + const struct qcom_edp_swing_pre_emph_cfg *dp_swing_pre_emph_cfg; + const struct qcom_edp_swing_pre_emph_cfg *edp_swing_pre_emph_cfg; const struct phy_ver_ops *ver_ops; }; =20 @@ -116,17 +117,17 @@ struct qcom_edp { }; =20 static const u8 dp_swing_hbr_rbr[4][4] =3D { - { 0x08, 0x0f, 0x16, 0x1f }, + { 0x07, 0x0f, 0x16, 0x1f }, { 0x11, 0x1e, 0x1f, 0xff }, { 0x16, 0x1f, 0xff, 0xff }, { 0x1f, 0xff, 0xff, 0xff } }; =20 static const u8 dp_pre_emp_hbr_rbr[4][4] =3D { - { 0x00, 0x0d, 0x14, 0x1a }, + { 0x00, 0x0e, 0x15, 0x1a }, { 0x00, 0x0e, 0x15, 0xff }, { 0x00, 0x0e, 0xff, 0xff }, - { 0x03, 0xff, 0xff, 0xff } + { 0x04, 0xff, 0xff, 0xff } }; =20 static const u8 dp_swing_hbr2_hbr3[4][4] =3D { @@ -150,6 +151,20 @@ static const struct qcom_edp_swing_pre_emph_cfg dp_phy= _swing_pre_emph_cfg =3D { .pre_emphasis_hbr3_hbr2 =3D &dp_pre_emp_hbr2_hbr3, }; =20 +static const u8 dp_pre_emp_hbr_rbr_v8[4][4] =3D { + { 0x00, 0x0e, 0x15, 0x1a }, + { 0x00, 0x0e, 0x15, 0xff }, + { 0x00, 0x0e, 0xff, 0xff }, + { 0x00, 0xff, 0xff, 0xff } +}; + +static const struct qcom_edp_swing_pre_emph_cfg dp_phy_swing_pre_emph_cfg_= v8 =3D { + .swing_hbr_rbr =3D &dp_swing_hbr_rbr, + .swing_hbr3_hbr2 =3D &dp_swing_hbr2_hbr3, + .pre_emphasis_hbr_rbr =3D &dp_pre_emp_hbr_rbr_v8, + .pre_emphasis_hbr3_hbr2 =3D &dp_pre_emp_hbr2_hbr3, +}; + static const u8 edp_swing_hbr_rbr[4][4] =3D { { 0x07, 0x0f, 0x16, 0x1f }, { 0x0d, 0x16, 0x1e, 0xff }, @@ -158,7 +173,7 @@ static const u8 edp_swing_hbr_rbr[4][4] =3D { }; =20 static const u8 edp_pre_emp_hbr_rbr[4][4] =3D { - { 0x05, 0x12, 0x17, 0x1d }, + { 0x05, 0x11, 0x17, 0x1d }, { 0x05, 0x11, 0x18, 0xff }, { 0x06, 0x11, 0xff, 0xff }, { 0x00, 0xff, 0xff, 0xff } @@ -172,10 +187,10 @@ static const u8 edp_swing_hbr2_hbr3[4][4] =3D { }; =20 static const u8 edp_pre_emp_hbr2_hbr3[4][4] =3D { - { 0x08, 0x11, 0x17, 0x1b }, - { 0x00, 0x0c, 0x13, 0xff }, - { 0x05, 0x10, 0xff, 0xff }, - { 0x00, 0xff, 0xff, 0xff } + { 0x0c, 0x15, 0x19, 0x1e }, + { 0x0b, 0x15, 0x19, 0xff }, + { 0x0e, 0x14, 0xff, 0xff }, + { 0x0d, 0xff, 0xff, 0xff } }; =20 static const struct qcom_edp_swing_pre_emph_cfg edp_phy_swing_pre_emph_cfg= =3D { @@ -193,25 +208,25 @@ static const u8 edp_phy_vco_div_cfg_v4[4] =3D { 0x01, 0x01, 0x02, 0x00, }; =20 -static const u8 edp_pre_emp_hbr_rbr_v5[4][4] =3D { - { 0x05, 0x11, 0x17, 0x1d }, - { 0x05, 0x11, 0x18, 0xff }, - { 0x06, 0x11, 0xff, 0xff }, - { 0x00, 0xff, 0xff, 0xff } +static const u8 edp_swing_hbr2_hbr3_v3[4][4] =3D { + { 0x06, 0x11, 0x16, 0x1b }, + { 0x0b, 0x19, 0x1f, 0xff }, + { 0x18, 0x1f, 0xff, 0xff }, + { 0x1f, 0xff, 0xff, 0xff } }; =20 -static const u8 edp_pre_emp_hbr2_hbr3_v5[4][4] =3D { +static const u8 edp_pre_emp_hbr2_hbr3_v3[4][4] =3D { { 0x0c, 0x15, 0x19, 0x1e }, - { 0x0b, 0x15, 0x19, 0xff }, - { 0x0e, 0x14, 0xff, 0xff }, + { 0x09, 0x14, 0x19, 0xff }, + { 0x0f, 0x14, 0xff, 0xff }, { 0x0d, 0xff, 0xff, 0xff } }; =20 -static const struct qcom_edp_swing_pre_emph_cfg edp_phy_swing_pre_emph_cfg= _v5 =3D { +static const struct qcom_edp_swing_pre_emph_cfg edp_phy_swing_pre_emph_cfg= _v3 =3D { .swing_hbr_rbr =3D &edp_swing_hbr_rbr, - .swing_hbr3_hbr2 =3D &edp_swing_hbr2_hbr3, - .pre_emphasis_hbr_rbr =3D &edp_pre_emp_hbr_rbr_v5, - .pre_emphasis_hbr3_hbr2 =3D &edp_pre_emp_hbr2_hbr3_v5, + .swing_hbr3_hbr2 =3D &edp_swing_hbr2_hbr3_v3, + .pre_emphasis_hbr_rbr =3D &edp_pre_emp_hbr_rbr, + .pre_emphasis_hbr3_hbr2 =3D &edp_pre_emp_hbr2_hbr3_v3, }; =20 static const u8 edp_phy_aux_cfg_v5[DP_AUX_CFG_SIZE] =3D { @@ -262,12 +277,7 @@ static int qcom_edp_phy_init(struct phy *phy) DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN, edp->edp + DP_PHY_PD_CTL); =20 - /* - * TODO: Re-work the conditions around setting the cfg8 value - * when more information becomes available about why this is - * even needed. - */ - if (edp->cfg->swing_pre_emph_cfg && !edp->is_edp) + if (!edp->is_edp) aux_cfg[8] =3D 0xb7; =20 writel(0xfc, edp->edp + DP_PHY_MODE); @@ -291,7 +301,7 @@ static int qcom_edp_phy_init(struct phy *phy) =20 static int qcom_edp_set_voltages(struct qcom_edp *edp, const struct phy_co= nfigure_opts_dp *dp_opts) { - const struct qcom_edp_swing_pre_emph_cfg *cfg =3D edp->cfg->swing_pre_emp= h_cfg; + const struct qcom_edp_swing_pre_emph_cfg *cfg; unsigned int v_level =3D 0; unsigned int p_level =3D 0; u8 ldo_config; @@ -299,11 +309,10 @@ static int qcom_edp_set_voltages(struct qcom_edp *edp= , const struct phy_configur u8 emph; int i; =20 - if (!cfg) - return 0; - if (edp->is_edp) - cfg =3D &edp_phy_swing_pre_emph_cfg; + cfg =3D edp->cfg->edp_swing_pre_emph_cfg; + else + cfg =3D edp->cfg->dp_swing_pre_emph_cfg; =20 for (i =3D 0; i < dp_opts->lanes; i++) { v_level =3D max(v_level, dp_opts->voltage[i]); @@ -564,20 +573,24 @@ static const struct qcom_edp_phy_cfg sa8775p_dp_phy_c= fg =3D { .is_edp =3D false, .aux_cfg =3D edp_phy_aux_cfg_v5, .vco_div_cfg =3D edp_phy_vco_div_cfg_v4, - .swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg_v5, + .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg, .ver_ops =3D &qcom_edp_phy_ops_v4, }; =20 static const struct qcom_edp_phy_cfg sc7280_dp_phy_cfg =3D { .aux_cfg =3D edp_phy_aux_cfg_v4, .vco_div_cfg =3D edp_phy_vco_div_cfg_v4, + .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg_v3, .ver_ops =3D &qcom_edp_phy_ops_v4, }; =20 static const struct qcom_edp_phy_cfg sc8280xp_dp_phy_cfg =3D { .aux_cfg =3D edp_phy_aux_cfg_v4, .vco_div_cfg =3D edp_phy_vco_div_cfg_v4, - .swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg, .ver_ops =3D &qcom_edp_phy_ops_v4, }; =20 @@ -585,7 +598,8 @@ static const struct qcom_edp_phy_cfg sc8280xp_edp_phy_c= fg =3D { .is_edp =3D true, .aux_cfg =3D edp_phy_aux_cfg_v4, .vco_div_cfg =3D edp_phy_vco_div_cfg_v4, - .swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg, + .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg, .ver_ops =3D &qcom_edp_phy_ops_v4, }; =20 @@ -765,7 +779,8 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v6 =3D= { static struct qcom_edp_phy_cfg x1e80100_phy_cfg =3D { .aux_cfg =3D edp_phy_aux_cfg_v4, .vco_div_cfg =3D edp_phy_vco_div_cfg_v4, - .swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, + .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg, .ver_ops =3D &qcom_edp_phy_ops_v6, }; =20 @@ -944,7 +959,8 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v8 =3D= { static struct qcom_edp_phy_cfg glymur_phy_cfg =3D { .aux_cfg =3D edp_phy_aux_cfg_v8, .vco_div_cfg =3D edp_phy_vco_div_cfg_v8, - .swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg_v5, + .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg_v8, + .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg, .ver_ops =3D &qcom_edp_phy_ops_v8, }; =20 --=20 2.43.0 From nobody Thu Apr 2 20:20:43 2026 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 BDB862F39A4 for ; Fri, 13 Feb 2026 07:31:56 +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=1770967918; cv=none; b=Lhgq0piY7MW+4/NpAqI6DKo3As4C7lw8GAToXnBkOAhgtQqA41vnqcnXanoa6YOQs2dessznUpNWODNr8O9B5oGC32BN38QUdZBqTyyhpZfMsP2Uvrd9X/DVG0vDXZ3oWllQY3y7GFTpRt5OF2CMWuXCQ/kkL177K/uamdSU0XI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967918; c=relaxed/simple; bh=NaPXmY+LnAd/hjr/pBZl9SyPVTtHkdOI2cAXDQbrB5M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OKGCymKQpD4vLxZ+LhnEdAR0DVPFUCino6tOEBCmiXOc2bVvgMVuv3VUpsD8keq+oUaNHL7hA7SHNs5qB/+gxQSckdR9zGHWCQ38DbacyqHiLIBuIznFERXK1k9I9qSKs9BmrO7c2WmltQL57haDghLIkjOQlKiAOrjTSEDcTI8= 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=kWXXekWH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NtO6Pk4P; 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="kWXXekWH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NtO6Pk4P" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61D6M8Of421630 for ; Fri, 13 Feb 2026 07:31:55 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= Uzg2+4Pt++kTwMPXPgXFyvJ13EJCTj2BTGpaDamIP6s=; b=kWXXekWHeXM8z1Vq 60ckABEsMoo7Rww7FFs5fQPXcEytof+GYSbUH02Ldoz60kkxGTNV25aFgaR3PPKZ onpeVbTLyXRmWpzHS0F71JloDcm9F/40AzAoFwOs7RhzHtct021FuR0cVM3cW2Xn ZcI7vQjWnsKFebaUHDK58PuKLIt3oGYvd31GQNlGoBL5VplTnUQl3zaTfin+fgtx mWWyPMMws0nNzyEsx45tzqqHLqJJyrfjSI0s1VcfmKmBsR8D+8PTcACe8BCWI+Fg 6Ps4KFLiPkPspAA0X4gFB7Oe4+puXgh5Iix7uUwSKc1Zf5RDc7EsVD+cb7dn3LKj lJjDcw== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c9cy4c232-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Feb 2026 07:31:55 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cb3a2eb984so423829485a.0 for ; Thu, 12 Feb 2026 23:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770967915; x=1771572715; 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=Uzg2+4Pt++kTwMPXPgXFyvJ13EJCTj2BTGpaDamIP6s=; b=NtO6Pk4PK+owZrPLVDZ0yuDPcT9bE0cpC4kw12xx8NgSxi/zhsJPuwPBwhF7F7yEbb MNwOgoLeAuvcAKaq+e5tfGYdLKNfTVEYamAum1XOY8WRxa/aO/y0Rpc7UG/B/73bI05Q l8JgfOo4wmcxpP4iaszzY4V7tZ5a4S8kVPpdLQJTq6RFJTzOKCJe7vu1gQ8wmu1a+J52 NLT1BcSqb/H2yQJjCaeCmhnkly9mUBQ6z3sdXiMhgXSzGpppWvRMQ0vAR0IB3UyF28NH EzoYnf1IXe1iKHmL/ygS2b45fOGfSGB/ojUxr4/BzQ0sdYrt+HTdB9aOWifkmxKP+mi2 4qTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770967915; x=1771572715; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Uzg2+4Pt++kTwMPXPgXFyvJ13EJCTj2BTGpaDamIP6s=; b=r0NAuSTQBGpq2Kfwha7y+rwnH/wXDX6aJYUblmBqkc6xMJvsdpcxxDmDVg+bmMHe+F iFj5arzjmMw7N5UE2tZzRgmSIGNQe5tPigPZZQMdMPA0xZG0SeugWkggfCSE2ClheH8Q /U/21QSO00gGT6rCMB99+k2Y0V8Tcb2XQLVpiSKTGTdSzl8H8ggpmIrM/ZoajjhhVaLR YanvuRLt/FjaUmZyyP0D4OvVSbE3oEMXvBiJDIGmlTAaw9TWS9f4wj5FMRVKMNFtutPN IzGsKfDp9h4ObPv17kDsUgNZsASRTgV9juQdq/HZtkz8qxrFXTYfJDpGkovb3YuekQUm 3kFg== X-Forwarded-Encrypted: i=1; AJvYcCVBbPYJW5cTBStCRaSx7LddtJ9yYEHX2B8sWyuBIDTgV435c/A9kdGSBPIHO334Swex9bObLQIfJLNz92U=@vger.kernel.org X-Gm-Message-State: AOJu0YxW9ySr9+dCReVGW0SDoU4fy0lRlTfQZGksw47eOXtDN72dP4jz /y+kNMO6TfpCmDcPdNuRzHxsojm+JBNc+bM6K3PTyBMhGdepLF6W5mb846CtQ2VqIgAAbhhIZDE MCiS+P9aeI3yMp1LIVeRy7eFUdX8DbeYd6a6n/R/pDSIB73NwXkJWHhyqbpWCIORa4S/aQ2p2vD j2Vw== X-Gm-Gg: AZuq6aJS7vZSVpUmnCpDDaq5NkKCx35R2Wdf/3oPTdb0I9lqi/7VB3qFZRBXK1getJM gI5cowlJXjieYV3St5gO4pN5TIoLJauxAfbK6S1z5Yj6wig4smPxfEpq5daRYO/VMmJtEH5rRXY NW89FPrf0Ng4HbAhlVh3q7eXSEaUC4sjKwV/6nguPNbPp+ZYF/brnAh63ub1lxL7wuBoW3zHEUN lQnDjec9X5cAwNREMXq6NcibUxTYUJxdgK5sNWVBOZULTrC9iSnSktB3QUsZHJ0AonEsZjfj+Ie vl2auA3AG57R1red0NmHylgOySi6iVHcq9xbKrLdW9/2f2oQVeO5NGagwUZ7x3qhK7A4YAzb7qz AICwo1GJTUwPDJxSAzh8N72KnF9Dsce0qeNgnwG/IYRkWVqZQnDf0nH4sPIffW00NvvKYNT7c0V imv+wiAQ0= X-Received: by 2002:a05:620a:3f97:b0:8ca:2a05:6d00 with SMTP id af79cd13be357-8cb42288f2cmr109597285a.32.1770967915059; Thu, 12 Feb 2026 23:31:55 -0800 (PST) X-Received: by 2002:a05:620a:3f97:b0:8ca:2a05:6d00 with SMTP id af79cd13be357-8cb42288f2cmr109595885a.32.1770967914657; Thu, 12 Feb 2026 23:31:54 -0800 (PST) Received: from yongmou2.ap.qualcomm.com (Global_NAT1_IAD_FW.qualcomm.com. [129.46.232.65]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8cb2b0bda6fsm541156485a.9.2026.02.12.23.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 23:31:54 -0800 (PST) From: Yongxing Mou Date: Fri, 13 Feb 2026 15:31:43 +0800 Subject: [PATCH v2 2/2] phy: qcom: edp: Add per-version LDO configuration callback 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: quoted-printable Message-Id: <20260213-edp_phy-v2-2-43c40976435e@oss.qualcomm.com> References: <20260213-edp_phy-v2-0-43c40976435e@oss.qualcomm.com> In-Reply-To: <20260213-edp_phy-v2-0-43c40976435e@oss.qualcomm.com> To: Vinod Koul , Neil Armstrong Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Yongxing Mou , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1770967906; l=6315; i=yongxing.mou@oss.qualcomm.com; s=20250910; h=from:subject:message-id; bh=NaPXmY+LnAd/hjr/pBZl9SyPVTtHkdOI2cAXDQbrB5M=; b=HlHI0Q6IiWFTupejL5Z0gDQNHokzBg8C63zQ8vzjDA6fNVTUFgp6psSLIL74T9VsehLDcEi0p JIrOHgnOGUgCopvlsF5mglL44yk1UkLrte7bzz95toZwsbUgBZV+3wv X-Developer-Key: i=yongxing.mou@oss.qualcomm.com; a=ed25519; pk=rAy5J1eP+V7OXqH5FJ7ngMCtUrnHhut30ZTldOj52UM= X-Proofpoint-ORIG-GUID: DfWB8CG08Gf8YXqjZxwCBkLg9XjrZVoO X-Proofpoint-GUID: DfWB8CG08Gf8YXqjZxwCBkLg9XjrZVoO X-Authority-Analysis: v=2.4 cv=XvX3+FF9 c=1 sm=1 tr=0 ts=698ed36b cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=C3Dk8TwHQYyIj7nOf9RCJw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=Wstf64DO4dhji1mrokQA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjEzMDA1NyBTYWx0ZWRfX6wzvd676xtHS YA7si8on9Va0/PPhWQKE5cmXGN2EjqDDwVT5Nz8kEbGwFvEXwlzdsI9FncSNxJsXN6iCOR99YsQ mk7xwQkuI4jVmaaIqFnvQxO7mB1rhvUClcTwPolNrKvnZjJ1XXxyKx5CEMFmk5AJL5URSqF0QXV NdH4Au4tzW1HdvcG+n74rVaJimGg/GyuDcr5lB8Tq9mP6T8TcAKqYhtCo6H2rXvWb0PaEqULtuA zpxahXQ69eyNeUPfftZ5clkGJ4AU0GwuOxBpzXIfKnzgJqTpdsPGAaqZZ4AZcDAYmCfoJfGkzG4 +g0FpnD0zUNVWmwAwn1nfxw3fUEJCKrAxLlz/U/F1ab9lxGM3efiOOQwM+qd5mPLl1/zZ+0kZZE hcPVfrI3tYiJQdQtQ2C/LD8zvB8HMMndY4Gf19T0dSu5ultv0VpoSBJ4MjfMc69EhHrvR6+5jsJ xml8xxyccyHroaDArUQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-13_01,2026-02-12_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1011 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602130057 For eDP low Vdiff, the LDO setting depends on the PHY version, instead of being a simple 0x0 or 0x01. Introduce the com_ldo_config callback to correct LDO setting accroding to the HPG. Since SC7280 uses different LDO settings than SA8775P/SC8280XP, introduce qcom_edp_phy_ops_v3 to keep the LDO setting correct. Cc: stable@vger.kernel.org Fixes: f199223cb490 ("phy: qcom: Introduce new eDP PHY driver") Signed-off-by: Yongxing Mou --- drivers/phy/qualcomm/phy-qcom-edp.c | 86 ++++++++++++++++++++++++++++++++-= ---- 1 file changed, 76 insertions(+), 10 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy= -qcom-edp.c index ff14de41cb1c..6464df8d2a62 100644 --- a/drivers/phy/qualcomm/phy-qcom-edp.c +++ b/drivers/phy/qualcomm/phy-qcom-edp.c @@ -81,6 +81,7 @@ struct phy_ver_ops { int (*com_clk_fwd_cfg)(const struct qcom_edp *edp); int (*com_configure_pll)(const struct qcom_edp *edp); int (*com_configure_ssc)(const struct qcom_edp *edp); + int (*com_ldo_config)(const struct qcom_edp *edp); }; =20 struct qcom_edp_phy_cfg { @@ -304,7 +305,7 @@ static int qcom_edp_set_voltages(struct qcom_edp *edp, = const struct phy_configur const struct qcom_edp_swing_pre_emph_cfg *cfg; unsigned int v_level =3D 0; unsigned int p_level =3D 0; - u8 ldo_config; + int ret; u8 swing; u8 emph; int i; @@ -330,13 +331,13 @@ static int qcom_edp_set_voltages(struct qcom_edp *edp= , const struct phy_configur if (swing =3D=3D 0xff || emph =3D=3D 0xff) return -EINVAL; =20 - ldo_config =3D edp->is_edp ? 0x0 : 0x1; + ret =3D edp->cfg->ver_ops->com_ldo_config(edp); + if (ret) + return ret; =20 - writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG); writel(swing, edp->tx0 + TXn_TX_DRV_LVL); writel(emph, edp->tx0 + TXn_TX_EMP_POST1_LVL); =20 - writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG); writel(swing, edp->tx1 + TXn_TX_DRV_LVL); writel(emph, edp->tx1 + TXn_TX_EMP_POST1_LVL); =20 @@ -560,6 +561,52 @@ static int qcom_edp_com_configure_pll_v4(const struct = qcom_edp *edp) return 0; } =20 +static int qcom_edp_ldo_config_v3(const struct qcom_edp *edp) +{ + const struct phy_configure_opts_dp *dp_opts =3D &edp->dp_opts; + u32 ldo_config; + + if (!edp->is_edp) + ldo_config =3D 0x0; + else if (dp_opts->link_rate <=3D 2700) + ldo_config =3D 0x81; + else + ldo_config =3D 0x41; + + writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG); + writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG); + + return 0; +} + +static int qcom_edp_ldo_config_v4(const struct qcom_edp *edp) +{ + const struct phy_configure_opts_dp *dp_opts =3D &edp->dp_opts; + u32 ldo_config; + + if (!edp->is_edp) + ldo_config =3D 0x0; + else if (dp_opts->link_rate <=3D 2700) + ldo_config =3D 0xc1; + else + ldo_config =3D 0x81; + + writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG); + writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG); + + return 0; +} + +static const struct phy_ver_ops qcom_edp_phy_ops_v3 =3D { + .com_power_on =3D qcom_edp_phy_power_on_v4, + .com_resetsm_cntrl =3D qcom_edp_phy_com_resetsm_cntrl_v4, + .com_bias_en_clkbuflr =3D qcom_edp_com_bias_en_clkbuflr_v4, + .com_clk_fwd_cfg =3D qcom_edp_com_clk_fwd_cfg_v4, + .com_configure_pll =3D qcom_edp_com_configure_pll_v4, + .com_configure_ssc =3D qcom_edp_com_configure_ssc_v4, + .com_ldo_config =3D qcom_edp_ldo_config_v3, +}; + static const struct phy_ver_ops qcom_edp_phy_ops_v4 =3D { .com_power_on =3D qcom_edp_phy_power_on_v4, .com_resetsm_cntrl =3D qcom_edp_phy_com_resetsm_cntrl_v4, @@ -567,6 +614,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v4 =3D= { .com_clk_fwd_cfg =3D qcom_edp_com_clk_fwd_cfg_v4, .com_configure_pll =3D qcom_edp_com_configure_pll_v4, .com_configure_ssc =3D qcom_edp_com_configure_ssc_v4, + .com_ldo_config =3D qcom_edp_ldo_config_v4, }; =20 static const struct qcom_edp_phy_cfg sa8775p_dp_phy_cfg =3D { @@ -583,7 +631,7 @@ static const struct qcom_edp_phy_cfg sc7280_dp_phy_cfg = =3D { .vco_div_cfg =3D edp_phy_vco_div_cfg_v4, .dp_swing_pre_emph_cfg =3D &dp_phy_swing_pre_emph_cfg, .edp_swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg_v3, - .ver_ops =3D &qcom_edp_phy_ops_v4, + .ver_ops =3D &qcom_edp_phy_ops_v3, }; =20 static const struct qcom_edp_phy_cfg sc8280xp_dp_phy_cfg =3D { @@ -768,12 +816,31 @@ static int qcom_edp_com_configure_pll_v6(const struct= qcom_edp *edp) return 0; } =20 +static int qcom_edp_ldo_config_v6(const struct qcom_edp *edp) +{ + const struct phy_configure_opts_dp *dp_opts =3D &edp->dp_opts; + u32 ldo_config; + + if (!edp->is_edp) + ldo_config =3D 0x0; + else if (dp_opts->link_rate <=3D 2700) + ldo_config =3D 0x51; + else + ldo_config =3D 0x91; + + writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG); + writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG); + + return 0; +} + static const struct phy_ver_ops qcom_edp_phy_ops_v6 =3D { .com_power_on =3D qcom_edp_phy_power_on_v6, .com_resetsm_cntrl =3D qcom_edp_phy_com_resetsm_cntrl_v6, .com_bias_en_clkbuflr =3D qcom_edp_com_bias_en_clkbuflr_v6, .com_configure_pll =3D qcom_edp_com_configure_pll_v6, .com_configure_ssc =3D qcom_edp_com_configure_ssc_v6, + .com_ldo_config =3D qcom_edp_ldo_config_v6, }; =20 static struct qcom_edp_phy_cfg x1e80100_phy_cfg =3D { @@ -954,6 +1021,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v8 = =3D { .com_clk_fwd_cfg =3D qcom_edp_com_clk_fwd_cfg_v8, .com_configure_pll =3D qcom_edp_com_configure_pll_v8, .com_configure_ssc =3D qcom_edp_com_configure_ssc_v8, + .com_ldo_config =3D qcom_edp_ldo_config_v6, }; =20 static struct qcom_edp_phy_cfg glymur_phy_cfg =3D { @@ -969,7 +1037,6 @@ static int qcom_edp_phy_power_on(struct phy *phy) const struct qcom_edp *edp =3D phy_get_drvdata(phy); u32 bias0_en, drvr0_en, bias1_en, drvr1_en; unsigned long pixel_freq; - u8 ldo_config =3D 0x0; int ret; u32 val; u8 cfg1; @@ -978,11 +1045,10 @@ static int qcom_edp_phy_power_on(struct phy *phy) if (ret) return ret; =20 - if (edp->cfg->swing_pre_emph_cfg && !edp->is_edp) - ldo_config =3D 0x1; + ret =3D edp->cfg->ver_ops->com_ldo_config(edp); + if (ret) + return ret; =20 - writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG); - writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG); writel(0x00, edp->tx0 + TXn_LANE_MODE_1); writel(0x00, edp->tx1 + TXn_LANE_MODE_1); =20 --=20 2.43.0