Lines Matching +full:asym +full:- +full:pause
1 // SPDX-License-Identifier: GPL-2.0-only
29 * ethernet-phy-idAAAA.BBBB */
37 if (sscanf(cp, "ethernet-phy-id%4x.%4x", &upper, &lower) == 2) { in of_get_phy_id()
42 return -EINVAL; in of_get_phy_id()
54 "ethernet-phy-ieee802.3-c45"); in of_mdiobus_register_phy()
64 if (rc == -EPROBE_DEFER) { in of_mdiobus_register_phy()
69 phy->irq = rc; in of_mdiobus_register_phy()
70 mdio->irq[addr] = rc; in of_mdiobus_register_phy()
72 phy->irq = mdio->irq[addr]; in of_mdiobus_register_phy()
75 if (of_property_read_bool(child, "broken-turn-around")) in of_mdiobus_register_phy()
76 mdio->phy_ignore_ta_mask |= 1 << addr; in of_mdiobus_register_phy()
78 of_property_read_u32(child, "reset-assert-us", in of_mdiobus_register_phy()
79 &phy->mdio.reset_assert_delay); in of_mdiobus_register_phy()
80 of_property_read_u32(child, "reset-deassert-us", in of_mdiobus_register_phy()
81 &phy->mdio.reset_deassert_delay); in of_mdiobus_register_phy()
86 phy->mdio.dev.of_node = child; in of_mdiobus_register_phy()
87 phy->mdio.dev.fwnode = of_fwnode_handle(child); in of_mdiobus_register_phy()
98 dev_dbg(&mdio->dev, "registered phy %pOFn at address %i\n", in of_mdiobus_register_phy()
117 mdiodev->dev.of_node = child; in of_mdiobus_register_device()
118 mdiodev->dev.fwnode = of_fwnode_handle(child); in of_mdiobus_register_device()
128 dev_dbg(&mdio->dev, "registered mdio device %pOFn at address %i\n", in of_mdiobus_register_device()
140 { .compatible = "brcm,40nm-ephy" },
150 { .compatible = "moxa,moxart-rtl8201cp", },
156 * o Compatible string of "ethernet-phy-idX.X"
157 * o Compatible string of "ethernet-phy-ieee802.3-c45"
158 * o Compatible string of "ethernet-phy-ieee802.3-c22"
169 if (of_get_phy_id(child, &phy_id) != -EINVAL) in of_mdiobus_child_is_phy()
172 if (of_device_is_compatible(child, "ethernet-phy-ieee802.3-c45")) in of_mdiobus_child_is_phy()
175 if (of_device_is_compatible(child, "ethernet-phy-ieee802.3-c22")) in of_mdiobus_child_is_phy()
192 * of_mdiobus_register - Register mii_bus and create PHYs from the device tree
210 return -ENODEV; in of_mdiobus_register()
214 mdio->phy_mask = ~0; in of_mdiobus_register()
216 mdio->dev.of_node = np; in of_mdiobus_register()
217 mdio->dev.fwnode = of_fwnode_handle(np); in of_mdiobus_register()
220 mdio->reset_delay_us = DEFAULT_GPIO_RESET_DELAY; in of_mdiobus_register()
221 of_property_read_u32(np, "reset-delay-us", &mdio->reset_delay_us); in of_mdiobus_register()
230 addr = of_mdio_parse_addr(&mdio->dev, child); in of_mdiobus_register()
241 if (rc == -ENODEV) in of_mdiobus_register()
242 dev_err(&mdio->dev, in of_mdiobus_register()
264 dev_info(&mdio->dev, "scan phy %pOFn at address %i\n", in of_mdiobus_register()
269 if (rc && rc != -ENODEV) in of_mdiobus_register()
284 * of_phy_find_device - Give a PHY node, find the phy_device
301 if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) in of_phy_find_device()
311 * of_phy_connect - Connect to the phy described in the device tree
333 phy->dev_flags = flags; in of_phy_connect()
338 put_device(&phy->mdio.dev); in of_phy_connect()
346 * - Get phy node and connect to the phy described in the device tree
370 netdev_err(dev, "broken fixed-link specification\n"); in of_phy_get_and_connect()
375 phy_np = of_parse_phandle(np, "phy-handle", 0); in of_phy_get_and_connect()
389 * of_phy_attach - Attach to a PHY without starting the state machine
412 put_device(&phy->mdio.dev); in of_phy_attach()
421 * - the old DT binding, where 'fixed-link' was a property with 5
423 * - the new DT binding, where 'fixed-link' is a sub-node of the
433 dn = of_get_child_by_name(np, "fixed-link"); in of_phy_is_fixed_link()
444 if (of_get_property(np, "fixed-link", &len) && in of_phy_is_fixed_link()
460 strcmp(managed, "in-band-status") == 0) { in of_phy_register_fixed_link()
466 fixed_link_node = of_get_child_by_name(np, "fixed-link"); in of_phy_register_fixed_link()
470 "full-duplex"); in of_phy_register_fixed_link()
474 return -EINVAL; in of_phy_register_fixed_link()
476 status.pause = of_property_read_bool(fixed_link_node, "pause"); in of_phy_register_fixed_link()
478 "asym-pause"); in of_phy_register_fixed_link()
485 if (of_property_read_u32_array(np, "fixed-link", fixed_link_prop, in of_phy_register_fixed_link()
490 status.pause = fixed_link_prop[3]; in of_phy_register_fixed_link()
495 return -ENODEV; in of_phy_register_fixed_link()
512 put_device(&phydev->mdio.dev); /* of_phy_find_device() */ in of_phy_deregister_fixed_link()