net: mdiobus: add reset-post-delay-us handling

Load new "reset-post-delay-us" value from MDIO properties,
and if configured to a greater then zero delay do a
flexible sleeping delay after MDIO bus reset deassert.
This allows devices to exit reset state before start
bus communication.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Bruno Thomsen
2020-07-30 21:57:48 +02:00
committed by David S. Miller
parent 6259e0f547
commit bb3831294c
3 changed files with 6 additions and 0 deletions

View File

@@ -293,6 +293,8 @@ struct mii_bus {
/* GPIO reset pulse width in microseconds */
int reset_delay_us;
/* GPIO reset deassert delay in microseconds */
int reset_post_delay_us;
/* RESET GPIO descriptor pointer */
struct gpio_desc *reset_gpiod;