|
29 | 29 | #define PHY_ID_AQR113 0x31c31c40
|
30 | 30 | #define PHY_ID_AQR113C 0x31c31c12
|
31 | 31 | #define PHY_ID_AQR114C 0x31c31c22
|
| 32 | +#define PHY_ID_AQR115C 0x31c31c33 |
32 | 33 | #define PHY_ID_AQR813 0x31c31cb2
|
33 | 34 |
|
34 | 35 | #define MDIO_PHYXS_VEND_IF_STATUS 0xe812
|
@@ -441,7 +442,7 @@ static int aqr107_set_tunable(struct phy_device *phydev,
|
441 | 442 | * The chip also provides a "reset completed" bit, but it's cleared after
|
442 | 443 | * read. Therefore function would time out if called again.
|
443 | 444 | */
|
444 |
| -static int aqr107_wait_reset_complete(struct phy_device *phydev) |
| 445 | +int aqr_wait_reset_complete(struct phy_device *phydev) |
445 | 446 | {
|
446 | 447 | int val;
|
447 | 448 |
|
@@ -494,7 +495,7 @@ static int aqr107_config_init(struct phy_device *phydev)
|
494 | 495 | WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII,
|
495 | 496 | "Your devicetree is out of date, please update it. The AQR107 family doesn't support XGMII, maybe you mean USXGMII.\n");
|
496 | 497 |
|
497 |
| - ret = aqr107_wait_reset_complete(phydev); |
| 498 | + ret = aqr_wait_reset_complete(phydev); |
498 | 499 | if (!ret)
|
499 | 500 | aqr107_chip_info(phydev);
|
500 | 501 |
|
@@ -522,7 +523,7 @@ static int aqcs109_config_init(struct phy_device *phydev)
|
522 | 523 | phydev->interface != PHY_INTERFACE_MODE_2500BASEX)
|
523 | 524 | return -ENODEV;
|
524 | 525 |
|
525 |
| - ret = aqr107_wait_reset_complete(phydev); |
| 526 | + ret = aqr_wait_reset_complete(phydev); |
526 | 527 | if (!ret)
|
527 | 528 | aqr107_chip_info(phydev);
|
528 | 529 |
|
@@ -652,7 +653,13 @@ static int aqr107_fill_interface_modes(struct phy_device *phydev)
|
652 | 653 | unsigned long *possible = phydev->possible_interfaces;
|
653 | 654 | unsigned int serdes_mode, rate_adapt;
|
654 | 655 | phy_interface_t interface;
|
655 |
| - int i, val; |
| 656 | + int i, val, ret; |
| 657 | + |
| 658 | + ret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1, |
| 659 | + VEND1_GLOBAL_CFG_10M, val, val != 0, |
| 660 | + 1000, 100000, false); |
| 661 | + if (ret) |
| 662 | + return ret; |
656 | 663 |
|
657 | 664 | /* Walk the media-speed configuration registers to determine which
|
658 | 665 | * host-side serdes modes may be used by the PHY depending on the
|
@@ -999,6 +1006,30 @@ static struct phy_driver aqr_driver[] = {
|
999 | 1006 | .led_hw_control_get = aqr_phy_led_hw_control_get,
|
1000 | 1007 | .led_polarity_set = aqr_phy_led_polarity_set,
|
1001 | 1008 | },
|
| 1009 | +{ |
| 1010 | + PHY_ID_MATCH_MODEL(PHY_ID_AQR115C), |
| 1011 | + .name = "Aquantia AQR115C", |
| 1012 | + .probe = aqr107_probe, |
| 1013 | + .get_rate_matching = aqr107_get_rate_matching, |
| 1014 | + .config_init = aqr113c_config_init, |
| 1015 | + .config_aneg = aqr_config_aneg, |
| 1016 | + .config_intr = aqr_config_intr, |
| 1017 | + .handle_interrupt = aqr_handle_interrupt, |
| 1018 | + .read_status = aqr107_read_status, |
| 1019 | + .get_tunable = aqr107_get_tunable, |
| 1020 | + .set_tunable = aqr107_set_tunable, |
| 1021 | + .suspend = aqr107_suspend, |
| 1022 | + .resume = aqr107_resume, |
| 1023 | + .get_sset_count = aqr107_get_sset_count, |
| 1024 | + .get_strings = aqr107_get_strings, |
| 1025 | + .get_stats = aqr107_get_stats, |
| 1026 | + .link_change_notify = aqr107_link_change_notify, |
| 1027 | + .led_brightness_set = aqr_phy_led_brightness_set, |
| 1028 | + .led_hw_is_supported = aqr_phy_led_hw_is_supported, |
| 1029 | + .led_hw_control_set = aqr_phy_led_hw_control_set, |
| 1030 | + .led_hw_control_get = aqr_phy_led_hw_control_get, |
| 1031 | + .led_polarity_set = aqr_phy_led_polarity_set, |
| 1032 | +}, |
1002 | 1033 | {
|
1003 | 1034 | PHY_ID_MATCH_MODEL(PHY_ID_AQR813),
|
1004 | 1035 | .name = "Aquantia AQR813",
|
@@ -1042,6 +1073,7 @@ static struct mdio_device_id __maybe_unused aqr_tbl[] = {
|
1042 | 1073 | { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
|
1043 | 1074 | { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
|
1044 | 1075 | { PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
|
| 1076 | + { PHY_ID_MATCH_MODEL(PHY_ID_AQR115C) }, |
1045 | 1077 | { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
|
1046 | 1078 | { }
|
1047 | 1079 | };
|
|
0 commit comments