ethernet phy

ethernet phy



以太网扫盲(一)各种网络总线 mii总线,mdio总线介绍
【驱动】以太网扫盲(二)phy寄存器简介



以太网接口总线类型笔记
车载以太网PHY
以太网PHY寄存器分析【转】



rgmii、rgmii-id区别
rgmii、rgmii-id、rgmii-rxid、rgmii-txid区别
Linux/Documentation/devicetree/bindings/net/ethernet-controller.yam:

static int xxx_config_init(struct phy_device *phydev)
	struct mdio_device *mdio;
	struct mii_bus *bus;
	struct gpio_desc *gpiod;

	mdio = &phydev->mdio;
	bus = mdio->bus;
	gpiod = bus->reset_gpiod;

	if (IS_ERR(gpiod)) {
		phydev_info(phydev, "%s() phy_addr:%d, couldn't get mdio reset gpio\n",
			__func__, phydev->mdio.addr);
	} else	if (gpiod) {
		phydev_info(phydev, "%s() phy_addr:%d, set mdio reset gpio %d, value:0\n",
			__func__, phydev->mdio.addr, desc_to_gpio(gpiod));
		fsleep(bus->reset_delay_us);
		gpiod_direction_output(gpiod, 0);
		if (bus->reset_post_delay_us > 0)
			fsleep(bus->reset_post_delay_us);
	}


posted @ 2022-12-28 20:42  王阳开  阅读(164)  评论(0编辑  收藏  举报