From patchwork Sat Jan 25 12:22:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 240097 List-Id: U-Boot discussion From: amittomer25 at gmail.com (Amit Singh Tomar) Date: Sat, 25 Jan 2020 17:52:55 +0530 Subject: [PATCH v3 13/21] net: phy: realtek: Add support for RTL8201F PHY module. In-Reply-To: <1579954983-11329-1-git-send-email-amittomer25@gmail.com> References: <1579954983-11329-1-git-send-email-amittomer25@gmail.com> Message-ID: <1579954983-11329-14-git-send-email-amittomer25@gmail.com> This patch adds support for Realtek PHY RTL8201F 10/100Mbs(with variants: RTL8201FN and RTL8201FL) PHYceiver. It can be found on Actions Semi Cubieboard7 board. Signed-off-by: Amit Singh Tomar --- Changes since v2: * Newly added patch, not there in v2/v1. --- drivers/net/phy/realtek.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 8f1d759..b9c373b 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -157,6 +157,14 @@ static int rtl8211x_config(struct phy_device *phydev) return 0; } +/* RealTek RTL8201F */ +static int rtl8201f_config(struct phy_device *phydev) +{ + genphy_config_aneg(phydev); + + return 0; +} + static int rtl8211f_config(struct phy_device *phydev) { u16 reg; @@ -386,12 +394,24 @@ static struct phy_driver RTL8211F_driver = { .writeext = &rtl8211f_phy_extwrite, }; +/* Support for RTL8201F PHY */ +static struct phy_driver RTL8201F_driver = { + .name = "RealTek RTL8201F 10/100Mbps Ethernet", + .uid = 0x1cc816, + .mask = 0xffffff, + .features = PHY_BASIC_FEATURES, + .config = &rtl8201f_config, + .startup = &rtl8211e_startup, + .shutdown = &genphy_shutdown, +}; + int phy_realtek_init(void) { phy_register(&RTL8211B_driver); phy_register(&RTL8211E_driver); phy_register(&RTL8211F_driver); phy_register(&RTL8211DN_driver); + phy_register(&RTL8201F_driver); return 0; }