Commit 843a33d6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents b555d191 7104ba0f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ static const struct serdes_mux lan966x_serdes_muxes[] = {
	SERDES_MUX_SGMII(SERDES6G(1), 3, HSIO_HW_CFG_SD6G_1_CFG,
			 HSIO_HW_CFG_SD6G_1_CFG_SET(1)),

	SERDES_MUX_SGMII(SERDES6G(2), 4, 0, 0),

	SERDES_MUX_RGMII(RGMII(0), 2, HSIO_HW_CFG_RGMII_0_CFG |
			 HSIO_HW_CFG_RGMII_ENA |
			 HSIO_HW_CFG_GMII_ENA,
+28 −2
Original line number Diff line number Diff line
@@ -1556,6 +1556,14 @@ static const char * const qmp_phy_vreg_l[] = {
	"vdda-phy", "vdda-pll",
};

static const struct qmp_usb_offsets qmp_usb_offsets_ipq8074 = {
	.serdes		= 0,
	.pcs		= 0x800,
	.pcs_misc	= 0x600,
	.tx		= 0x200,
	.rx		= 0x400,
};

static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
	.serdes		= 0,
	.pcs		= 0x800,
@@ -1613,10 +1621,28 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = {
	.rx		= 0x1000,
};

static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
	.lanes			= 1,

	.offsets		= &qmp_usb_offsets_ipq8074,

	.serdes_tbl		= ipq9574_usb3_serdes_tbl,
	.serdes_tbl_num		= ARRAY_SIZE(ipq9574_usb3_serdes_tbl),
	.tx_tbl			= msm8996_usb3_tx_tbl,
	.tx_tbl_num		= ARRAY_SIZE(msm8996_usb3_tx_tbl),
	.rx_tbl			= ipq8074_usb3_rx_tbl,
	.rx_tbl_num		= ARRAY_SIZE(ipq8074_usb3_rx_tbl),
	.pcs_tbl		= ipq8074_usb3_pcs_tbl,
	.pcs_tbl_num		= ARRAY_SIZE(ipq8074_usb3_pcs_tbl),
	.vreg_list		= qmp_phy_vreg_l,
	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
	.regs			= qmp_v3_usb3phy_regs_layout,
};

static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
	.lanes			= 1,

	.offsets		= &qmp_usb_offsets_v3,
	.offsets		= &qmp_usb_offsets_ipq8074,

	.serdes_tbl		= ipq8074_usb3_serdes_tbl,
	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_usb3_serdes_tbl),
@@ -2563,7 +2589,7 @@ static int qmp_usb_probe(struct platform_device *pdev)
static const struct of_device_id qmp_usb_of_match_table[] = {
	{
		.compatible = "qcom,ipq6018-qmp-usb3-phy",
		.data = &ipq8074_usb3phy_cfg,
		.data = &ipq6018_usb3phy_cfg,
	}, {
		.compatible = "qcom,ipq8074-qmp-usb3-phy",
		.data = &ipq8074_usb3phy_cfg,
+0 −4
Original line number Diff line number Diff line
@@ -673,8 +673,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
	channel->irq = platform_get_irq_optional(pdev, 0);
	channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
	if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
		int ret;

		channel->is_otg_channel = true;
		channel->uses_otg_pins = !of_property_read_bool(dev->of_node,
							"renesas,no-otg-pins");
@@ -738,8 +736,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
		ret = PTR_ERR(provider);
		goto error;
	} else if (channel->is_otg_channel) {
		int ret;

		ret = device_create_file(dev, &dev_attr_role);
		if (ret < 0)
			goto error;
+2 −2
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static int omap_usb_set_vbus(struct usb_otg *otg, bool enabled)
{
	struct omap_usb *phy = phy_to_omapusb(otg->usb_phy);

	if (!phy->comparator)
	if (!phy->comparator || !phy->comparator->set_vbus)
		return -ENODEV;

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

	if (!phy->comparator)
	if (!phy->comparator || !phy->comparator->start_srp)
		return -ENODEV;

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