Re: [PATCH v2] of: property: fw_devlink: Add support for "phy-handle" property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 23, 2021 at 5:08 AM Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> wrote:
>
> Hi,
>
> On 18.08.2021 04:17, Saravana Kannan wrote:
> > Allows tracking dependencies between Ethernet PHYs and their consumers.
> >
> > Cc: Andrew Lunn <andrew@xxxxxxx>
> > Cc: netdev@xxxxxxxxxxxxxxx
> > Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
>
> This patch landed recently in linux-next as commit cf4b94c8530d ("of:
> property: fw_devlink: Add support for "phy-handle" property"). It breaks
> ethernet operation on my Amlogic-based ARM64 boards: Odroid C4
> (arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts) and N2
> (meson-g12b-odroid-n2.dts) as well as Khadas VIM3/VIM3l
> (meson-g12b-a311d-khadas-vim3.dts and meson-sm1-khadas-vim3l.dts).
>
> In case of OdroidC4 I see the following entries in the
> /sys/kernel/debug/devices_deferred:
>
> ff64c000.mdio-multiplexer
> ff3f0000.ethernet
>
> Let me know if there is anything I can check to help debugging this issue.

I'm fairly certain you are hitting this issue because the PHY device
doesn't have a compatible property. And so the device link dependency
is propagated up to the mdio bus. But busses as suppliers aren't good
because busses never "probe".

PHY seems to be one of those cases where it's okay to have the
compatible property but also okay to not have it. You can confirm my
theory by checking for the list of suppliers under
ff64c000.mdio-multiplexer. You'd see mdio@0 (ext_mdio) and if you look
at the "status" file under the folder it should be "dormant". If you
add a compatible property that fits the formats a PHY node can have,
that should also fix your issue (not the solution though).

I'll send out a fix this week (once you confirm my analysis). Thanks
for reporting it.

-Saravana

>
> > ---
> > v1 -> v2:
> > - Fixed patch to address my misunderstanding of how PHYs get
> >    initialized.
> >
> >   drivers/of/property.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/of/property.c b/drivers/of/property.c
> > index 931340329414..0c0dc2e369c0 100644
> > --- a/drivers/of/property.c
> > +++ b/drivers/of/property.c
> > @@ -1291,6 +1291,7 @@ DEFINE_SIMPLE_PROP(pwms, "pwms", "#pwm-cells")
> >   DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells")
> >   DEFINE_SIMPLE_PROP(leds, "leds", NULL)
> >   DEFINE_SIMPLE_PROP(backlight, "backlight", NULL)
> > +DEFINE_SIMPLE_PROP(phy_handle, "phy-handle", NULL)
> >   DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
> >   DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
> >
> > @@ -1379,6 +1380,7 @@ static const struct supplier_bindings of_supplier_bindings[] = {
> >       { .parse_prop = parse_resets, },
> >       { .parse_prop = parse_leds, },
> >       { .parse_prop = parse_backlight, },
> > +     { .parse_prop = parse_phy_handle, },
> >       { .parse_prop = parse_gpio_compat, },
> >       { .parse_prop = parse_interrupts, },
> >       { .parse_prop = parse_regulators, },
>
> Best regards
> --
> Marek Szyprowski, PhD
> Samsung R&D Institute Poland
>



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux