mtk_xfi_tphy_setup(9)
β¨ NAME β¨
mtk_xfi_tphy_setup β setup phy for specified interface mode. π
This is the mtk_xfi_tphy_setup(9) page from the Kernel API Manual, and no cap, it's giving "small page, real hardware job." π«Ά
π SYNOPSIS π
void mtk_xfi_tphy_setup (struct mtk_xfi_tphy *xfi_tphy , phy_interface_t
interface );
π§ ARGUMENTS π§
xfi_tphyβ the XFI phy instance. That's the main-character object you're setting up. πinterfaceβ the Ethernet interface mode. It tells the setup which vibe it's dressing for. π
π₯ DESCRIPTION π₯
OK so this setup function is basically the condensed result of combining the 5 functions that set up the phy in MediaTek's GPL licensed public SDK sources. Those originals live in mtk_sgmii.c[1] as well as mtk_usxgmii.c[2]. π
A bunch of the magic values got upgraded to register and bit definitions, but ngl, that couldn't happen in every single case. π Some raw magic is still in the chat.
The vendor driver goes full sequence of 32-bit writes mode; this version lowkey tries to only modify the bits that are actually required. β¨
π«Ά Vibe check: the page literally says "try," so we're not out here promising every write is minimal. It's the goal, bestie, not a blood oath.
The refs, fr fr:
Ref [1]:
https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/b72d6cba92bf9e29fb035c03052fa1e86664a25b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c
Ref [2]:
https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/dec96a1d9b82cdcda4a56453fd0b453d4cab4b85/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
πΈ SEE ALSO πΈ
The friend group is right here π―:
- Kernel file
./drivers/phy/mediatek/phy-mtk-xfi-tphy.cstructmtk_xfi_tphy(9)β home base and the struct itself. mtk_xfi_tphy_set_mode(9)β mode-setting bestie.mtk_xfi_tphy_reset(9)β reset bestie.mtk_xfi_tphy_power_on(9)β power-on bestie.mtk_xfi_tphy_power_off(9)β power-off bestie.mtk_xfi_tphy_probe(9)β probe bestie.
Periodt. π
That's the whole page, bestie. Bye! π
π This one came from ./drivers/phy/mediatek, dated October 2026, and it's the mtk_xfi_tphy_setup(9) page. π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms