From: Xiangxu Yin via B4 Relay <devnull+xiangxu.yin.oss.qualcomm.com@kernel.org>
To: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
fange.zhang@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com,
li.liu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
Subject: [PATCH v8 05/12] phy: qcom: qmp-usbc: Move reset config into PHY cfg
Date: Mon, 15 Dec 2025 20:42:01 +0800 [thread overview]
Message-ID: <20251215-add-displayport-support-for-qcs615-platform-v8-5-cbc72c88a44e@oss.qualcomm.com> (raw)
In-Reply-To: <20251215-add-displayport-support-for-qcs615-platform-v8-0-cbc72c88a44e@oss.qualcomm.com>
From: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
The original reset list only works for USB-only PHYs. USB3DP PHYs require
different reset names such as "dp_phy", so they need a separate list.
Moving reset configuration into qmp_phy_cfg allows per-PHY customization
without adding special-case logic in DT parsing. The legacy DT path keeps
using the old hardcoded list, while non-legacy paths use cfg->reset_list.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
index 2c998803fcda..cff148dc9f01 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
@@ -335,7 +335,8 @@ struct qmp_phy_cfg {
int (*configure_dp_phy)(struct qmp_usbc *qmp);
int (*calibrate_dp_phy)(struct qmp_usbc *qmp);
- /* regulators to be requested */
+ const char * const *reset_list;
+ int num_resets;
const struct regulator_bulk_data *vreg_list;
int num_vregs;
@@ -464,6 +465,8 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
.rx_tbl_num = ARRAY_SIZE(msm8998_usb3_rx_tbl),
.pcs_tbl = msm8998_usb3_pcs_tbl,
.pcs_tbl_num = ARRAY_SIZE(msm8998_usb3_pcs_tbl),
+ .reset_list = usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(usb3phy_reset_l),
.vreg_list = qmp_phy_msm8998_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_msm8998_vreg_l),
.regs = qmp_v3_usb3phy_regs_layout,
@@ -480,6 +483,8 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
.rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl),
.pcs_tbl = qcm2290_usb3_pcs_tbl,
.pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl),
+ .reset_list = usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(usb3phy_reset_l),
.vreg_list = qmp_phy_sm2290_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_sm2290_vreg_l),
.regs = qmp_v3_usb3phy_regs_layout_qcm2290,
@@ -496,6 +501,8 @@ static const struct qmp_phy_cfg sdm660_usb3phy_cfg = {
.rx_tbl_num = ARRAY_SIZE(sdm660_usb3_rx_tbl),
.pcs_tbl = qcm2290_usb3_pcs_tbl,
.pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl),
+ .reset_list = usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(usb3phy_reset_l),
.vreg_list = qmp_phy_msm8998_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_msm8998_vreg_l),
.regs = qmp_v3_usb3phy_regs_layout_qcm2290,
@@ -512,6 +519,8 @@ static const struct qmp_phy_cfg qcs615_usb3phy_cfg = {
.rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl),
.pcs_tbl = qcm2290_usb3_pcs_tbl,
.pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl),
+ .reset_list = usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(usb3phy_reset_l),
.vreg_list = qmp_phy_qcs615_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_qcs615_vreg_l),
.regs = qmp_v3_usb3phy_regs_layout_qcm2290,
@@ -1051,8 +1060,7 @@ static int qmp_usbc_parse_dt(struct qmp_usbc *qmp)
"failed to get pipe clock\n");
}
- ret = qmp_usbc_reset_init(qmp, usb3phy_reset_l,
- ARRAY_SIZE(usb3phy_reset_l));
+ ret = qmp_usbc_reset_init(qmp, cfg->reset_list, cfg->num_resets);
if (ret)
return ret;
--
2.34.1
next prev parent reply other threads:[~2025-12-15 12:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 12:41 [PATCH v8 00/12] Add DisplayPort support for QCS615 platform Xiangxu Yin via B4 Relay
2025-12-15 12:41 ` [PATCH v8 01/12] dt-bindings: phy: Add QMP USB3+DP PHY for QCS615 Xiangxu Yin via B4 Relay
2025-12-15 12:41 ` [PATCH v8 02/12] phy: qcom: qmp-usbc: Rename USB-specific ops to prepare for DP support Xiangxu Yin via B4 Relay
2025-12-15 12:41 ` [PATCH v8 03/12] phy: qcom: qmp-usbc: Add DP-related fields for USB/DP switchable PHY Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 04/12] phy: qcom: qmp-usbc: Add regulator init_load support Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` Xiangxu Yin via B4 Relay [this message]
2025-12-15 12:42 ` [PATCH v8 06/12] phy: qcom: qmp-usbc: add DP link and vco_div clocks for DP PHY Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 07/12] phy: qcom: qmp-usbc: Move USB-only init to usb_power_on Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 08/12] phy: qcom: qmp-usbc: Add TCSR parsing and PHY mode setting Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 09/12] phy: qcom: qmp-usbc: Add DP PHY ops for USB/DP switchable Type-C PHYs Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 10/12] phy: qcom: qmp-usbc: Add USB/DP exclude handling Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 11/12] phy: qcom: qmp: Add DP v2 PHY register definitions Xiangxu Yin via B4 Relay
2025-12-15 12:42 ` [PATCH v8 12/12] phy: qcom: qmp-usbc: Add QCS615 USB/DP PHY config and DP mode support Xiangxu Yin via B4 Relay
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=20251215-add-displayport-support-for-qcs615-platform-v8-5-cbc72c88a44e@oss.qualcomm.com \
--to=devnull+xiangxu.yin.oss.qualcomm.com@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=fange.zhang@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=li.liu@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=tingwei.zhang@oss.qualcomm.com \
--cc=vkoul@kernel.org \
--cc=xiangxu.yin@oss.qualcomm.com \
--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).