int devnum,u16 regnum);int(*write_mmd)(struct phy_device*dev,int devnum,u16 regnum,u16 val);int(*read_page)(struct phy_device*dev);int(*write_page)(struct phy_device*dev,int page)int(*module_info)(struct phy_device*dev,struct
(*read_mmd)(struct phy_device *dev, int devnum, u16 regnum); int (*write_mmd)(struct phy_device *dev, int devnum, u16 regnum, u16 val); int (*read_page)(struct phy_device *dev); int (*write_page)(struct phy_device *dev, int page) int (*module_info)(struct phy_device *...
void(*link_change_notify)(struct phy_device *dev); int(*read_mmd)(struct phy_device *dev,intdevnum, u16 regnum); int(*write_mmd)(struct phy_device *dev,intdevnum, u16 regnum, u16 val); int(*read_page)(struct phy_device *dev); int(*write_page)(struct phy_device *dev,intpage)...
#defineMII_STAT1000 0x0a/* 1000BASE-T status */ #defineMII_MMD_CTRL 0x0d/* MMD Access Control Register */ #defineMII_MMD_DATA 0x0e/* MMD Access Data Register */ #defineMII_ESTATUS 0x0f/* Extended Status */ #defineMII_DCOUNTER 0x12/* Disconnect counter */ #defineMII_FCSCOUNTER 0...
return -ENOMEM; /* Write magic number to safely stall MCU */ phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x800e, 0x1100); phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x800f, 0x00df);ret = request_firmware(&fw, MEDAITEK_2P5GE_PHY_DMB_FW, dev); ...
+ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, RTL8221B_PHYCR1, +RTL8221B_PHYCR1_ALDPS_EN | RTL8221B_PHYCR1_ALDPS_XTAL_OFF_EN); +if (ret < 0) +return ret; + /* Disable SGMII AN */ ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x7588, 0x2); ...
Write MMD register. Parameters [in] interface Underlying network interface [in] devAddr Device address [in] regAddr Register address [in] data MMD register value Definition at line 348 of file rtl8211f_driver.c.◆ rtl8211fWritePhyReg()void...
= oldadv) { //自动协商结果不一致就重新设置 err = phy_write(phydev, MII_ADVERTISE, adv); if (err < 0) return err; changed = 1; } /* Configure gigabit if it's supported */ if (phydev->supported & (SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full)) { oldadv = adv = phy_...
[0]); return -1; } return retval; } static void phy_mmd_write(int argc, char **argv) { struct mii_data *mii = (struct mii_data *)&ifr.ifr_data; int addr, devad, reg, val; if (argc == 7) { addr = strtol(argv[3], NULL, 0); devad = strtol(argv[4], NULL, 0); ...
Writing an MMD reg Example resetting thePHY: root@analog:~# phytool write eth0/0/0x10 0xFF0C root@analog:~# phytool write eth0/0/0x11 0x1 adintool.sh - convenience phytool wrapper This tool requires sudo/root access and will do changes to the system. Use it with caution on a ...