Skip to content

Commit

Permalink
net: phy: amd: Support the Altima AMI101L
Browse files Browse the repository at this point in the history
The Altima AC101L is obviously compatible with the AMD PHY,
as seen by reading the datasheet.

Datasheet: https://docs.broadcom.com/doc/AC101L-DS05-405-RDS.pdf

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230924-ac101l-phy-v1-1-5e6349e28aa4@linaro.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
linusw authored and Paolo Abeni committed Oct 3, 2023
1 parent ef35bed commit 3203034
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions drivers/net/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ config SFP
comment "MII PHY device drivers"

config AMD_PHY
tristate "AMD PHYs"
tristate "AMD and Altima PHYs"
help
Currently supports the am79c874
Currently supports the AMD am79c874 and Altima AC101L.

config MESON_GXL_PHY
tristate "Amlogic Meson GXL Internal PHY"
Expand Down
33 changes: 23 additions & 10 deletions drivers/net/phy/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/mii.h>
#include <linux/phy.h>

#define PHY_ID_AC101L 0x00225520
#define PHY_ID_AM79C874 0x0022561b

#define MII_AM79C_IR 17 /* Interrupt Status/Control Register */
Expand Down Expand Up @@ -87,19 +88,31 @@ static irqreturn_t am79c_handle_interrupt(struct phy_device *phydev)
return IRQ_HANDLED;
}

static struct phy_driver am79c_driver[] = { {
.phy_id = PHY_ID_AM79C874,
.name = "AM79C874",
.phy_id_mask = 0xfffffff0,
/* PHY_BASIC_FEATURES */
.config_init = am79c_config_init,
.config_intr = am79c_config_intr,
.handle_interrupt = am79c_handle_interrupt,
} };
static struct phy_driver am79c_drivers[] = {
{
.phy_id = PHY_ID_AM79C874,
.name = "AM79C874",
.phy_id_mask = 0xfffffff0,
/* PHY_BASIC_FEATURES */
.config_init = am79c_config_init,
.config_intr = am79c_config_intr,
.handle_interrupt = am79c_handle_interrupt,
},
{
.phy_id = PHY_ID_AC101L,
.name = "AC101L",
.phy_id_mask = 0xfffffff0,
/* PHY_BASIC_FEATURES */
.config_init = am79c_config_init,
.config_intr = am79c_config_intr,
.handle_interrupt = am79c_handle_interrupt,
},
};

module_phy_driver(am79c_driver);
module_phy_driver(am79c_drivers);

static struct mdio_device_id __maybe_unused amd_tbl[] = {
{ PHY_ID_AC101L, 0xfffffff0 },
{ PHY_ID_AM79C874, 0xfffffff0 },
{ }
};
Expand Down

0 comments on commit 3203034

Please sign in to comment.