From: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jessica.zhang@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Kuogee Hsieh <quic_khsieh@quicinc.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
fange.zhang@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com,
tingwei.zhang@oss.qualcomm.com,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
quic_lliu6@quicinc.com
Subject: Re: [PATCH v3 06/14] phy: qcom: qmp-usbc: Add QCS615 DP PHY configuration and init data
Date: Fri, 22 Aug 2025 15:20:56 +0800 [thread overview]
Message-ID: <1a2c38c6-0d49-4c47-9cc2-014b71e1e81e@oss.qualcomm.com> (raw)
In-Reply-To: <bx3cumx7ej7taour6zhqufrzjdxuhvlx23ga3vmvokrlekayem@e5rfjbcwle2r>
On 8/20/2025 7:25 PM, Dmitry Baryshkov wrote:
> On Wed, Aug 20, 2025 at 05:34:48PM +0800, Xiangxu Yin wrote:
>> Introduce QCS615 hardware-specific configuration for DP PHY mode,
>> including register offsets, initialization tables, voltage swing
>> and pre-emphasis settings.
> This will trigger unused warnings. Please squash this into the patch
> adding compat string to the driver.
Ok,
Will squash the compatible string addition into this patch,
as the following callback functions would also trigger similar unused warnings.
>> Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
>> ---
>> drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 139 +++++++++++++++++++++++++++++++
>> 1 file changed, 139 insertions(+)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
>> index 6b0e86ec43ded3d850f68f248a74c39f74ecb5bb..61128d606238321d1b573655b3b987226aa2d594 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
>> @@ -284,6 +284,86 @@ static const struct qmp_phy_init_tbl qcm2290_usb3_pcs_tbl[] = {
>> QMP_PHY_INIT_CFG(QPHY_V3_PCS_RX_SIGDET_LVL, 0x88),
>> };
>>
>> +static const struct qmp_phy_init_tbl qcs615_qmp_dp_serdes_tbl[] = {
>> + QMP_PHY_INIT_CFG(QSERDES_COM_SVS_MODE_CLK_SEL, 0x01),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_SYSCLK_EN_SEL, 0x37),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CLK_SELECT, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_SYS_CLK_CTRL, 0x06),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_BIAS_EN_CLKBUFLR_EN, 0x3f),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CLK_ENABLE1, 0x0e),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_BG_CTRL, 0x0f),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_SYSCLK_BUF_ENABLE, 0x06),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CLK_SELECT, 0x30),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_PLL_IVCO, 0x0f),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_PLL_CCTRL_MODE0, 0x28),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_PLL_RCTRL_MODE0, 0x16),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CP_CTRL_MODE0, 0x0b),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_INTEGLOOP_GAIN0_MODE0, 0x40),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_INTEGLOOP_GAIN1_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_VCO_TUNE_MAP, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_BG_TIMER, 0x08),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CORECLK_DIV, 0x05),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_VCO_TUNE_CTRL, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_VCO_TUNE1_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_VCO_TUNE2_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_VCO_TUNE_CTRL, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CORE_CLK_EN, 0x0f),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_CMN_CONFIG, 0x02),
>> +};
>> +
>> +static const struct qmp_phy_init_tbl qcs615_qmp_dp_serdes_tbl_rbr[] = {
>> + QMP_PHY_INIT_CFG(QSERDES_COM_HSCLK_SEL, 0x2c),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DEC_START_MODE0, 0x69),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START1_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START2_MODE0, 0x80),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START3_MODE0, 0x07),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP1_MODE0, 0xbf),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP2_MODE0, 0x21),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP3_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_LANE_MODE_1, 0xc6),
>> +};
>> +
>> +static const struct qmp_phy_init_tbl qcs615_qmp_dp_serdes_tbl_hbr[] = {
>> + QMP_PHY_INIT_CFG(QSERDES_COM_HSCLK_SEL, 0x24),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DEC_START_MODE0, 0x69),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START1_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START2_MODE0, 0x80),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START3_MODE0, 0x07),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP1_MODE0, 0x3f),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP2_MODE0, 0x38),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP3_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_LANE_MODE_1, 0xc4),
>> +};
>> +
>> +static const struct qmp_phy_init_tbl qcs615_qmp_dp_serdes_tbl_hbr2[] = {
>> + QMP_PHY_INIT_CFG(QSERDES_COM_HSCLK_SEL, 0x20),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DEC_START_MODE0, 0x8c),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START1_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START2_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_DIV_FRAC_START3_MODE0, 0x0a),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP1_MODE0, 0x7f),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP2_MODE0, 0x70),
>> + QMP_PHY_INIT_CFG(QSERDES_COM_LOCK_CMP3_MODE0, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_LANE_MODE_1, 0xc4),
>> +};
>> +
>> +static const struct qmp_phy_init_tbl qcs615_qmp_dp_tx_tbl[] = {
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_TRANSCEIVER_BIAS_EN, 0x1a),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_VMODE_CTRL1, 0x40),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_PRE_STALL_LDO_BOOST_EN, 0x30),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_INTERFACE_SELECT, 0x3d),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_CLKBUF_ENABLE, 0x0f),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_RESET_TSYNC_EN, 0x03),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_TRAN_DRVR_EMP_EN, 0x03),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_PARRATE_REC_DETECT_IDLE_EN, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_TX_INTERFACE_MODE, 0x00),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_TX_EMP_POST1_LVL, 0x2b),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_TX_DRV_LVL, 0x2f),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_TX_BAND, 0x4),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_RES_CODE_LANE_OFFSET_TX, 0x12),
>> + QMP_PHY_INIT_CFG(QSERDES_V3_TX_RES_CODE_LANE_OFFSET_RX, 0x12),
>> +};
>> +
>> enum qmp_phy_usbc_type {
>> QMP_PHY_USBC_USB3_ONLY,
>> QMP_PHY_USBC_USB3_DP,
>> @@ -449,6 +529,34 @@ static const struct qmp_usbc_offsets qmp_usbc_offsets_v3_qcm2290 = {
>> .rx2 = 0x800,
>> };
>>
>> +static const struct qmp_usbc_offsets qmp_usbc_usb3dp_offsets_qcs615 = {
>> + .serdes = 0x0,
>> + .pcs = 0xc00,
>> + .pcs_misc = 0xa00,
>> + .tx = 0x200,
>> + .rx = 0x400,
>> + .tx2 = 0x600,
>> + .rx2 = 0x800,
>> + .dp_serdes = 0x1c00,
>> + .dp_txa = 0x1400,
>> + .dp_txb = 0x1800,
>> + .dp_dp_phy = 0x1000,
>> +};
>> +
>> +static const u8 qmp_dp_pre_emphasis_hbr2_rbr[4][4] = {
>> + {0x00, 0x0b, 0x12, 0xff},
>> + {0x00, 0x0a, 0x12, 0xff},
>> + {0x00, 0x0c, 0xff, 0xff},
>> + {0xff, 0xff, 0xff, 0xff}
>> +};
>> +
>> +static const u8 qmp_dp_voltage_swing_hbr2_rbr[4][4] = {
>> + {0x07, 0x0f, 0x14, 0xff},
>> + {0x11, 0x1d, 0x1f, 0xff},
>> + {0x18, 0x1f, 0xff, 0xff},
>> + {0xff, 0xff, 0xff, 0xff}
>> +};
>> +
>> static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
>> .offsets = &qmp_usbc_offsets_v3_qcm2290,
>> .type = QMP_PHY_USBC_USB3_ONLY,
>> @@ -500,6 +608,37 @@ static const struct qmp_phy_cfg sdm660_usb3phy_cfg = {
>> .regs = qmp_v3_usb3phy_regs_layout_qcm2290,
>> };
>>
>> +static const struct qmp_phy_cfg qcs615_usb3dp_phy_cfg = {
>> + .offsets = &qmp_usbc_usb3dp_offsets_qcs615,
>> + .type = QMP_PHY_USBC_USB3_DP,
>> +
>> + .serdes_tbl = qcm2290_usb3_serdes_tbl,
>> + .serdes_tbl_num = ARRAY_SIZE(qcm2290_usb3_serdes_tbl),
>> + .tx_tbl = qcm2290_usb3_tx_tbl,
>> + .tx_tbl_num = ARRAY_SIZE(qcm2290_usb3_tx_tbl),
>> + .rx_tbl = qcm2290_usb3_rx_tbl,
>> + .rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl),
>> + .pcs_tbl = qcm2290_usb3_pcs_tbl,
>> + .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl),
>> +
>> + .regs = qmp_v3_usb3phy_regs_layout_qcm2290,
>> +
>> + .dp_serdes_tbl = qcs615_qmp_dp_serdes_tbl,
>> + .dp_serdes_tbl_num = ARRAY_SIZE(qcs615_qmp_dp_serdes_tbl),
>> + .dp_tx_tbl = qcs615_qmp_dp_tx_tbl,
>> + .dp_tx_tbl_num = ARRAY_SIZE(qcs615_qmp_dp_tx_tbl),
>> +
>> + .serdes_tbl_rbr = qcs615_qmp_dp_serdes_tbl_rbr,
>> + .serdes_tbl_rbr_num = ARRAY_SIZE(qcs615_qmp_dp_serdes_tbl_rbr),
>> + .serdes_tbl_hbr = qcs615_qmp_dp_serdes_tbl_hbr,
>> + .serdes_tbl_hbr_num = ARRAY_SIZE(qcs615_qmp_dp_serdes_tbl_hbr),
>> + .serdes_tbl_hbr2 = qcs615_qmp_dp_serdes_tbl_hbr2,
>> + .serdes_tbl_hbr2_num = ARRAY_SIZE(qcs615_qmp_dp_serdes_tbl_hbr2),
>> +
>> + .swing_tbl = &qmp_dp_voltage_swing_hbr2_rbr,
>> + .pre_emphasis_tbl = &qmp_dp_pre_emphasis_hbr2_rbr,
>> +};
>> +
>> static int qmp_usbc_com_init(struct phy *phy)
>> {
>> struct qmp_usbc *qmp = phy_get_drvdata(phy);
>>
>> --
>> 2.34.1
>>
next prev parent reply other threads:[~2025-08-22 7:21 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 9:34 [PATCH v3 00/14] Add DisplayPort support for QCS615 platform Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 01/14] dt-bindings: display/msm: dp-controller: Add sm6150 Xiangxu Yin
2025-08-20 10:18 ` Dmitry Baryshkov
2025-08-28 4:51 ` Xiangxu Yin
2025-08-28 11:05 ` Dmitry Baryshkov
2025-09-01 12:32 ` Xiangxu Yin
2025-09-02 10:42 ` Konrad Dybcio
2025-09-04 0:34 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 02/14] dt-bindings: phy: Add QMP USB3+DP PHY for QCS615 Xiangxu Yin
2025-08-20 10:09 ` Dmitry Baryshkov
2025-08-22 6:44 ` Xiangxu Yin
2025-08-20 11:37 ` Dmitry Baryshkov
2025-08-22 6:48 ` Xiangxu Yin
2025-08-22 14:22 ` Rob Herring
2025-08-22 18:20 ` Dmitry Baryshkov
2025-09-01 12:38 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 03/14] phy: qcom: qmp-usbc: Rename USB-specific ops to prepare for DP support Xiangxu Yin
2025-08-20 11:46 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 04/14] phy: qcom: qmp-usbc: Add USBC PHY type enum Xiangxu Yin
2025-08-20 11:34 ` Dmitry Baryshkov
2025-08-22 6:49 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 05/14] phy: qcom: qmp-usbc: Add DP-related fields for USB/DP switchable PHY Xiangxu Yin
2025-08-20 11:47 ` Dmitry Baryshkov
2025-08-22 6:59 ` Xiangxu Yin
2025-08-22 9:05 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 06/14] phy: qcom: qmp-usbc: Add QCS615 DP PHY configuration and init data Xiangxu Yin
2025-08-20 11:25 ` Dmitry Baryshkov
2025-08-22 7:20 ` Xiangxu Yin [this message]
2025-08-20 9:34 ` [PATCH v3 07/14] phy: qcom: qmp-usbc: Move reset and regulator config into PHY cfg Xiangxu Yin
2025-08-20 11:30 ` Dmitry Baryshkov
2025-08-22 8:29 ` Xiangxu Yin
2025-08-22 10:08 ` Dmitry Baryshkov
2025-08-27 13:28 ` Xiangxu Yin
2025-08-27 14:31 ` Dmitry Baryshkov
2025-08-28 1:40 ` Xiangxu Yin
2025-08-28 12:57 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 08/14] phy: qcom: qmp-usbc: Add DP PHY configuration support for QCS615 Xiangxu Yin
2025-08-20 11:16 ` Dmitry Baryshkov
2025-08-22 8:43 ` Xiangxu Yin
2025-08-22 10:09 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 09/14] phy: qcom: qmp-usbc: Add DP PHY ops for USB/DP switchable Type-C PHYs Xiangxu Yin
2025-08-20 11:45 ` Dmitry Baryshkov
2025-08-27 12:17 ` Xiangxu Yin
2025-08-27 16:12 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 10/14] phy: qcom: qmp-usbc: Add TCSR parsing and USB/DP mode mutex handling Xiangxu Yin
2025-08-20 11:24 ` Dmitry Baryshkov
2025-08-27 12:23 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 11/14] phy: qcom: qmp-usbc: Finalize USB/DP switchable PHY support Xiangxu Yin
2025-08-20 11:42 ` Dmitry Baryshkov
2025-08-27 12:34 ` Xiangxu Yin
2025-08-27 16:14 ` Dmitry Baryshkov
2025-08-28 2:37 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 12/14] phy: qcom: qmp-usbc: Add QCS615 DP PHY compatible Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 13/14] drm/msm/dp: Add DisplayPort support for sm6150 Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 14/14] drm/msm/dp: Add support for lane mapping configuration Xiangxu Yin
2025-08-20 11:49 ` Dmitry Baryshkov
2025-08-27 12:35 ` Xiangxu Yin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a2c38c6-0d49-4c47-9cc2-014b71e1e81e@oss.qualcomm.com \
--to=xiangxu.yin@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fange.zhang@oss.qualcomm.com \
--cc=freedreno@lists.freedesktop.org \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=kishon@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=quic_khsieh@quicinc.com \
--cc=quic_lliu6@quicinc.com \
--cc=robh@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tingwei.zhang@oss.qualcomm.com \
--cc=tzimmermann@suse.de \
--cc=vkoul@kernel.org \
--cc=yongxing.mou@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).