Lines Matching +full:fiber +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0+
188 /* RGMII to 1000BASE-X */
190 /* RGMII to 100BASE-FX */
390 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in marvell_config_intr()
454 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in marvell_config_aneg()
469 if (phydev->autoneg != AUTONEG_ENABLE || changed) { in marvell_config_aneg()
519 * marvell,reg-init property stored in the of_node for the phydev.
521 * marvell,reg-init = <reg-page reg mask value>,...;
523 * There may be one or more sets of <reg-page reg mask value>:
525 * reg-page: which register bank to use.
527 * mask: if non-zero, ANDed with existing register value.
536 if (!phydev->mdio.dev.of_node) in marvell_of_reg_init()
539 paddr = of_get_property(phydev->mdio.dev.of_node, in marvell_of_reg_init()
540 "marvell,reg-init", &len); in marvell_of_reg_init()
550 for (i = 0; i < len - 3; i += 4) { in marvell_of_reg_init()
593 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) in m88e1121_config_aneg_rgmii_delays()
596 else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) in m88e1121_config_aneg_rgmii_delays()
598 else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) in m88e1121_config_aneg_rgmii_delays()
621 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in m88e1121_config_aneg()
631 if (phydev->autoneg != AUTONEG_ENABLE || changed) { in m88e1121_config_aneg()
662 * register for fiber link.
683 * marvell_config_aneg_fiber - restart auto-negotiation or write BMCR
686 * Description: If auto-negotiation is enabled, we configure the
687 * advertising, and then restart auto-negotiation. If it is not
688 * enabled, then we write the BMCR. Adapted for fiber link in
697 if (phydev->autoneg != AUTONEG_ENABLE) in marvell_config_aneg_fiber()
701 linkmode_and(phydev->advertising, phydev->advertising, in marvell_config_aneg_fiber()
702 phydev->supported); in marvell_config_aneg_fiber()
704 adv = linkmode_adv_to_fiber_adv_t(phydev->advertising); in marvell_config_aneg_fiber()
706 /* Setup fiber advertisement */ in marvell_config_aneg_fiber()
730 if (phydev->interface != PHY_INTERFACE_MODE_SGMII && in m88e1111_config_aneg()
744 /* Then the fiber link */ in m88e1111_config_aneg()
749 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) in m88e1111_config_aneg()
750 /* Do not touch the fiber advertisement if we're in copper->sgmii mode. in m88e1111_config_aneg()
751 * Just ensure that SGMII-side autonegotiation is enabled. in m88e1111_config_aneg()
752 * If we switched from some other mode to SGMII it may not be. in m88e1111_config_aneg()
780 /* Do not touch the fiber page if we're in copper->sgmii mode */ in m88e1510_config_aneg()
781 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) in m88e1510_config_aneg()
784 /* Then the fiber link */ in m88e1510_config_aneg()
805 switch (MARVELL_PHY_FAMILY_ID(phydev->phy_id)) { in marvell_config_led()
817 if (phydev->dev_flags & MARVELL_PHY_LED0_LINK_LED1_ACTIVE) in marvell_config_led()
837 /* Set registers from marvell,reg-init DT property */ in marvell_config_init()
845 /* Enable Scrambler and Auto-Crossover */ in m88e3016_config_init()
856 u16 mode, in m88e1111_config_init_hwcfg_mode() argument
860 mode |= MII_M1111_HWCFG_FIBER_COPPER_AUTO; in m88e1111_config_init_hwcfg_mode()
866 mode); in m88e1111_config_init_hwcfg_mode()
873 switch (phydev->interface) { in m88e1111_config_init_rgmii_delays()
960 int err, mode; in m88e1111_config_init_1000basex() local
965 /* If using copper mode, ensure 1000BaseX auto-negotiation is enabled. in m88e1111_config_init_1000basex()
966 * FIXME: this does not actually enable 1000BaseX auto-negotiation if in m88e1111_config_init_1000basex()
967 * it was previously disabled in the Fiber BMCR! in m88e1111_config_init_1000basex()
969 mode = extsr & MII_M1111_HWCFG_MODE_MASK; in m88e1111_config_init_1000basex()
970 if (mode == MII_M1111_HWCFG_MODE_COPPER_1000X_NOAN) { in m88e1111_config_init_1000basex()
992 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { in m88e1111_config_init()
998 if (phydev->interface == PHY_INTERFACE_MODE_RTBI) { in m88e1111_config_init()
1004 if (phydev->interface == PHY_INTERFACE_MODE_1000BASEX) { in m88e1111_config_init()
1018 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { in m88e1111_config_init()
1019 /* If the HWCFG_MODE was changed from another mode (such as in m88e1111_config_init()
1025 linkmode_or(phydev->advertising, phydev->advertising, in m88e1111_config_init()
1026 phydev->supported); in m88e1111_config_init()
1052 return -E2BIG; in m88e1111_set_downshift()
1059 val |= FIELD_PREP(MII_M1111_PHY_EXT_CR_DOWNSHIFT_MASK, cnt - 1); in m88e1111_set_downshift()
1076 switch (tuna->id) { in m88e1111_get_tunable()
1080 return -EOPNOTSUPP; in m88e1111_get_tunable()
1087 switch (tuna->id) { in m88e1111_set_tunable()
1091 return -EOPNOTSUPP; in m88e1111_set_tunable()
1116 return -E2BIG; in m88e1011_set_downshift()
1123 val |= FIELD_PREP(MII_M1011_PHY_SCR_DOWNSHIFT_MASK, cnt - 1); in m88e1011_set_downshift()
1140 switch (tuna->id) { in m88e1011_get_tunable()
1144 return -EOPNOTSUPP; in m88e1011_get_tunable()
1151 switch (tuna->id) { in m88e1011_set_tunable()
1155 return -EOPNOTSUPP; in m88e1011_set_tunable()
1205 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in m88e1116r_config_init()
1255 /* As per Marvell Release Notes - Alaska 88E1510/88E1518/88E1512/ in m88e1510_config_init()
1283 /* SGMII-to-Copper mode initialization */ in m88e1510_config_init()
1284 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { in m88e1510_config_init()
1290 /* In reg 20, write MODE[2:0] = 0x1 (SGMII to Copper) */ in m88e1510_config_init()
1297 /* PHY reset is necessary after changing MODE[2:0] */ in m88e1510_config_init()
1319 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in m88e1118_config_aneg()
1348 if (phydev->dev_flags & MARVELL_PHY_M1118_DNS323_LEDS) in m88e1118_config_init()
1403 if (phydev->dev_flags & MARVELL_PHY_M1145_FLAGS_RESISTANCE) { in m88e1145_config_init_rgmii()
1451 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { in m88e1145_config_init()
1457 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { in m88e1145_config_init()
1502 return -EINVAL; in m88e1540_get_fld()
1523 return -EBUSY; in m88e1540_set_fld()
1549 switch (tuna->id) { in m88e1540_get_tunable()
1555 return -EOPNOTSUPP; in m88e1540_get_tunable()
1562 switch (tuna->id) { in m88e1540_set_tunable()
1568 return -EOPNOTSUPP; in m88e1540_set_tunable()
1608 * @lpa: value of the MII_LPA register for fiber link
1624 int fiber, int status) in marvell_read_status_page_an() argument
1630 phydev->link = 0; in marvell_read_status_page_an()
1635 phydev->duplex = DUPLEX_FULL; in marvell_read_status_page_an()
1637 phydev->duplex = DUPLEX_HALF; in marvell_read_status_page_an()
1641 phydev->speed = SPEED_1000; in marvell_read_status_page_an()
1645 phydev->speed = SPEED_100; in marvell_read_status_page_an()
1649 phydev->speed = SPEED_10; in marvell_read_status_page_an()
1653 if (!fiber) { in marvell_read_status_page_an()
1664 /* The fiber link is only 1000M capable */ in marvell_read_status_page_an()
1665 fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); in marvell_read_status_page_an()
1667 if (phydev->duplex == DUPLEX_FULL) { in marvell_read_status_page_an()
1669 phydev->pause = 0; in marvell_read_status_page_an()
1670 phydev->asym_pause = 0; in marvell_read_status_page_an()
1672 phydev->pause = 1; in marvell_read_status_page_an()
1673 phydev->asym_pause = 1; in marvell_read_status_page_an()
1675 phydev->pause = 1; in marvell_read_status_page_an()
1676 phydev->asym_pause = 0; in marvell_read_status_page_an()
1695 int fiber; in marvell_read_status_page() local
1703 * and the PHY status register for fiber link status. in marvell_read_status_page()
1706 phydev->link = !!(status & MII_M1011_PHY_STATUS_LINK); in marvell_read_status_page()
1714 fiber = 1; in marvell_read_status_page()
1716 fiber = 0; in marvell_read_status_page()
1718 linkmode_zero(phydev->lp_advertising); in marvell_read_status_page()
1719 phydev->pause = 0; in marvell_read_status_page()
1720 phydev->asym_pause = 0; in marvell_read_status_page()
1721 phydev->speed = SPEED_UNKNOWN; in marvell_read_status_page()
1722 phydev->duplex = DUPLEX_UNKNOWN; in marvell_read_status_page()
1723 phydev->port = fiber ? PORT_FIBRE : PORT_TP; in marvell_read_status_page()
1725 if (phydev->autoneg == AUTONEG_ENABLE) in marvell_read_status_page()
1726 err = marvell_read_status_page_an(phydev, fiber, status); in marvell_read_status_page()
1735 * Some Marvell's phys have two modes: fiber and copper.
1738 * First, check the fiber link and status.
1739 * If the fiber link is down, check the copper link and status which
1746 /* Check the fiber mode first */ in marvell_read_status()
1748 phydev->supported) && in marvell_read_status()
1749 phydev->interface != PHY_INTERFACE_MODE_SGMII) { in marvell_read_status()
1758 /* If the fiber link is up, it is the selected and in marvell_read_status()
1760 * fiber page. Please to be careful about that, avoid in marvell_read_status()
1762 * could break the behaviour for some fiber phy like in marvell_read_status()
1765 if (phydev->link) in marvell_read_status()
1768 /* If fiber link is down, check and save copper mode state */ in marvell_read_status()
1783 * Some Marvell's phys have two modes: fiber and copper.
1790 /* Suspend the fiber mode first */ in marvell_suspend()
1792 phydev->supported)) { in marvell_suspend()
1818 * Some Marvell's phys have two modes: fiber and copper.
1825 /* Resume the fiber mode first */ in marvell_resume()
1827 phydev->supported)) { in marvell_resume()
1863 wol->supported = WAKE_MAGIC | WAKE_PHY; in m88e1318_get_wol()
1864 wol->wolopts = 0; in m88e1318_get_wol()
1872 wol->wolopts |= WAKE_MAGIC; in m88e1318_get_wol()
1875 wol->wolopts |= WAKE_PHY; in m88e1318_get_wol()
1887 if (wol->wolopts & (WAKE_MAGIC | WAKE_PHY)) { in m88e1318_set_wol()
1921 if (wol->wolopts & WAKE_MAGIC) { in m88e1318_set_wol()
1928 ((phydev->attached_dev->dev_addr[5] << 8) | in m88e1318_set_wol()
1929 phydev->attached_dev->dev_addr[4])); in m88e1318_set_wol()
1933 ((phydev->attached_dev->dev_addr[3] << 8) | in m88e1318_set_wol()
1934 phydev->attached_dev->dev_addr[2])); in m88e1318_set_wol()
1938 ((phydev->attached_dev->dev_addr[1] << 8) | in m88e1318_set_wol()
1939 phydev->attached_dev->dev_addr[0])); in m88e1318_set_wol()
1962 if (wol->wolopts & WAKE_PHY) { in m88e1318_set_wol()
1993 phydev->supported)) in marvell_get_sset_count()
1996 return ARRAY_SIZE(marvell_hw_stats) - NB_FIBER_STATS; in marvell_get_sset_count()
2029 struct marvell_priv *priv = phydev->priv; in marvell_get_stat()
2037 val = val & ((1 << stat.bits) - 1); in marvell_get_stat()
2038 priv->stats[i] += val; in marvell_get_stat()
2039 ret = priv->stats[i]; in marvell_get_stat()
2048 struct marvell_priv *priv = phydev->priv; in marvell_get_stat_simple()
2056 val = val & ((1 << stat.bits) - 1); in marvell_get_stat_simple()
2057 priv->stats[i] += val; in marvell_get_stat_simple()
2058 ret = priv->stats[i]; in marvell_get_stat_simple()
2091 bmcr_ctl = mii_bmcr_encode_fixed(phydev->speed, phydev->duplex); in m88e1510_loopback()
2097 if (phydev->speed == SPEED_1000) in m88e1510_loopback()
2099 else if (phydev->speed == SPEED_100) in m88e1510_loopback()
2118 * into/out-of loopback mode. in m88e1510_loopback()
2147 return -ETIMEDOUT; in marvell_vct5_wait_complete()
2166 amplitude = -amplitude; in marvell_vct5_amplitude()
2220 struct marvell_priv *priv = phydev->priv; in marvell_vct5_amplitude_graph()
2227 if (priv->first <= TDR_SHORT_CABLE_LENGTH) in marvell_vct5_amplitude_graph()
2251 for (distance = priv->first; in marvell_vct5_amplitude_graph()
2252 distance <= priv->last; in marvell_vct5_amplitude_graph()
2253 distance += priv->step) { in marvell_vct5_amplitude_graph()
2255 priv->pair); in marvell_vct5_amplitude_graph()
2279 /* If auto-negotiation is enabled, but not complete, the cable in marvell_cable_test_start_common()
2280 * test never completes. So disable auto-neg. in marvell_cable_test_start_common()
2309 struct marvell_priv *priv = phydev->priv; in marvell_vct7_cable_test_start()
2316 priv->cable_test_tdr = false; in marvell_vct7_cable_test_start()
2344 struct marvell_priv *priv = phydev->priv; in marvell_vct5_cable_test_tdr_start()
2347 priv->cable_test_tdr = true; in marvell_vct5_cable_test_tdr_start()
2348 priv->first = marvell_vct5_cm2distance(cfg->first); in marvell_vct5_cable_test_tdr_start()
2349 priv->last = marvell_vct5_cm2distance(cfg->last); in marvell_vct5_cable_test_tdr_start()
2350 priv->step = marvell_vct5_cm2distance(cfg->step); in marvell_vct5_cable_test_tdr_start()
2351 priv->pair = cfg->pair; in marvell_vct5_cable_test_tdr_start()
2353 if (priv->first > MII_VCT5_SAMPLE_POINT_DISTANCE_MAX) in marvell_vct5_cable_test_tdr_start()
2354 return -EINVAL; in marvell_vct5_cable_test_tdr_start()
2356 if (priv->last > MII_VCT5_SAMPLE_POINT_DISTANCE_MAX) in marvell_vct5_cable_test_tdr_start()
2357 return -EINVAL; in marvell_vct5_cable_test_tdr_start()
2374 marvell_vct5_distance2cm(priv->first), in marvell_vct5_cable_test_tdr_start()
2375 marvell_vct5_distance2cm(priv->last), in marvell_vct5_cable_test_tdr_start()
2376 marvell_vct5_distance2cm(priv->step)); in marvell_vct5_cable_test_tdr_start()
2482 struct marvell_priv *priv = phydev->priv; in marvell_vct7_cable_test_get_status()
2485 if (priv->cable_test_tdr) { in marvell_vct7_cable_test_get_status()
2510 struct marvell_priv *priv = phydev->priv; in m88e3082_vct_cable_test_start()
2523 if (priv->vct_phase == M88E3082_VCT_PHASE1) { in m88e3082_vct_cable_test_start()
2550 if (priv->vct_phase == M88E3082_VCT_OFF) { in m88e3082_vct_cable_test_start()
2551 priv->vct_phase = M88E3082_VCT_PHASE1; in m88e3082_vct_cable_test_start()
2552 priv->pair = 0; in m88e3082_vct_cable_test_start()
2565 priv->vct_phase = M88E3082_VCT_PHASE2; in m88e3082_vct_cable_test_start()
2591 /* Original function for meters: y = 0.7861x - 18.862 */ in m88e3082_vct_distrfln_2_cm()
2592 return (7861 * distrfln - 188620) / 100; in m88e3082_vct_distrfln_2_cm()
2599 struct marvell_priv *priv = phydev->priv; in m88e3082_vct_cable_test_get_status()
2625 switch (priv->vct_phase) { in m88e3082_vct_cable_test_get_status()
2639 priv->pair |= M88E3082_PAIR_A; in m88e3082_vct_cable_test_get_status()
2649 priv->pair |= M88E3082_PAIR_B; in m88e3082_vct_cable_test_get_status()
2659 if (priv->pair & M88E3082_PAIR_A && in m88e3082_vct_cable_test_get_status()
2667 if (priv->pair & M88E3082_PAIR_B && in m88e3082_vct_cable_test_get_status()
2678 return -EINVAL; in m88e3082_vct_cable_test_get_status()
2686 priv->vct_phase = M88E3082_VCT_OFF; in m88e3082_vct_cable_test_get_status()
2737 /* Original function for meters: y = 0.8018x - 28.751 */ in m88e1111_vct_distrfln_2_cm()
2738 return (8018 * distrfln - 287510) / 100; in m88e1111_vct_distrfln_2_cm()
2749 /* Each pair use one page: A-0, B-1, C-2, D-3 */ in m88e1111_vct_cable_test_get_status()
2788 return phydev->drv->driver_data; in to_marvell_hwmon_ops()
2828 *temp = ((val & MII_88E1121_MISC_TEST_TEMP_MASK) - 5) * 5000; in m88e1121_get_temp()
2845 *temp = ((ret & MII_88E1510_TEMP_SENSOR_MASK) - 25) * 1000; in m88e1510_get_temp()
2862 MII_88E1510_MISC_TEST_TEMP_THRESHOLD_SHIFT) * 5) - 25; in m88e1510_get_temp_critical()
2935 *temp = (sum - 75) * 1000; in m88e6390_get_temp()
2962 *temp -= 50000; in m88e6393_get_temp()
2979 MII_88E6393_TEMP_SENSOR_THRESHOLD_SHIFT) - 75) * 1000; in m88e6393_get_temp_critical()
3017 int err = -EOPNOTSUPP; in marvell_hwmon_read()
3021 if (ops->get_temp) in marvell_hwmon_read()
3022 err = ops->get_temp(phydev, temp); in marvell_hwmon_read()
3025 if (ops->get_temp_critical) in marvell_hwmon_read()
3026 err = ops->get_temp_critical(phydev, temp); in marvell_hwmon_read()
3029 if (ops->get_temp_alarm) in marvell_hwmon_read()
3030 err = ops->get_temp_alarm(phydev, temp); in marvell_hwmon_read()
3042 int err = -EOPNOTSUPP; in marvell_hwmon_write()
3046 if (ops->set_temp_critical) in marvell_hwmon_write()
3047 err = ops->set_temp_critical(phydev, temp); in marvell_hwmon_write()
3066 return ops->get_temp ? 0444 : 0; in marvell_hwmon_is_visible()
3068 return ops->get_temp_alarm ? 0444 : 0; in marvell_hwmon_is_visible()
3070 return (ops->get_temp_critical ? 0444 : 0) | in marvell_hwmon_is_visible()
3071 (ops->set_temp_critical ? 0200 : 0); in marvell_hwmon_is_visible()
3120 struct marvell_priv *priv = phydev->priv; in marvell_hwmon_name()
3121 struct device *dev = &phydev->mdio.dev; in marvell_hwmon_name()
3126 priv->hwmon_name = devm_kzalloc(dev, len, GFP_KERNEL); in marvell_hwmon_name()
3127 if (!priv->hwmon_name) in marvell_hwmon_name()
3128 return -ENOMEM; in marvell_hwmon_name()
3132 priv->hwmon_name[j++] = devname[i]; in marvell_hwmon_name()
3141 struct marvell_priv *priv = phydev->priv; in marvell_hwmon_probe()
3142 struct device *dev = &phydev->mdio.dev; in marvell_hwmon_probe()
3152 priv->hwmon_dev = devm_hwmon_device_register_with_info( in marvell_hwmon_probe()
3153 dev, priv->hwmon_name, phydev, &marvell_hwmon_chip_info, NULL); in marvell_hwmon_probe()
3154 if (IS_ERR(priv->hwmon_dev)) in marvell_hwmon_probe()
3155 return PTR_ERR(priv->hwmon_dev); in marvell_hwmon_probe()
3157 if (ops->config) in marvell_hwmon_probe()
3158 err = ops->config(phydev); in marvell_hwmon_probe()
3219 return -EINVAL; in m88e1318_led_brightness_set()
3248 return -EINVAL; in m88e1318_led_blink_set()
3256 int mode; member
3262 .mode = 0,
3266 .mode = 1,
3272 .mode = 3,
3277 .mode = 4,
3282 .mode = 5,
3286 .mode = 6,
3290 .mode = 7,
3294 .mode = 8,
3301 .mode = 1,
3307 .mode = 2,
3312 .mode = 3,
3317 .mode = 4,
3322 .mode = 6,
3327 .mode = 7,
3331 .mode = 8,
3338 .mode = 0,
3342 .mode = 1,
3348 .mode = 3,
3353 .mode = 4,
3358 .mode = 5,
3362 .mode = 6,
3367 .mode = 7,
3371 .mode = 8,
3379 int *mode) in marvell_find_led_mode() argument
3385 *mode = marvell_rules[i].mode; in marvell_find_led_mode()
3389 return -EOPNOTSUPP; in marvell_find_led_mode()
3392 static int marvell_get_led_mode(u8 index, unsigned long rules, int *mode) in marvell_get_led_mode() argument
3399 ARRAY_SIZE(marvell_led0), mode); in marvell_get_led_mode()
3403 ARRAY_SIZE(marvell_led1), mode); in marvell_get_led_mode()
3407 ARRAY_SIZE(marvell_led2), mode); in marvell_get_led_mode()
3410 ret = -EINVAL; in marvell_get_led_mode()
3419 int mode) in marvell_find_led_rules() argument
3424 if (marvell_rules[i].mode == mode) { in marvell_find_led_rules()
3429 return -EOPNOTSUPP; in marvell_find_led_rules()
3432 static int marvell_get_led_rules(u8 index, unsigned long *rules, int mode) in marvell_get_led_rules() argument
3439 ARRAY_SIZE(marvell_led0), mode); in marvell_get_led_rules()
3443 ARRAY_SIZE(marvell_led1), mode); in marvell_get_led_rules()
3447 ARRAY_SIZE(marvell_led2), mode); in marvell_get_led_rules()
3450 ret = -EOPNOTSUPP; in marvell_get_led_rules()
3459 int mode, ret; in m88e1318_led_hw_is_supported() local
3465 ret = marvell_get_led_mode(index, rules, &mode); in m88e1318_led_hw_is_supported()
3468 ret = -EINVAL; in m88e1318_led_hw_is_supported()
3477 int mode, ret, reg; in m88e1318_led_hw_control_set() local
3483 ret = marvell_get_led_mode(index, rules, &mode); in m88e1318_led_hw_control_set()
3486 ret = -EINVAL; in m88e1318_led_hw_control_set()
3498 reg |= mode << (4 * index); in m88e1318_led_hw_control_set()
3506 int mode, reg; in m88e1318_led_hw_control_get() local
3509 return -EINVAL; in m88e1318_led_hw_control_get()
3516 mode = (reg >> (4 * index)) & 0xf; in m88e1318_led_hw_control_get()
3518 return marvell_get_led_rules(index, rules, mode); in m88e1318_led_hw_control_get()
3525 priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); in marvell_probe()
3527 return -ENOMEM; in marvell_probe()
3529 phydev->priv = priv; in marvell_probe()
3542 u16 mode; in m88e1510_sfp_insert() local
3546 dev = &phydev->mdio.dev; in m88e1510_sfp_insert()
3548 sfp_parse_support(phydev->sfp_bus, id, supported, interfaces); in m88e1510_sfp_insert()
3549 interface = sfp_select_interface(phydev->sfp_bus, supported); in m88e1510_sfp_insert()
3555 mode = MII_88E1510_GEN_CTRL_REG_1_MODE_RGMII_1000X; in m88e1510_sfp_insert()
3559 mode = MII_88E1510_GEN_CTRL_REG_1_MODE_RGMII_100FX; in m88e1510_sfp_insert()
3563 mode = MII_88E1510_GEN_CTRL_REG_1_MODE_RGMII_SGMII; in m88e1510_sfp_insert()
3569 return -EINVAL; in m88e1510_sfp_insert()
3577 MII_88E1510_GEN_CTRL_REG_1_MODE_MASK, mode); in m88e1510_sfp_insert()