[PATCH] Revert "power: regulator: Add vin-supply for GPIO and Fixed regulators"
Jonas Karlman
jonas at kwiboo.se
Sun Nov 2 03:00:11 CET 2025
Hi Mark and Dragan,
On 11/1/2025 10:23 PM, Dragan Simic wrote:
> Hello Mark,
>
> On Saturday, November 01, 2025 22:17 CET, Mark Kettenis <mark.kettenis at xs4all.nl> wrote:
>>> From: Jonas Karlman <jonas at kwiboo.se>
>>>
>>> Rockchip boards may depend on a working MMC regulator in SPL to
>>> successfully load FIT payload from MMC. Typically, these boards only
>>> include the vmmc-supply regulator and not its vin-supply in SPL control
>>> FDT.
>>>
>>> The commit f98d812e5353 ("power: regulator: Add vin-supply for GPIO and
>>> Fixed regulators") breaks loading FIT from MMC in SPL on some of these
>>> boards due to now requiring the vin-supply to be included in the SPL
>>> control FDT.
>>
>> I ran into this issue a few days ago. Unfortunately that means U-Boot
>> 2025.10 is broken on several Rockchip boards :(.
>
> Sadly, that's true. :(
I do not think the commit was part of 2025.10, it was merged to next and
should currently only be part of master and 2026.01-rc1.
If you experience a similar boot issue on 2025.10 then that will most
likely be a different issue.
Regards,
Jonas
>
>>> The commit also strangely enables any found vin-supply in
>>> regulator_common_of_to_plat() and not when a regulator is enabled or as
>>> part of regulator_autoset().
>>>
>>> Revert the commit to fix FIT loading in SPL on broken boards.
>>>
>>> If a board needs to have its vin-supply enabled, two options come to
>>> mind:
>>>
>>> - Add regulator-always-on prop to the regulator in the -u-boot.dtsi for
>>> any board.
>>>
>>> - Implement full support for reference counting of regulators and then
>>> update the regulator-uclass to enable any found vin-supply when a
>>> regulator is enabled.
>>
>> I fixed the issue with the diff below instead. But I don't claim to
>> fully understand how this all is supposed to work...
>
> Unfortunately, that's just a quick workaround, not a proper fix.
> Basically, the regulator_common_of_to_plat() function is a wrong
> place for such enabling of additional regulators.
>
>> diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
>> index c80f10c3aa3..f43879a4353 100644
>> --- a/drivers/power/regulator/regulator_common.c
>> +++ b/drivers/power/regulator/regulator_common.c
>> @@ -48,7 +48,7 @@ int regulator_common_of_to_plat(struct udevice *dev,
>> ret = device_get_supply_regulator(dev, "vin-supply", &plat->vin_supply);
>> if (ret) {
>> debug("Regulator vin regulator not defined: %d\n", ret);
>> - if (ret != -ENOENT)
>> + if (ret != -ENOENT && ret != -ENODEV)
>> return ret;
>> }
>
More information about the U-Boot
mailing list