[U-Boot] [PATCH 3/4] net: dm: fec: Support the phy-supply binding
Martin Fuzzey
martin.fuzzey at flowbird.group
Tue Jan 15 17:07:58 UTC 2019
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 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.
Since my patch has now been merged it needs a follow up patch to replace
regulator_autoset() with regulator_set_enable().
I'll send a fix patch soon unless you want to do it as the finder of the
problem.
Regards,
Martin
More information about the U-Boot
mailing list