|
16 | 16 | #include <dt-bindings/net/ti-dp83869.h>
|
17 | 17 |
|
18 | 18 | #define DP83869_PHY_ID 0x2000a0f1
|
| 19 | +#define DP83561_PHY_ID 0x2000a1a4 |
19 | 20 | #define DP83869_DEVADDR 0x1f
|
20 | 21 |
|
21 | 22 | #define MII_DP83869_PHYCTRL 0x10
|
@@ -878,34 +879,35 @@ static int dp83869_phy_reset(struct phy_device *phydev)
|
878 | 879 | return dp83869_config_init(phydev);
|
879 | 880 | }
|
880 | 881 |
|
881 |
| -static struct phy_driver dp83869_driver[] = { |
882 |
| - { |
883 |
| - PHY_ID_MATCH_MODEL(DP83869_PHY_ID), |
884 |
| - .name = "TI DP83869", |
885 |
| - |
886 |
| - .probe = dp83869_probe, |
887 |
| - .config_init = dp83869_config_init, |
888 |
| - .soft_reset = dp83869_phy_reset, |
889 |
| - |
890 |
| - /* IRQ related */ |
891 |
| - .config_intr = dp83869_config_intr, |
892 |
| - .handle_interrupt = dp83869_handle_interrupt, |
893 |
| - .read_status = dp83869_read_status, |
894 | 882 |
|
895 |
| - .get_tunable = dp83869_get_tunable, |
896 |
| - .set_tunable = dp83869_set_tunable, |
| 883 | +#define DP83869_PHY_DRIVER(_id, _name) \ |
| 884 | +{ \ |
| 885 | + PHY_ID_MATCH_MODEL(_id), \ |
| 886 | + .name = (_name), \ |
| 887 | + .probe = dp83869_probe, \ |
| 888 | + .config_init = dp83869_config_init, \ |
| 889 | + .soft_reset = dp83869_phy_reset, \ |
| 890 | + .config_intr = dp83869_config_intr, \ |
| 891 | + .handle_interrupt = dp83869_handle_interrupt, \ |
| 892 | + .read_status = dp83869_read_status, \ |
| 893 | + .get_tunable = dp83869_get_tunable, \ |
| 894 | + .set_tunable = dp83869_set_tunable, \ |
| 895 | + .get_wol = dp83869_get_wol, \ |
| 896 | + .set_wol = dp83869_set_wol, \ |
| 897 | + .suspend = genphy_suspend, \ |
| 898 | + .resume = genphy_resume, \ |
| 899 | +} |
897 | 900 |
|
898 |
| - .get_wol = dp83869_get_wol, |
899 |
| - .set_wol = dp83869_set_wol, |
| 901 | +static struct phy_driver dp83869_driver[] = { |
| 902 | + DP83869_PHY_DRIVER(DP83869_PHY_ID, "TI DP83869"), |
| 903 | + DP83869_PHY_DRIVER(DP83561_PHY_ID, "TI DP83561-SP"), |
900 | 904 |
|
901 |
| - .suspend = genphy_suspend, |
902 |
| - .resume = genphy_resume, |
903 |
| - }, |
904 | 905 | };
|
905 | 906 | module_phy_driver(dp83869_driver);
|
906 | 907 |
|
907 | 908 | static struct mdio_device_id __maybe_unused dp83869_tbl[] = {
|
908 | 909 | { PHY_ID_MATCH_MODEL(DP83869_PHY_ID) },
|
| 910 | + { PHY_ID_MATCH_MODEL(DP83561_PHY_ID) }, |
909 | 911 | { }
|
910 | 912 | };
|
911 | 913 | MODULE_DEVICE_TABLE(mdio, dp83869_tbl);
|
|
0 commit comments