Skip to content

Commit 72bef51

Browse files
committed
phy: rockchip: naneng-combphy: Always configure SSC spread direction
Commit 0b31f29 ("phy: rockchip: naneng-combphy: Consolidate SSC configuration") moved the SSC spread spectrum direction setup into the new rk_combphy_common_cfg_ssc() helper. That helper returns early when the 'rockchip,enable-ssc' property is absent, whereas the equivalent RK3568_PHYREG32 direction writes previously ran unconditionally in the per-type switch statements, independent of whether SSC modulation was actually enabled. As no in-tree board sets 'rockchip,enable-ssc', this changed the behavior at least for USB3 on RK3576, which now fails to bring up the link. USB 2.0 still enumerates, but USB 3.0 does not, and the SuperSpeed root port floods the log every second with: usb usb2-port1: Cannot enable. Maybe the USB cable is bad? This was observed on two different RK3576 devices with a CoreChips SL6341 USB 2.0/3.0 hub connected to the USB DRD controller running in host mode. Perform the SSC direction writes for PCIe/USB3 (and SATA) before the enable_ssc check so that they always run, as they did before the consolidation. Cc: stable@vger.kernel.org Fixes: 0b31f29 ("phy: rockchip: naneng-combphy: Consolidate SSC configuration") Signed-off-by: Alexey Charkov <alchark@flipper.net>
1 parent 08866bc commit 72bef51

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/phy/rockchip/phy-rockchip-naneng-combphy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ static void rk_combphy_common_cfg_ssc(struct rockchip_combphy_priv *priv, unsign
452452
struct device_node *np = priv->dev->of_node;
453453
u32 val;
454454

455-
if (!priv->enable_ssc)
456-
return;
457-
458455
/* Set SSC downward spread spectrum for PCIe and USB3 */
459456
if (priv->type == PHY_TYPE_PCIE || priv->type == PHY_TYPE_USB3) {
460457
val = FIELD_PREP(RK3568_PHYREG32_SSC_MASK, RK3568_PHYREG32_SSC_DOWNWARD);
@@ -471,6 +468,9 @@ static void rk_combphy_common_cfg_ssc(struct rockchip_combphy_priv *priv, unsign
471468
RK3568_PHYREG32);
472469
}
473470

471+
if (!priv->enable_ssc)
472+
return;
473+
474474
/* Enable SSC */
475475
val = readl(priv->mmio + RK3568_PHYREG8);
476476
val |= RK3568_PHYREG8_SSC_EN;

0 commit comments

Comments
 (0)