Skip to content

Commit fb055ce

Browse files
david-mlekuba-moo
authored andcommitted
net: phy: mscc: add support for VSC8501
The VSC8501 PHY can use the same driver implementation as the VSC8502. Adding the PHY ID and copying the handler functions of VSC8502 is sufficient to operate it. Signed-off-by: David Epping <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 57fb54a commit fb055ce

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

drivers/net/phy/mscc/mscc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ enum rgmii_clock_delay {
276276
/* Microsemi PHY ID's
277277
* Code assumes lowest nibble is 0
278278
*/
279+
#define PHY_ID_VSC8501 0x00070530
279280
#define PHY_ID_VSC8502 0x00070630
280281
#define PHY_ID_VSC8504 0x000704c0
281282
#define PHY_ID_VSC8514 0x00070670

drivers/net/phy/mscc/mscc_main.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,6 +2316,30 @@ static int vsc85xx_probe(struct phy_device *phydev)
23162316

23172317
/* Microsemi VSC85xx PHYs */
23182318
static struct phy_driver vsc85xx_driver[] = {
2319+
{
2320+
.phy_id = PHY_ID_VSC8501,
2321+
.name = "Microsemi GE VSC8501 SyncE",
2322+
.phy_id_mask = 0xfffffff0,
2323+
/* PHY_BASIC_FEATURES */
2324+
.soft_reset = &genphy_soft_reset,
2325+
.config_init = &vsc85xx_config_init,
2326+
.config_aneg = &vsc85xx_config_aneg,
2327+
.read_status = &vsc85xx_read_status,
2328+
.handle_interrupt = vsc85xx_handle_interrupt,
2329+
.config_intr = &vsc85xx_config_intr,
2330+
.suspend = &genphy_suspend,
2331+
.resume = &genphy_resume,
2332+
.probe = &vsc85xx_probe,
2333+
.set_wol = &vsc85xx_wol_set,
2334+
.get_wol = &vsc85xx_wol_get,
2335+
.get_tunable = &vsc85xx_get_tunable,
2336+
.set_tunable = &vsc85xx_set_tunable,
2337+
.read_page = &vsc85xx_phy_read_page,
2338+
.write_page = &vsc85xx_phy_write_page,
2339+
.get_sset_count = &vsc85xx_get_sset_count,
2340+
.get_strings = &vsc85xx_get_strings,
2341+
.get_stats = &vsc85xx_get_stats,
2342+
},
23192343
{
23202344
.phy_id = PHY_ID_VSC8502,
23212345
.name = "Microsemi GE VSC8502 SyncE",
@@ -2656,6 +2680,7 @@ static struct phy_driver vsc85xx_driver[] = {
26562680
module_phy_driver(vsc85xx_driver);
26572681

26582682
static struct mdio_device_id __maybe_unused vsc85xx_tbl[] = {
2683+
{ PHY_ID_VSC8501, 0xfffffff0, },
26592684
{ PHY_ID_VSC8502, 0xfffffff0, },
26602685
{ PHY_ID_VSC8504, 0xfffffff0, },
26612686
{ PHY_ID_VSC8514, 0xfffffff0, },

0 commit comments

Comments
 (0)