net: phy: Handle reset-delay-us/reset-post-delay-us properties

These two properties are used by various DTs in place of
current reset-assert-us/reset-deassert-us , handle both .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
Marek Vasut 2023-05-31 00:51:27 +02:00
parent 68a4d15061
commit 3015ae5feb

View file

@ -144,6 +144,14 @@ static int eth_phy_of_to_plat(struct udevice *dev)
uc_priv->reset_assert_delay = dev_read_u32_default(dev, "reset-assert-us", 0);
uc_priv->reset_deassert_delay = dev_read_u32_default(dev, "reset-deassert-us", 0);
/* These are used by some DTs, try these as a fallback. */
if (!uc_priv->reset_assert_delay && !uc_priv->reset_deassert_delay) {
uc_priv->reset_assert_delay =
dev_read_u32_default(dev, "reset-delay-us", 0);
uc_priv->reset_deassert_delay =
dev_read_u32_default(dev, "reset-post-delay-us", 0);
}
return 0;
}