[U-Boot] [PATCH 3/4] net: dm: fec: Support the phy-supply binding

Adam Ford aford173 at gmail.com
Tue Jan 15 17:19:23 UTC 2019


On Tue, Jan 15, 2019 at 11:08 AM Martin Fuzzey
<martin.fuzzey at flowbird.group> wrote:
>
> Hi Adam,
>
> On 13/01/2019 15:00, Adam Ford wrote:
> > On Thu, Oct 4, 2018 at 12:55 PM Martin Fuzzey
> > <martin.fuzzey at flowbird.group> wrote:
> >> Configure the phy regulator if defined by the "phy-supply" DT phandle.
> >>
> >> Signed-off-by: Martin Fuzzey <martin.fuzzey at flowbird.group>
> > This patch seems to break the Ethernet on my board, but I think I have
> > a possible solution (see below)
>
> Ah you are right my bad.
>
> I guess this means that you already had the phy-supply property in your
> DT but unused up till now.

I haven't had DM_REGULATOR turned on until recently which is how I
found this bug.
>
>
> >
> > I have a board that uses a fixed regulator driven by a GPIO.  It's
> > neither always-on, nor it is enabled on boot and it doesn't have a
> > specified current setting.  With DM_REGULATOR set, regulator_autoset
> > fails and FEC doesn't come up.
> > Looking at a bunch of other drivers, and how they enable their
> > respective regulators, they're using regulator_set_enable instead of
> > autoset.
>
>
> Indeed, on my board I am setting the voltage and do have regulator-boot-on;,
>
> which is why I didn't run into this issue.
>
>
> Incidentally it looks like if you need to set the voltage you *need*
> regulator-boot-on, which means the regulator will always be enabled too.
>
> There seems to be no way to say "please set this voltage but only switch
> the regulator on if a driver requests it".
>
>
> > Is there a reason we couldn't use
> >
> >                      ret = regulator_set_enable(priv->phy_supply, true);
>
> That looks good and tested ok on my board too.

good.
>
>
> Since my patch has now been merged it needs a follow up patch to replace
> regulator_autoset() with regulator_set_enable().

I agree.
>
> I'll send a fix patch soon unless you want to do it as the finder of the
> problem.

I have a patch ready to go.  I can just push it.  I'll CC you on the
e-mail and you can reply as tested-by or reviewed-by or whatever, if
you're open to that.

adam
>
>
> Regards,
>
> Martin
>
>


More information about the U-Boot mailing list