|
@@ -696,9 +696,20 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
|
|
|
}
|
|
|
|
|
|
/* Include the pseudo-PHY address and the broadcast PHY address to
|
|
|
- * divert reads towards our workaround
|
|
|
+ * divert reads towards our workaround. This is only required for
|
|
|
+ * 7445D0, since 7445E0 disconnects the internal switch pseudo-PHY such
|
|
|
+ * that we can use the regular SWITCH_MDIO master controller instead.
|
|
|
+ *
|
|
|
+ * By default, DSA initializes ds->phys_mii_mask to ds->phys_port_mask
|
|
|
+ * to have a 1:1 mapping between Port address and PHY address in order
|
|
|
+ * to utilize the slave_mii_bus instance to read from Port PHYs. This is
|
|
|
+ * not what we want here, so we initialize phys_mii_mask 0 to always
|
|
|
+ * utilize the "master" MDIO bus backed by the "mdio-unimac" driver.
|
|
|
*/
|
|
|
- ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0));
|
|
|
+ if (of_machine_is_compatible("brcm,bcm7445d0"))
|
|
|
+ ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0));
|
|
|
+ else
|
|
|
+ ds->phys_mii_mask = 0;
|
|
|
|
|
|
rev = reg_readl(priv, REG_SWITCH_REVISION);
|
|
|
priv->hw_params.top_rev = (rev >> SWITCH_TOP_REV_SHIFT) &
|