net: phy: adin: add support for the ADIN1200 phy
Subsystems (3)
PATCH 1/1 net: phy: adin: add support for the ADIN1200 phy
The ADIN1200 chip is register compatible with the ADIN1300, but only supports 10/100 Mbit.
Signed-off-by Rasmus Villemoes <[email protected]>
--- drivers/net/phy/adin.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/net/phy/adin.c +13 -0
@@ -10,6 +10,7 @@#include <linux/bitops.h> #include <linux/bitfield.h> +#define PHY_ID_ADIN1200 0x0283bc20#define PHY_ID_ADIN1300 0x0283bc30#define ADIN1300_EXT_REG_PTR 0x10#define ADIN1300_EXT_REG_DATA 0x11
@@ -263,6 +264,18 @@ static int adin1300_config(struct phy_device *phydev)return genphy_config (phydev); } +U_BOOT_PHY_DRIVER (ADIN1200 ) = { + .name ="ADIN1200" , + .uid =PHY_ID_ADIN1200 , + .mask =0xffffffff , + .features =PHY_BASIC_FEATURES , + .config = adin1300_config, + .startup = genphy_startup, + .shutdown = genphy_shutdown, + .readext = adin_extread, + .writeext = adin_extwrite, +}; +U_BOOT_PHY_DRIVER (ADIN1300 ) = { .name ="ADIN1300" , .uid =PHY_ID_ADIN1300 ,
Signature · 1 line
2.53.0
Quoted 29 lines · Rasmus Villemoes
The ADIN1200 chip is register compatible with the ADIN1300, but only supports 10/100 Mbit.
Signed-off-by Rasmus Villemoes <[email protected]>--- drivers/net/phy/adin.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/net/phy/adin.c +6
-0@@ -10,6 +10,7 @@#include <linux/bitops.h> #include <linux/bitfield.h> +#define PHY_ID_ADIN1200 0x0283bc20#define PHY_ID_ADIN1300 0x0283bc30#define ADIN1300_EXT_REG_PTR 0x10#define ADIN1300_EXT_REG_DATA 0x11@@ -263,6 +264,18 @@ static int adin1300_config(struct phy_device *phydev)return genphy_config (phydev); } +U_BOOT_PHY_DRIVER (ADIN1200 ) = { + .name ="ADIN1200" , + .uid =PHY_ID_ADIN1200 , + .mask =0xffffffff , + .features =PHY_BASIC_FEATURES ,
drivers/net/phy/adin.c static int adin1300_config(struct phy_device *phydev) · line 281
Quoted 10 lines
drivers/net/phy/adin.c +7
-0+ .config = adin1300_config, + .startup = genphy_startup, + .shutdown = genphy_shutdown, + .readext = adin_extread, + .writeext = adin_extwrite, +}; +U_BOOT_PHY_DRIVER (ADIN1300 ) = { .name ="ADIN1300" , .uid =PHY_ID_ADIN1300 ,
Added to the net queue, thanks!
Signature · 1 line
Jerome