summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-08 11:36:33 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-09 13:35:14 +0200
commit9d24d749da6fc85995501f66e83a5a1c6c40ecf2 (patch)
treedb02c5f5fc1614e1601311be6b09de0b1f413369 /drivers/of
parent371a4d9af3bddbb17533aa7c8a623a4be93eacb8 (diff)
downloadbarebox-9d24d749da6fc85995501f66e83a5a1c6c40ecf2.tar.gz
barebox-9d24d749da6fc85995501f66e83a5a1c6c40ecf2.tar.xz
net: designware: eqos: reset phy
The designware eqos DT binding has support for specifying reset GPIOs. Add support for them. This binding is deprecated for new boards, but there are still some upstream dts files using it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210608093635.5749-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/of_gpio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/of/of_gpio.c b/drivers/of/of_gpio.c
index 7cbeeaf69e..e1cafdc848 100644
--- a/drivers/of/of_gpio.c
+++ b/drivers/of/of_gpio.c
@@ -35,6 +35,13 @@ static void of_gpio_flags_quirks(struct device_node *np,
if (active_low)
*flags |= OF_GPIO_ACTIVE_LOW;
}
+
+ /* Legacy handling of stmmac's active-low PHY reset line */
+ if (IS_ENABLED(CONFIG_DRIVER_NET_DESIGNWARE_EQOS) &&
+ !strcmp(propname, "snps,reset-gpio") &&
+ of_property_read_bool(np, "snps,reset-active-low"))
+ *flags |= OF_GPIO_ACTIVE_LOW;
+
}
/**