Commit 52cfdc9c authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Vinod Koul

phy: qcom: qmp-usb: drop dual-lane handling

Now as all dual-lane PHYs have been migrated to a new driver, drop
support for dual lanes configuration. If the PHY uses two lanes for USB,
it is symthom that it should use either a combo USB+DP or a USB-C PHY
driver.
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240113-pmi632-typec-v2-11-182d9aa0a5b3@linaro.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 19281571
...@@ -1237,15 +1237,10 @@ struct qmp_usb_offsets { ...@@ -1237,15 +1237,10 @@ struct qmp_usb_offsets {
u16 pcs_usb; u16 pcs_usb;
u16 tx; u16 tx;
u16 rx; u16 rx;
/* for PHYs with >= 2 lanes */
u16 tx2;
u16 rx2;
}; };
/* struct qmp_phy_cfg - per-PHY initialization config */ /* struct qmp_phy_cfg - per-PHY initialization config */
struct qmp_phy_cfg { struct qmp_phy_cfg {
int lanes;
const struct qmp_usb_offsets *offsets; const struct qmp_usb_offsets *offsets;
/* Init sequence for PHY blocks - serdes, tx, rx, pcs */ /* Init sequence for PHY blocks - serdes, tx, rx, pcs */
...@@ -1285,8 +1280,6 @@ struct qmp_usb { ...@@ -1285,8 +1280,6 @@ struct qmp_usb {
void __iomem *pcs_usb; void __iomem *pcs_usb;
void __iomem *tx; void __iomem *tx;
void __iomem *rx; void __iomem *rx;
void __iomem *tx2;
void __iomem *rx2;
struct clk *pipe_clk; struct clk *pipe_clk;
struct clk_bulk_data *clks; struct clk_bulk_data *clks;
...@@ -1393,8 +1386,6 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = { ...@@ -1393,8 +1386,6 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = {
}; };
static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v3, .offsets = &qmp_usb_offsets_v3,
.serdes_tbl = ipq8074_usb3_serdes_tbl, .serdes_tbl = ipq8074_usb3_serdes_tbl,
...@@ -1411,8 +1402,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { ...@@ -1411,8 +1402,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
}; };
static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_ipq9574, .offsets = &qmp_usb_offsets_ipq9574,
.serdes_tbl = ipq9574_usb3_serdes_tbl, .serdes_tbl = ipq9574_usb3_serdes_tbl,
...@@ -1429,8 +1418,6 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { ...@@ -1429,8 +1418,6 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = {
}; };
static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v3, .offsets = &qmp_usb_offsets_v3,
.serdes_tbl = msm8996_usb3_serdes_tbl, .serdes_tbl = msm8996_usb3_serdes_tbl,
...@@ -1447,8 +1434,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { ...@@ -1447,8 +1434,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
}; };
static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v5, .offsets = &qmp_usb_offsets_v5,
.serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl, .serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl,
...@@ -1467,8 +1452,6 @@ static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { ...@@ -1467,8 +1452,6 @@ static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v5, .offsets = &qmp_usb_offsets_v5,
.serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl, .serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl,
...@@ -1487,8 +1470,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { ...@@ -1487,8 +1470,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v3, .offsets = &qmp_usb_offsets_v3,
.serdes_tbl = qmp_v3_usb3_uniphy_serdes_tbl, .serdes_tbl = qmp_v3_usb3_uniphy_serdes_tbl,
...@@ -1507,8 +1488,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { ...@@ -1507,8 +1488,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v4, .offsets = &qmp_usb_offsets_v4,
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl,
...@@ -1530,8 +1509,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { ...@@ -1530,8 +1509,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v4, .offsets = &qmp_usb_offsets_v4,
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl,
...@@ -1553,8 +1530,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { ...@@ -1553,8 +1530,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v4, .offsets = &qmp_usb_offsets_v4,
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl,
...@@ -1576,8 +1551,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { ...@@ -1576,8 +1551,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v5, .offsets = &qmp_usb_offsets_v5,
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl,
...@@ -1599,7 +1572,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { ...@@ -1599,7 +1572,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v6, .offsets = &qmp_usb_offsets_v6,
.serdes_tbl = sdx75_usb3_uniphy_serdes_tbl, .serdes_tbl = sdx75_usb3_uniphy_serdes_tbl,
...@@ -1621,8 +1593,6 @@ static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = { ...@@ -1621,8 +1593,6 @@ static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v5, .offsets = &qmp_usb_offsets_v5,
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl,
...@@ -1644,8 +1614,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { ...@@ -1644,8 +1614,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
}; };
static const struct qmp_phy_cfg x1e80100_usb3_uniphy_cfg = { static const struct qmp_phy_cfg x1e80100_usb3_uniphy_cfg = {
.lanes = 1,
.offsets = &qmp_usb_offsets_v7, .offsets = &qmp_usb_offsets_v7,
.serdes_tbl = x1e80100_usb3_uniphy_serdes_tbl, .serdes_tbl = x1e80100_usb3_uniphy_serdes_tbl,
...@@ -1780,11 +1748,6 @@ static int qmp_usb_power_on(struct phy *phy) ...@@ -1780,11 +1748,6 @@ static int qmp_usb_power_on(struct phy *phy)
qmp_usb_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1); qmp_usb_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1);
qmp_usb_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1); qmp_usb_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1);
if (cfg->lanes >= 2) {
qmp_usb_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2);
qmp_usb_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2);
}
qmp_usb_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num); qmp_usb_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num);
if (pcs_usb) if (pcs_usb)
...@@ -2131,7 +2094,6 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) ...@@ -2131,7 +2094,6 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np)
/* /*
* Get memory resources for the PHY: * Get memory resources for the PHY:
* Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2.
* For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5
* For single lane PHYs: pcs_misc (optional) -> 3. * For single lane PHYs: pcs_misc (optional) -> 3.
*/ */
qmp->tx = devm_of_iomap(dev, np, 0, NULL); qmp->tx = devm_of_iomap(dev, np, 0, NULL);
...@@ -2149,19 +2111,7 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) ...@@ -2149,19 +2111,7 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np)
if (cfg->pcs_usb_offset) if (cfg->pcs_usb_offset)
qmp->pcs_usb = qmp->pcs + cfg->pcs_usb_offset; qmp->pcs_usb = qmp->pcs + cfg->pcs_usb_offset;
if (cfg->lanes >= 2) { qmp->pcs_misc = devm_of_iomap(dev, np, 3, NULL);
qmp->tx2 = devm_of_iomap(dev, np, 3, NULL);
if (IS_ERR(qmp->tx2))
return PTR_ERR(qmp->tx2);
qmp->rx2 = devm_of_iomap(dev, np, 4, NULL);
if (IS_ERR(qmp->rx2))
return PTR_ERR(qmp->rx2);
qmp->pcs_misc = devm_of_iomap(dev, np, 5, NULL);
} else {
qmp->pcs_misc = devm_of_iomap(dev, np, 3, NULL);
}
if (IS_ERR(qmp->pcs_misc)) { if (IS_ERR(qmp->pcs_misc)) {
dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
...@@ -2213,11 +2163,6 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) ...@@ -2213,11 +2163,6 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp)
qmp->tx = base + offs->tx; qmp->tx = base + offs->tx;
qmp->rx = base + offs->rx; qmp->rx = base + offs->rx;
if (cfg->lanes >= 2) {
qmp->tx2 = base + offs->tx2;
qmp->rx2 = base + offs->rx2;
}
ret = qmp_usb_clk_init(qmp); ret = qmp_usb_clk_init(qmp);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment