* [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
@ 2021-05-05 8:41 ` Neil Armstrong
0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-05-05 8:41 UTC (permalink / raw)
To: u-boot
If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
handle it like -ENOENT.
With that, devices without USB3 supported can have USB working (Odroid-HC4).
Fixes: adb049abf7 ("usb: dwc3: Add Meson G12A USB Glue")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index bd8bf227c8..90418ddc1d 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -298,7 +298,7 @@ static int dwc3_meson_g12a_get_phys(struct dwc3_meson_g12a *priv)
for (i = 0 ; i < PHY_COUNT ; ++i) {
ret = generic_phy_get_by_name(priv->dev, phy_names[i],
&priv->phys[i]);
- if (ret == -ENOENT)
+ if (ret == -ENOENT || ret == -ENODATA)
continue;
if (ret)
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
@ 2021-05-05 8:41 ` Neil Armstrong
0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-05-05 8:41 UTC (permalink / raw)
To: marex; +Cc: u-boot-amlogic, u-boot, Neil Armstrong
If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
handle it like -ENOENT.
With that, devices without USB3 supported can have USB working (Odroid-HC4).
Fixes: adb049abf7 ("usb: dwc3: Add Meson G12A USB Glue")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index bd8bf227c8..90418ddc1d 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -298,7 +298,7 @@ static int dwc3_meson_g12a_get_phys(struct dwc3_meson_g12a *priv)
for (i = 0 ; i < PHY_COUNT ; ++i) {
ret = generic_phy_get_by_name(priv->dev, phy_names[i],
&priv->phys[i]);
- if (ret == -ENOENT)
+ if (ret == -ENOENT || ret == -ENODATA)
continue;
if (ret)
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
2021-05-05 8:41 ` Neil Armstrong
(?)
@ 2021-05-05 10:06 ` Marek Vasut
2021-05-07 14:55 ` Neil Armstrong
-1 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2021-05-05 10:06 UTC (permalink / raw)
To: u-boot
On 5/5/21 10:41 AM, Neil Armstrong wrote:
> If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
> handle it like -ENOENT.
>
> With that, devices without USB3 supported can have USB working (Odroid-HC4).
Shouldn't you rather specify NOP PHY in the DT ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
2021-05-05 10:06 ` Marek Vasut
@ 2021-05-07 14:55 ` Neil Armstrong
0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-05-07 14:55 UTC (permalink / raw)
To: u-boot
On 05/05/2021 12:06, Marek Vasut wrote:
> On 5/5/21 10:41 AM, Neil Armstrong wrote:
>> If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
>> handle it like -ENOENT.
>>
>> With that, devices without USB3 supported can have USB working (Odroid-HC4).
>
> Shouldn't you rather specify NOP PHY in the DT ?
Who NOP I would have no idea if the port is disabled or used.
The PHY control is mixed between the actual PHY driver and the DWC3/DWC2 glue, so the bindings were designed
to make some PHYs phandle optionals if unused.
Neil
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
2021-05-05 8:41 ` Neil Armstrong
@ 2021-05-14 15:42 ` Neil Armstrong
-1 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-05-14 15:42 UTC (permalink / raw)
To: u-boot
On 05/05/2021 10:41, Neil Armstrong wrote:
> If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
> handle it like -ENOENT.
>
> With that, devices without USB3 supported can have USB working (Odroid-HC4).
>
> Fixes: adb049abf7 ("usb: dwc3: Add Meson G12A USB Glue")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index bd8bf227c8..90418ddc1d 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -298,7 +298,7 @@ static int dwc3_meson_g12a_get_phys(struct dwc3_meson_g12a *priv)
> for (i = 0 ; i < PHY_COUNT ; ++i) {
> ret = generic_phy_get_by_name(priv->dev, phy_names[i],
> &priv->phys[i]);
> - if (ret == -ENOENT)
> + if (ret == -ENOENT || ret == -ENODATA)
> continue;
>
> if (ret)
>
Applied to u-boot-amlogic
Neil
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
@ 2021-05-14 15:42 ` Neil Armstrong
0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-05-14 15:42 UTC (permalink / raw)
To: u-boot-amlogic; +Cc: u-boot, marex
On 05/05/2021 10:41, Neil Armstrong wrote:
> If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
> handle it like -ENOENT.
>
> With that, devices without USB3 supported can have USB working (Odroid-HC4).
>
> Fixes: adb049abf7 ("usb: dwc3: Add Meson G12A USB Glue")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index bd8bf227c8..90418ddc1d 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -298,7 +298,7 @@ static int dwc3_meson_g12a_get_phys(struct dwc3_meson_g12a *priv)
> for (i = 0 ; i < PHY_COUNT ; ++i) {
> ret = generic_phy_get_by_name(priv->dev, phy_names[i],
> &priv->phys[i]);
> - if (ret == -ENOENT)
> + if (ret == -ENOENT || ret == -ENODATA)
> continue;
>
> if (ret)
>
Applied to u-boot-amlogic
Neil
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-14 15:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 8:41 [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell Neil Armstrong
2021-05-05 8:41 ` Neil Armstrong
2021-05-05 10:06 ` Marek Vasut
2021-05-07 14:55 ` Neil Armstrong
2021-05-14 15:42 ` Neil Armstrong
2021-05-14 15:42 ` Neil Armstrong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.