diff options
author | Robert Marko <robert.marko@sartura.hr> | 2023-01-17 15:08:15 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-03-01 11:22:27 -0700 |
commit | 1de76a4535a2d617adeb05070d265e2826af3ad6 (patch) | |
tree | 9686990ccc34abe578cf3a780eb3d83750703332 | |
parent | 3cbaa4e1efa70b463a0057920e145f5e52784b9a (diff) |
arm64: a37xx: pinctrl: probe after binding
Currently, pinctrl drivers are getting probed during post-bind, however
that is being reverted, and on A37XX pinctrl driver is the one that
registers the GPIO driver during the probe.
So, if the pinctrl driver doesn't get probed GPIO-s won't get registered
and thus they cannot be used.
This is a problem on the Methode eDPU as it just uses SB pins as GPIO-s
and without them being registered networking won't work as it only has
one SFP slot and the TX disable GPIO is on the SB controller.
So, lets just add a flag only to A37XX driver to probe after binding
in order for the GPIO driver to always get registered.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index 25fbe39abd1..1be6252227d 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -745,6 +745,19 @@ static int armada_37xx_pinctrl_probe(struct udevice *dev) return 0; } +static int armada_37xx_pinctrl_bind(struct udevice *dev) +{ + /* + * Make sure that the pinctrl driver gets probed after binding + * as on A37XX the pinctrl driver is the one that is also + * registering the GPIO one during probe, so if its not probed + * GPIO-s are not registered as well. + */ + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); + + return 0; +} + static const struct udevice_id armada_37xx_pinctrl_of_match[] = { { .compatible = "marvell,armada3710-sb-pinctrl", @@ -762,6 +775,7 @@ U_BOOT_DRIVER(armada_37xx_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(armada_37xx_pinctrl_of_match), .probe = armada_37xx_pinctrl_probe, + .bind = armada_37xx_pinctrl_bind, .priv_auto = sizeof(struct armada_37xx_pinctrl), .ops = &armada_37xx_pinctrl_ops, }; |