]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: phy: at803x: add ar9331 support
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 3 Oct 2019 08:21:12 +0000 (10:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Oct 2019 19:27:06 +0000 (12:27 -0700)
Mostly this hardware can work with generic PHY driver, but this change
is needed to provided interrupt handling support.
Tested with dsa ar9331-switch driver.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c

index 2aa7b2e600464fb89383d508940d08f0c2935c2a..7d778b8deb9460e86d19106d9c209dea6e7688e7 100644 (file)
@@ -53,6 +53,7 @@
 #define AT803X_DEBUG_REG_5                     0x05
 #define AT803X_DEBUG_TX_CLK_DLY_EN             BIT(8)
 
+#define ATH9331_PHY_ID 0x004dd041
 #define ATH8030_PHY_ID 0x004dd076
 #define ATH8031_PHY_ID 0x004dd074
 #define ATH8035_PHY_ID 0x004dd072
@@ -402,6 +403,16 @@ static struct phy_driver at803x_driver[] = {
        .aneg_done              = at803x_aneg_done,
        .ack_interrupt          = &at803x_ack_interrupt,
        .config_intr            = &at803x_config_intr,
+}, {
+       /* ATHEROS AR9331 */
+       PHY_ID_MATCH_EXACT(ATH9331_PHY_ID),
+       .name                   = "Atheros AR9331 built-in PHY",
+       .config_init            = at803x_config_init,
+       .suspend                = at803x_suspend,
+       .resume                 = at803x_resume,
+       /* PHY_BASIC_FEATURES */
+       .ack_interrupt          = &at803x_ack_interrupt,
+       .config_intr            = &at803x_config_intr,
 } };
 
 module_phy_driver(at803x_driver);
@@ -410,6 +421,7 @@ static struct mdio_device_id __maybe_unused atheros_tbl[] = {
        { ATH8030_PHY_ID, AT803X_PHY_ID_MASK },
        { ATH8031_PHY_ID, AT803X_PHY_ID_MASK },
        { ATH8035_PHY_ID, AT803X_PHY_ID_MASK },
+       { PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },
        { }
 };