Lines Matching defs:phydev
14 static int mtk_gephy_read_page(struct phy_device *phydev)
16 return __phy_read(phydev, MTK_EXT_PAGE_ACCESS);
19 static int mtk_gephy_write_page(struct phy_device *phydev, int page)
21 return __phy_write(phydev, MTK_EXT_PAGE_ACCESS, page);
24 static void mtk_gephy_config_init(struct phy_device *phydev)
27 phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0);
30 phy_modify_paged(phydev, MTK_PHY_PAGE_EXTENDED, 0x14, 0, BIT(4));
33 phy_select_page(phydev, MTK_PHY_PAGE_EXTENDED_52B5);
34 __phy_write(phydev, 0x10, 0xafae);
35 __phy_write(phydev, 0x12, 0x2f);
36 __phy_write(phydev, 0x10, 0x8fae);
37 phy_restore_page(phydev, MTK_PHY_PAGE_STANDARD, 0);
40 phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x123, 0xffff);
43 phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xa6, 0x300);
46 static int mt7530_phy_config_init(struct phy_device *phydev)
48 mtk_gephy_config_init(phydev);
51 phy_write_paged(phydev, MTK_PHY_PAGE_EXTENDED_3, 0x11, 0x4b);
56 static int mt7531_phy_config_init(struct phy_device *phydev)
58 mtk_gephy_config_init(phydev);
61 phy_set_bits(phydev, 0x17, BIT(4));
62 phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, 0xc6, 0x300);
65 phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x13, 0x404);
66 phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x14, 0x404);