[PATCH 10/14] net: phy: Handle reset-delay-us/reset-post-delay-us properties
Ramon Fried
rfried.dev at gmail.com
Sat Jun 10 13:01:05 CEST 2023
On Wed, May 31, 2023 at 1:51 AM Marek Vasut
<marek.vasut+renesas at mailbox.org> wrote:
>
> 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 at mailbox.org>
> ---
> Cc: Geert Uytterhoeven <geert+renesas at glider.be>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Michal Simek <michal.simek at amd.com>
> Cc: Nishanth Menon <nm at ti.com>
> Cc: Ramon Fried <rfried.dev at gmail.com>
> ---
> drivers/net/eth-phy-uclass.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c
> index 231bad66514..9d1e8d38ffa 100644
> --- a/drivers/net/eth-phy-uclass.c
> +++ b/drivers/net/eth-phy-uclass.c
> @@ -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;
> }
>
> --
> 2.39.2
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>
More information about the U-Boot
mailing list