phy fixes for 6.8

- Driver fixes for
    - 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
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmW+RtsACgkQfBQHDyUj
 g0fdHw//f9M9WUTyMa2AwK/WwJOa8ZLu+/ZE/0k3AAkw5H8wbun6hIUjiDEzpQAv
 uaZgcIku5iXT+FozejVlo7ihXjQMNKz43iW0+lUqv5CsDTpSk0Lnv3GMaTuy2FHo
 Dzyj04FDo26qhaomMooVEuZ+jwKM+Wj+TdpfPfuticVJ+orNyufyaV1tWcn+7Hkt
 ecjL4Y/PpXmdWL8GKznYpHw/sIgcRxwqOtjna73rAk8fxn4kcHUegtg342YxRE6v
 KWVWf1tc/0zF/AOwAI5UEvNKhqVR6S+buuIUJk+UW0M5pyaqjvGS3cN/wjgiEikK
 a52IL+2+PX2R8UwlLQ5w4Pyh73pWLqdip6opKDttX3bBECvVYTsrWm2udfahCWFI
 VyBb+cb/NPl4z+k74SLtLngbvQsXeTcS0ZOUBT8piHxX7zvpJih4pOjY9Z1TdY4R
 5zKAMBV58ESRUkLsN8E2ww2XkmCGSCojG6Zlz1K8JSWmt3gh1whUrK2DlsPj0Vnz
 ivYq8OQkoy1n05DNqClyo3bGyRt8MtQ9wwCyc2d190ifkQWhLCAdygnYgvUS4SeQ
 NyyG42SV7om8Hg/uFII9DjyjWaI5FpGoNODogb/W7e0Xs7nvQZYGKauVn0IpZOCt
 ASQOryqvok/jquZBILNg9LCTlpqGq5T4ZCJazk5EHIWgjP6MWhI=
 =d5lV
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-02-04 06:35:00 +00:00
commit 843a33d63b
4 changed files with 32 additions and 8 deletions

View file

@ -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,

View file

@ -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 @@ err_node_put:
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,

View file

@ -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;

View file

@ -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);