Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: qcom-qmp-usb: add support for updated qcm2290 / sm6115 binding

Add support for the new qcm2290 / sm6115 binding.

The USB QMP phy on these devices supports 2 lanes. Note that the
binding now does not describe every register subregion and instead
the driver holds the corresponding offsets.

While at it also include support for PCS_MISC region which was left
out earlier.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Link: https://lore.kernel.org/r/20230516150511.2346357-3-bhupesh.sharma@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Bhupesh Sharma and committed by
Vinod Koul
1178c93c 2daece5e

+22
+22
drivers/phy/qualcomm/phy-qcom-qmp-usb.c
··· 1513 1513 struct qmp_usb_offsets { 1514 1514 u16 serdes; 1515 1515 u16 pcs; 1516 + u16 pcs_misc; 1516 1517 u16 pcs_usb; 1517 1518 u16 tx; 1518 1519 u16 rx; 1520 + /* for PHYs with >= 2 lanes */ 1521 + u16 tx2; 1522 + u16 rx2; 1519 1523 }; 1520 1524 1521 1525 /* struct qmp_phy_cfg - per-PHY initialization config */ ··· 1670 1666 .pcs_usb = 0x800, 1671 1667 .tx = 0x200, 1672 1668 .rx = 0x400, 1669 + }; 1670 + 1671 + static const struct qmp_usb_offsets qmp_usb_offsets_v3 = { 1672 + .serdes = 0, 1673 + .pcs = 0xc00, 1674 + .pcs_misc = 0xa00, 1675 + .tx = 0x200, 1676 + .rx = 0x400, 1677 + .tx2 = 0x600, 1678 + .rx2 = 0x800, 1673 1679 }; 1674 1680 1675 1681 static const struct qmp_usb_offsets qmp_usb_offsets_v5 = { ··· 2089 2075 2090 2076 static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { 2091 2077 .lanes = 2, 2078 + 2079 + .offsets = &qmp_usb_offsets_v3, 2092 2080 2093 2081 .serdes_tbl = qcm2290_usb3_serdes_tbl, 2094 2082 .serdes_tbl_num = ARRAY_SIZE(qcm2290_usb3_serdes_tbl), ··· 2663 2647 2664 2648 qmp->serdes = base + offs->serdes; 2665 2649 qmp->pcs = base + offs->pcs; 2650 + qmp->pcs_misc = base + offs->pcs_misc; 2666 2651 qmp->pcs_usb = base + offs->pcs_usb; 2667 2652 qmp->tx = base + offs->tx; 2668 2653 qmp->rx = base + offs->rx; 2654 + 2655 + if (cfg->lanes >= 2) { 2656 + qmp->tx2 = base + offs->tx2; 2657 + qmp->rx2 = base + offs->rx2; 2658 + } 2669 2659 2670 2660 qmp->pipe_clk = devm_clk_get(dev, "pipe"); 2671 2661 if (IS_ERR(qmp->pipe_clk)) {