Skip to content

Commit 1388d4a

Browse files
h-nagallakuba-moo
authored andcommitted
net: phy: add support for TI DP83561-SP phy
Add support for the TI DP83561-SP Gigabit ethernet phy device. The dp83561-sp is a radiation hardened space grade gigabit ethernet PHY. It has been tested for single event latch upto 121 MeV, the critical reliability parameter for space designs. It interfaces directly to twisted pair media through an external transformer. And the device also interfaces directly to the MAC layer through Reduced GMII (RGMII) and MII. DP83867, DP83869 and DP83561-SP, all these parts support 1000Base-T/ 100Base-TX/ and 10Base-Te standards and have similar register map for the core functionality. The data sheet for this part is at https://www.ti.com/product/DP83561-SP Signed-off-by: Hari Nagalla <[email protected]> Signed-off-by: Geet Modi <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d9f31ae commit 1388d4a

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

drivers/net/phy/dp83869.c

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <dt-bindings/net/ti-dp83869.h>
1717

1818
#define DP83869_PHY_ID 0x2000a0f1
19+
#define DP83561_PHY_ID 0x2000a1a4
1920
#define DP83869_DEVADDR 0x1f
2021

2122
#define MII_DP83869_PHYCTRL 0x10
@@ -878,34 +879,35 @@ static int dp83869_phy_reset(struct phy_device *phydev)
878879
return dp83869_config_init(phydev);
879880
}
880881

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,
894882

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+
}
897900

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"),
900904

901-
.suspend = genphy_suspend,
902-
.resume = genphy_resume,
903-
},
904905
};
905906
module_phy_driver(dp83869_driver);
906907

907908
static struct mdio_device_id __maybe_unused dp83869_tbl[] = {
908909
{ PHY_ID_MATCH_MODEL(DP83869_PHY_ID) },
910+
{ PHY_ID_MATCH_MODEL(DP83561_PHY_ID) },
909911
{ }
910912
};
911913
MODULE_DEVICE_TABLE(mdio, dp83869_tbl);

0 commit comments

Comments
 (0)