From nobody Sat Nov 30 10:28:27 2024 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 B8BB47E0E8; Wed, 11 Sep 2024 10:08:50 +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=1726049332; cv=none; b=lchYaFjs+dm/gh2RAYzY3P0cD+Az38RwASiXl/vNh524y44cZhdLOwFniNsqT1VvjlKXgahIpe9OMYnl9JOh8EuRebWolKPHRwIvtXrQlPyF76CQvfzubZeWIEJjIuzPtIO4fMVNVdJksGZ9RfzvhewBVlqOegjh1Xvw/RaAfzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726049332; c=relaxed/simple; bh=AaI77oJvcxADV83n5sUke9O4L3C9pTP/dQnmQNcy3qc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=P6xL2jxi9M5d2Hn24vuX+CH3Z+VFIVLWkaalUNQCOAcG37PM+jl4N7abzHzQh0yzG/Q7xHv+fsFGFiwo7tN1Aw4QX9Nx6lKl21pkK1QFZzWus5hPP4yKyBZTDSrSaO92pgQ1ZPxYxWa0lFquQvHC5v2pk1bBU6tjAWz7lsSWLaw= 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=dOFoR3Pg; 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="dOFoR3Pg" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48B3kpRY023782; Wed, 11 Sep 2024 10:08:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=zrf+9JuT0OFwekwnmcUao//E5JgKlKaI66mi+3SUVQ4=; b=dO FoR3PgaeS5C867k14s2BLpSF2ZRg8JCVtkr8TtOQ6ebp/ng3jOQSlk+1/OC2Nx10 KwoN5DSljO7ZEqyIStd3YuudMj8KY3F8EA5Q++HNLFE5nydFcRea9FIblEsZptWn uttasFaZOvsSauoIKFV+FIeq6Fd5W8tFfewn6NTwt51ygb6SAi7gjZa/y6VnfcwL 31IeDKERsC5HuAgpRFx+a5eYVxLMXaik6ePe2ZbrOEwboa8L9CTFjj9KNTDxttDT 17kPTOoB6MsdSLDkw/fXIMckQ0D56PWwCHv8Idzex8FSt8DYIiYj2BAy7/fPac6Q j9Tk2oWti5W20xbDvcDA== 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 41gy6p941d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Sep 2024 10:08:25 +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 48BA8LsZ019444; Wed, 11 Sep 2024 10:08:21 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 41h168s1sy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 11 Sep 2024 10:08:21 +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 48BA8Kt6019409; Wed, 11 Sep 2024 10:08:20 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-mukhopad-hyd.qualcomm.com [10.147.244.250]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 48BA8Ks8019402; Wed, 11 Sep 2024 10:08:20 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 3978529) id 96D625000AF; Wed, 11 Sep 2024 15:38:18 +0530 (+0530) From: Soutrik Mukhopadhyay To: vkoul@kernel.org, kishon@kernel.org, konradybcio@kernel.org, andersson@kernel.org, simona@ffwll.ch, dmitry.baryshkov@linaro.org, abel.vesa@linaro.org, robdclark@gmail.com, quic_abhinavk@quicinc.com, sean@poorly.run, marijn.suijten@somainline.org, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_khsieh@quicinc.com, konrad.dybcio@linaro.org, quic_parellan@quicinc.com, quic_bjorande@quicinc.com Cc: Soutrik Mukhopadhyay , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, quic_riteshk@quicinc.com, quic_vproddut@quicinc.com Subject: [PATCH 3/5] phy: qcom: edp: Add support for eDP PHY on SA8775P Date: Wed, 11 Sep 2024 15:38:11 +0530 Message-Id: <20240911100813.338-4-quic_mukhopad@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240911100813.338-1-quic_mukhopad@quicinc.com> References: <20240911100813.338-1-quic_mukhopad@quicinc.com> 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-ORIG-GUID: ETaJKGyh4Eye1kQSYJV9UiBzciYNV8jp X-Proofpoint-GUID: ETaJKGyh4Eye1kQSYJV9UiBzciYNV8jp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 phishscore=0 impostorscore=0 suspectscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409110075 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add support for eDP PHY v5 found on the Qualcomm SA8775P platform. Signed-off-by: Soutrik Mukhopadhyay --- drivers/phy/qualcomm/phy-qcom-edp.c | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy= -qcom-edp.c index 0f860a807d1b..34a47cd2919d 100644 --- a/drivers/phy/qualcomm/phy-qcom-edp.c +++ b/drivers/phy/qualcomm/phy-qcom-edp.c @@ -191,6 +191,45 @@ static u8 edp_phy_aux_cfg_v4[10] =3D { 0x00, 0x13, 0x24, 0x00, 0x0a, 0x26, 0x0a, 0x03, 0x37, 0x03 }; =20 +static const u8 edp_swing_hbr_rbr_v5[4][4] =3D { + { 0x07, 0x0f, 0x16, 0x1f }, + { 0x0d, 0x16, 0x1e, 0xff }, + { 0x11, 0x1b, 0xff, 0xff }, + { 0x16, 0xff, 0xff, 0xff } +}; + +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_v5[4][4] =3D { + { 0x0b, 0x11, 0x17, 0x1c }, + { 0x10, 0x19, 0x1f, 0xff }, + { 0x19, 0x1f, 0xff, 0xff }, + { 0x1f, 0xff, 0xff, 0xff } +}; + +static const u8 edp_pre_emp_hbr2_hbr3_v5[4][4] =3D { + { 0x0c, 0x15, 0x19, 0x1e }, + { 0x0b, 0x15, 0x19, 0xff }, + { 0x0e, 0x14, 0xff, 0xff }, + { 0x0d, 0xff, 0xff, 0xff } +}; + +static const struct qcom_edp_swing_pre_emph_cfg edp_phy_swing_pre_emph_cfg= _v5 =3D { + .swing_hbr_rbr =3D &edp_swing_hbr_rbr_v5, + .swing_hbr3_hbr2 =3D &edp_swing_hbr2_hbr3_v5, + .pre_emphasis_hbr_rbr =3D &edp_pre_emp_hbr_rbr_v5, + .pre_emphasis_hbr3_hbr2 =3D &edp_pre_emp_hbr2_hbr3_v5, +}; + +static u8 edp_phy_aux_cfg_v5[10] =3D { + 0x00, 0x13, 0xa4, 0x00, 0x0a, 0x26, 0x0a, 0x03, 0x37, 0x03 +}; + static int qcom_edp_phy_init(struct phy *phy) { struct qcom_edp *edp =3D phy_get_drvdata(phy); @@ -520,6 +559,13 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v4 = =3D { .com_configure_ssc =3D qcom_edp_com_configure_ssc_v4, }; =20 +static const struct qcom_edp_phy_cfg sa8775p_dp_phy_cfg =3D { + .is_edp =3D false, + .aux_cfg =3D edp_phy_aux_cfg_v5, + .swing_pre_emph_cfg =3D &edp_phy_swing_pre_emph_cfg_v5, + .ver_ops =3D &qcom_edp_phy_ops_v4, +}; + static const struct qcom_edp_phy_cfg sc7280_dp_phy_cfg =3D { .aux_cfg =3D edp_phy_aux_cfg_v4, .ver_ops =3D &qcom_edp_phy_ops_v4, @@ -1114,6 +1160,7 @@ static int qcom_edp_phy_probe(struct platform_device = *pdev) } =20 static const struct of_device_id qcom_edp_phy_match_table[] =3D { + { .compatible =3D "qcom,sa8775p-edp-phy", .data =3D &sa8775p_dp_phy_cfg, = }, { .compatible =3D "qcom,sc7280-edp-phy", .data =3D &sc7280_dp_phy_cfg, }, { .compatible =3D "qcom,sc8180x-edp-phy", .data =3D &sc7280_dp_phy_cfg, }, { .compatible =3D "qcom,sc8280xp-dp-phy", .data =3D &sc8280xp_dp_phy_cfg,= }, --=20 2.17.1