Skip to content

Commit 843a33d

Browse files
committed
Merge tag 'phy-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Pull phy driver fixes from Vinod Koul: - TI null pointer dereference - missing erdes mux entry in lan966x driver - Return of error code in renesas driver - Serdes init sequence and register offsets for IPQ drivers * tag 'phy-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP phy: lan966x: Add missing serdes mux entry phy: renesas: rcar-gen3-usb2: Fix returning wrong error code phy: qcom-qmp-usb: fix serdes init sequence for IPQ6018 phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018
2 parents b555d19 + 7104ba0 commit 843a33d

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

drivers/phy/microchip/lan966x_serdes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ static const struct serdes_mux lan966x_serdes_muxes[] = {
9696
SERDES_MUX_SGMII(SERDES6G(1), 3, HSIO_HW_CFG_SD6G_1_CFG,
9797
HSIO_HW_CFG_SD6G_1_CFG_SET(1)),
9898

99+
SERDES_MUX_SGMII(SERDES6G(2), 4, 0, 0),
100+
99101
SERDES_MUX_RGMII(RGMII(0), 2, HSIO_HW_CFG_RGMII_0_CFG |
100102
HSIO_HW_CFG_RGMII_ENA |
101103
HSIO_HW_CFG_GMII_ENA,

drivers/phy/qualcomm/phy-qcom-qmp-usb.c

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,14 @@ static const char * const qmp_phy_vreg_l[] = {
15561556
"vdda-phy", "vdda-pll",
15571557
};
15581558

1559+
static const struct qmp_usb_offsets qmp_usb_offsets_ipq8074 = {
1560+
.serdes = 0,
1561+
.pcs = 0x800,
1562+
.pcs_misc = 0x600,
1563+
.tx = 0x200,
1564+
.rx = 0x400,
1565+
};
1566+
15591567
static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
15601568
.serdes = 0,
15611569
.pcs = 0x800,
@@ -1613,10 +1621,28 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = {
16131621
.rx = 0x1000,
16141622
};
16151623

1624+
static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
1625+
.lanes = 1,
1626+
1627+
.offsets = &qmp_usb_offsets_ipq8074,
1628+
1629+
.serdes_tbl = ipq9574_usb3_serdes_tbl,
1630+
.serdes_tbl_num = ARRAY_SIZE(ipq9574_usb3_serdes_tbl),
1631+
.tx_tbl = msm8996_usb3_tx_tbl,
1632+
.tx_tbl_num = ARRAY_SIZE(msm8996_usb3_tx_tbl),
1633+
.rx_tbl = ipq8074_usb3_rx_tbl,
1634+
.rx_tbl_num = ARRAY_SIZE(ipq8074_usb3_rx_tbl),
1635+
.pcs_tbl = ipq8074_usb3_pcs_tbl,
1636+
.pcs_tbl_num = ARRAY_SIZE(ipq8074_usb3_pcs_tbl),
1637+
.vreg_list = qmp_phy_vreg_l,
1638+
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
1639+
.regs = qmp_v3_usb3phy_regs_layout,
1640+
};
1641+
16161642
static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
16171643
.lanes = 1,
16181644

1619-
.offsets = &qmp_usb_offsets_v3,
1645+
.offsets = &qmp_usb_offsets_ipq8074,
16201646

16211647
.serdes_tbl = ipq8074_usb3_serdes_tbl,
16221648
.serdes_tbl_num = ARRAY_SIZE(ipq8074_usb3_serdes_tbl),
@@ -2563,7 +2589,7 @@ static int qmp_usb_probe(struct platform_device *pdev)
25632589
static const struct of_device_id qmp_usb_of_match_table[] = {
25642590
{
25652591
.compatible = "qcom,ipq6018-qmp-usb3-phy",
2566-
.data = &ipq8074_usb3phy_cfg,
2592+
.data = &ipq6018_usb3phy_cfg,
25672593
}, {
25682594
.compatible = "qcom,ipq8074-qmp-usb3-phy",
25692595
.data = &ipq8074_usb3phy_cfg,

drivers/phy/renesas/phy-rcar-gen3-usb2.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
673673
channel->irq = platform_get_irq_optional(pdev, 0);
674674
channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
675675
if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
676-
int ret;
677-
678676
channel->is_otg_channel = true;
679677
channel->uses_otg_pins = !of_property_read_bool(dev->of_node,
680678
"renesas,no-otg-pins");
@@ -738,8 +736,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
738736
ret = PTR_ERR(provider);
739737
goto error;
740738
} else if (channel->is_otg_channel) {
741-
int ret;
742-
743739
ret = device_create_file(dev, &dev_attr_role);
744740
if (ret < 0)
745741
goto error;

drivers/phy/ti/phy-omap-usb2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int omap_usb_set_vbus(struct usb_otg *otg, bool enabled)
117117
{
118118
struct omap_usb *phy = phy_to_omapusb(otg->usb_phy);
119119

120-
if (!phy->comparator)
120+
if (!phy->comparator || !phy->comparator->set_vbus)
121121
return -ENODEV;
122122

123123
return phy->comparator->set_vbus(phy->comparator, enabled);
@@ -127,7 +127,7 @@ static int omap_usb_start_srp(struct usb_otg *otg)
127127
{
128128
struct omap_usb *phy = phy_to_omapusb(otg->usb_phy);
129129

130-
if (!phy->comparator)
130+
if (!phy->comparator || !phy->comparator->start_srp)
131131
return -ENODEV;
132132

133133
return phy->comparator->start_srp(phy->comparator);

0 commit comments

Comments
 (0)