phy: qcom: qmp-usb-legacy: drop single-lane support
All PHYs supported by usb-legacy have two lanes. Drop support for single-lane configuration. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad DYbcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20240126-phy-qmp-merge-common-v2-1-a463d0b57836@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
80082fc89e
commit
982f92d5ee
@ -507,8 +507,6 @@ struct qmp_usb_legacy_offsets {
|
||||
|
||||
/* struct qmp_phy_cfg - per-PHY initialization config */
|
||||
struct qmp_phy_cfg {
|
||||
int lanes;
|
||||
|
||||
const struct qmp_usb_legacy_offsets *offsets;
|
||||
|
||||
/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
|
||||
@ -621,8 +619,6 @@ static const char * const qmp_phy_vreg_l[] = {
|
||||
};
|
||||
|
||||
static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
|
||||
.lanes = 2,
|
||||
|
||||
.serdes_tbl = qmp_v3_usb3_serdes_tbl,
|
||||
.serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
|
||||
.tx_tbl = qmp_v3_usb3_tx_tbl,
|
||||
@ -641,8 +637,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
|
||||
};
|
||||
|
||||
static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
|
||||
.lanes = 2,
|
||||
|
||||
.serdes_tbl = qmp_v3_usb3_serdes_tbl,
|
||||
.serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
|
||||
.tx_tbl = qmp_v3_usb3_tx_tbl,
|
||||
@ -661,8 +655,6 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
|
||||
};
|
||||
|
||||
static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
|
||||
.lanes = 2,
|
||||
|
||||
.serdes_tbl = sm8150_usb3_serdes_tbl,
|
||||
.serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl),
|
||||
.tx_tbl = sm8150_usb3_tx_tbl,
|
||||
@ -684,8 +676,6 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
|
||||
};
|
||||
|
||||
static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
|
||||
.lanes = 2,
|
||||
|
||||
.serdes_tbl = sm8150_usb3_serdes_tbl,
|
||||
.serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl),
|
||||
.tx_tbl = sm8250_usb3_tx_tbl,
|
||||
@ -707,8 +697,6 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
|
||||
};
|
||||
|
||||
static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
|
||||
.lanes = 2,
|
||||
|
||||
.serdes_tbl = sm8150_usb3_serdes_tbl,
|
||||
.serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl),
|
||||
.tx_tbl = sm8350_usb3_tx_tbl,
|
||||
@ -874,10 +862,8 @@ static int qmp_usb_legacy_power_on(struct phy *phy)
|
||||
qmp_usb_legacy_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1);
|
||||
qmp_usb_legacy_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1);
|
||||
|
||||
if (cfg->lanes >= 2) {
|
||||
qmp_usb_legacy_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2);
|
||||
qmp_usb_legacy_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2);
|
||||
}
|
||||
qmp_usb_legacy_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2);
|
||||
qmp_usb_legacy_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2);
|
||||
|
||||
qmp_usb_legacy_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num);
|
||||
|
||||
@ -1231,20 +1217,15 @@ static int qmp_usb_legacy_parse_dt_legacy(struct qmp_usb *qmp, struct device_nod
|
||||
if (cfg->pcs_usb_offset)
|
||||
qmp->pcs_usb = qmp->pcs + cfg->pcs_usb_offset;
|
||||
|
||||
if (cfg->lanes >= 2) {
|
||||
qmp->tx2 = devm_of_iomap(dev, np, 3, NULL);
|
||||
if (IS_ERR(qmp->tx2))
|
||||
return PTR_ERR(qmp->tx2);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
if (IS_ERR(qmp->pcs_misc)) {
|
||||
dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
|
||||
qmp->pcs_misc = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user