generic: ar8xxx: add optional gpio reset support
Some devices like Linksys EA8500 use designated GPIO to reset the switch
and if the switch isn't reset properly before first access, it can lead
to unusable switch after soft reboot of the device:
libphy: GPIO Bitbanged MDIO: probed
mdio_bus gpio-0: MDIO device at address 0 is missing.
mdio_bus gpio-0: MDIO device at address 4 is missing.
Working case:
libphy: GPIO Bitbanged MDIO: probed
switch0: Atheros AR8337 rev. 2 switch registered on gpio-0
So this patch introduces optional reset GPIO which helps fixing this
problem.
Tested-by: Your Real Name <424778940z@gmail.com>
Reported-by: Your Real Name <424778940z@gmail.com>
Ref: https://github.com/openwrt/openwrt/pull/2047
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2168
Signed-off-by: Petr Štetiar <ynezz@true.cz>