Skip to content

Commit b514cc0

Browse files
P33Mpopcornmix
authored andcommitted
PCI: brcmstb: add NO_SSC quirk for BCM2712
The PHY MDIO register map is different on BCM2712, and as the PHY input clock is 54MHz not 100MHz, enabling refclk SSC is both broken and unfixable. Mask out attempts to enable SSC with a controller quirk. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
1 parent 725e0c1 commit b514cc0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ struct inbound_win {
259259
*/
260260
#define CFG_QUIRK_AVOID_BRIDGE_SHUTDOWN BIT(0)
261261

262+
/*
263+
* MDIO register map differences and required changes to the defaults mean that refclk
264+
* spread-spectrum clocking isn't supportable.
265+
*/
266+
#define CFG_QUIRK_NO_SSC BIT(1)
267+
262268
struct pcie_cfg_data {
263269
const int *offsets;
264270
const enum pcie_soc_base soc_base;
@@ -1811,7 +1817,7 @@ static const struct pcie_cfg_data bcm2712_cfg = {
18111817
.perst_set = brcm_pcie_perst_set_7278,
18121818
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
18131819
.post_setup = brcm_pcie_post_setup_bcm2712,
1814-
.quirks = CFG_QUIRK_AVOID_BRIDGE_SHUTDOWN,
1820+
.quirks = CFG_QUIRK_AVOID_BRIDGE_SHUTDOWN | CFG_QUIRK_NO_SSC,
18151821
.num_inbound_wins = 10,
18161822
};
18171823

@@ -1929,7 +1935,8 @@ static int brcm_pcie_probe(struct platform_device *pdev)
19291935
ret = of_pci_get_max_link_speed(np);
19301936
pcie->gen = (ret < 0) ? 0 : ret;
19311937

1932-
pcie->ssc = of_property_read_bool(np, "brcm,enable-ssc");
1938+
pcie->ssc = !(pcie->cfg->quirks & CFG_QUIRK_NO_SSC) &&
1939+
of_property_read_bool(np, "brcm,enable-ssc");
19331940

19341941
pcie->rescal = devm_reset_control_get_optional_shared(&pdev->dev, "rescal");
19351942
if (IS_ERR(pcie->rescal))

0 commit comments

Comments
 (0)