From: Johan Hovold <johan+linaro@kernel.org>
To: Vinod Koul <vkoul@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org,
Johan Hovold <johan+linaro@kernel.org>
Subject: [PATCH v2 16/22] phy: qcom-qmp-combo: add DP configuration tables
Date: Mon, 14 Nov 2022 12:06:15 +0100 [thread overview]
Message-ID: <20221114110621.4639-17-johan+linaro@kernel.org> (raw)
In-Reply-To: <20221114110621.4639-1-johan+linaro@kernel.org>
In preparation for merging the USB and DP configurations, add dedicated
pointers for the DP serdes and tx tables to the configurations.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 45 ++++++++++++-----------
1 file changed, 24 insertions(+), 21 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index d3fd6bde4af5..2588cfa5e81e 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -816,6 +816,11 @@ struct qmp_phy_cfg {
const struct qmp_phy_init_tbl *pcs_usb_tbl;
int pcs_usb_tbl_num;
+ const struct qmp_phy_init_tbl *dp_serdes_tbl;
+ int dp_serdes_tbl_num;
+ const struct qmp_phy_init_tbl *dp_tx_tbl;
+ int dp_tx_tbl_num;
+
/* Init sequence for DP PHY block link rates */
const struct qmp_phy_init_tbl *serdes_tbl_rbr;
int serdes_tbl_rbr_num;
@@ -1030,10 +1035,10 @@ static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
.type = PHY_TYPE_DP,
.lanes = 2,
- .serdes_tbl = qmp_v3_dp_serdes_tbl,
- .serdes_tbl_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl),
- .tx_tbl = qmp_v3_dp_tx_tbl,
- .tx_tbl_num = ARRAY_SIZE(qmp_v3_dp_tx_tbl),
+ .dp_serdes_tbl = qmp_v3_dp_serdes_tbl,
+ .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl),
+ .dp_tx_tbl = qmp_v3_dp_tx_tbl,
+ .dp_tx_tbl_num = ARRAY_SIZE(qmp_v3_dp_tx_tbl),
.serdes_tbl_rbr = qmp_v3_dp_serdes_tbl_rbr,
.serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl_rbr),
@@ -1147,10 +1152,10 @@ static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
.type = PHY_TYPE_DP,
.lanes = 2,
- .serdes_tbl = qmp_v4_dp_serdes_tbl,
- .serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
- .tx_tbl = qmp_v4_dp_tx_tbl,
- .tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl),
+ .dp_serdes_tbl = qmp_v4_dp_serdes_tbl,
+ .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
+ .dp_tx_tbl = qmp_v4_dp_tx_tbl,
+ .dp_tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl),
.serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr,
.serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr),
@@ -1203,10 +1208,10 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
.type = PHY_TYPE_DP,
.lanes = 2,
- .serdes_tbl = qmp_v5_dp_serdes_tbl,
- .serdes_tbl_num = ARRAY_SIZE(qmp_v5_dp_serdes_tbl),
- .tx_tbl = qmp_v5_5nm_dp_tx_tbl,
- .tx_tbl_num = ARRAY_SIZE(qmp_v5_5nm_dp_tx_tbl),
+ .dp_serdes_tbl = qmp_v5_dp_serdes_tbl,
+ .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v5_dp_serdes_tbl),
+ .dp_tx_tbl = qmp_v5_5nm_dp_tx_tbl,
+ .dp_tx_tbl_num = ARRAY_SIZE(qmp_v5_5nm_dp_tx_tbl),
.serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr,
.serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr),
@@ -1263,10 +1268,10 @@ static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
.type = PHY_TYPE_DP,
.lanes = 2,
- .serdes_tbl = qmp_v4_dp_serdes_tbl,
- .serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
- .tx_tbl = qmp_v4_dp_tx_tbl,
- .tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl),
+ .dp_serdes_tbl = qmp_v4_dp_serdes_tbl,
+ .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
+ .dp_tx_tbl = qmp_v4_dp_tx_tbl,
+ .dp_tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl),
.serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr,
.serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr),
@@ -1324,10 +1329,8 @@ static int qmp_combo_dp_serdes_init(struct qmp_phy *qphy)
const struct qmp_phy_cfg *cfg = qphy->cfg;
void __iomem *serdes = qphy->dp_serdes;
const struct phy_configure_opts_dp *dp_opts = &qphy->dp_opts;
- const struct qmp_phy_init_tbl *serdes_tbl = cfg->serdes_tbl;
- int serdes_tbl_num = cfg->serdes_tbl_num;
- qmp_combo_configure(serdes, serdes_tbl, serdes_tbl_num);
+ qmp_combo_configure(serdes, cfg->dp_serdes_tbl, cfg->dp_serdes_tbl_num);
switch (dp_opts->link_rate) {
case 1620:
@@ -2000,10 +2003,10 @@ static int qmp_combo_dp_power_on(struct phy *phy)
qmp_combo_dp_serdes_init(qphy);
- qmp_combo_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1);
+ qmp_combo_configure_lane(tx, cfg->dp_tx_tbl, cfg->dp_tx_tbl_num, 1);
if (cfg->lanes >= 2)
- qmp_combo_configure_lane(qphy->dp_tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2);
+ qmp_combo_configure_lane(qphy->dp_tx2, cfg->dp_tx_tbl, cfg->dp_tx_tbl_num, 2);
/* Configure special DP tx tunings */
cfg->configure_dp_tx(qphy);
--
2.37.4
next prev parent reply other threads:[~2022-11-14 11:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 11:05 [PATCH v2 00/22] phy: qcom-qmp-combo: preparatory cleanups (set 2/3) Johan Hovold
2022-11-14 11:06 ` [PATCH v2 01/22] phy: qcom-qmp-combo: sort device-id table Johan Hovold
2022-11-14 11:06 ` [PATCH v2 02/22] phy: qcom-qmp-combo: move " Johan Hovold
2022-11-14 11:06 ` [PATCH v2 03/22] phy: qcom-qmp-combo: move pm ops Johan Hovold
2022-11-14 11:06 ` [PATCH v2 04/22] phy: qcom-qmp-combo: rename PHY ops structures Johan Hovold
2022-11-14 11:06 ` [PATCH v2 05/22] phy: qcom-qmp-combo: drop unused DP PHY mode op Johan Hovold
2022-11-14 11:06 ` [PATCH v2 06/22] phy: qcom-qmp-combo: rename USB PHY ops Johan Hovold
2022-11-14 11:06 ` [PATCH v2 07/22] phy: qcom-qmp-combo: drop unnecessary debug message Johan Hovold
2022-11-14 11:06 ` [PATCH v2 08/22] phy: qcom-qmp-combo: separate USB and DP init ops Johan Hovold
2022-11-14 11:06 ` [PATCH v2 09/22] phy: qcom-qmp-combo: rename DP PHY ops Johan Hovold
2022-11-14 11:06 ` [PATCH v2 10/22] phy: qcom-qmp-combo: separate USB and DP power-on ops Johan Hovold
2022-11-14 11:06 ` [PATCH v2 11/22] phy: qcom-qmp-combo: clean up serdes initialisation Johan Hovold
2022-11-14 11:06 ` [PATCH v2 12/22] phy: qcom-qmp-combo: separate USB and DP devicetree parsing Johan Hovold
2022-11-14 11:06 ` [PATCH v2 13/22] phy: qcom-qmp-combo: add dedicated DP iomem pointers Johan Hovold
2022-11-14 11:06 ` [PATCH v2 14/22] phy: qcom-qmp-combo: clean up DP configurations Johan Hovold
2022-11-14 11:06 ` [PATCH v2 15/22] phy: qcom-qmp-combo: rename sc8280xp config Johan Hovold
2022-11-14 11:06 ` Johan Hovold [this message]
2022-11-14 11:06 ` [PATCH v2 17/22] phy: qcom-qmp-combo: drop lanes config parameter Johan Hovold
2022-11-14 15:07 ` Dmitry Baryshkov
2022-11-14 11:06 ` [PATCH v2 18/22] phy: qcom-qmp-combo: merge USB and DP configurations Johan Hovold
2022-11-14 11:06 ` [PATCH v2 19/22] phy: qcom-qmp-combo: merge driver data Johan Hovold
2022-11-14 11:06 ` [PATCH v2 20/22] phy: qcom-qmp-combo: clean up device-tree parsing Johan Hovold
2022-11-14 11:06 ` [PATCH v2 21/22] phy: qcom-qmp-combo: clean up probe initialisation Johan Hovold
2022-11-14 11:06 ` [PATCH v2 22/22] phy: qcom-qmp-combo: clean up DP callback names Johan Hovold
2022-11-24 17:17 ` [PATCH v2 00/22] phy: qcom-qmp-combo: preparatory cleanups (set 2/3) Vinod Koul
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=20221114110621.4639-17-johan+linaro@kernel.org \
--to=johan+linaro@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.org \
/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