Skip to content

Commit

Permalink
Merge branch 'lan8742-phy'
Browse files Browse the repository at this point in the history
Yuiko Oshino says:

====================
net: phy: add LAN8742 phy support

add LAN8742 phy support
update LAN88xx phy ID and phy ID mask so that it can coexist with LAN8742

The current phy IDs on the available hardware.
    LAN8742 0x0007C130, 0x0007C131
    LAN88xx 0x0007C132

v3->v4:
- fixed the one tab missing issue in the smsc.c.

v2->v3:
-added comments about the 0xfffffff2 mask that is for the differentiation and the future revisions.

v1->v2:
-removed "REVIEW REQUEST3" from the PATCH 1/2.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 9, 2022
2 parents 613707e + 53ad228 commit 1728c05
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/phy/microchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ static int lan88xx_config_aneg(struct phy_device *phydev)

static struct phy_driver microchip_phy_driver[] = {
{
.phy_id = 0x0007c130,
.phy_id_mask = 0xfffffff0,
.phy_id = 0x0007c132,
.phy_id_mask = 0xfffffff2,
.name = "Microchip LAN88xx",

/* PHY_GBIT_FEATURES */
Expand All @@ -369,7 +369,7 @@ static struct phy_driver microchip_phy_driver[] = {
module_phy_driver(microchip_phy_driver);

static struct mdio_device_id __maybe_unused microchip_tbl[] = {
{ 0x0007c130, 0xfffffff0 },
{ 0x0007c132, 0xfffffff2 },
{ }
};

Expand Down
27 changes: 27 additions & 0 deletions drivers/net/phy/smsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,32 @@ static struct phy_driver smsc_phy_driver[] = {
.get_strings = smsc_get_strings,
.get_stats = smsc_get_stats,

.suspend = genphy_suspend,
.resume = genphy_resume,
}, {
.phy_id = 0x0007c130, /* 0x0007c130 and 0x0007c131 */
.phy_id_mask = 0xfffffff2,
.name = "Microchip LAN8742",

/* PHY_BASIC_FEATURES */
.flags = PHY_RST_AFTER_CLK_EN,

.probe = smsc_phy_probe,

/* basic functions */
.read_status = lan87xx_read_status,
.config_init = smsc_phy_config_init,
.soft_reset = smsc_phy_reset,

/* IRQ related */
.config_intr = smsc_phy_config_intr,
.handle_interrupt = smsc_phy_handle_interrupt,

/* Statistics */
.get_sset_count = smsc_get_sset_count,
.get_strings = smsc_get_strings,
.get_stats = smsc_get_stats,

.suspend = genphy_suspend,
.resume = genphy_resume,
} };
Expand All @@ -498,6 +524,7 @@ static struct mdio_device_id __maybe_unused smsc_tbl[] = {
{ 0x0007c0d0, 0xfffffff0 },
{ 0x0007c0f0, 0xfffffff0 },
{ 0x0007c110, 0xfffffff0 },
{ 0x0007c130, 0xfffffff2 },
{ }
};

Expand Down

0 comments on commit 1728c05

Please sign in to comment.