[U-Boot] Rockchip RK3288 regulator device table problem

Jaehoon Chung jh80.chung at samsung.com
Thu Dec 15 13:09:11 CET 2016


On 12/13/2016 01:57 AM, Rick Bronson wrote:
> Hi Simon,
> 
>>
>> On 9 December 2016 at 18:12, Rick Bronson <rick at efn.org> wrote:
>>> Hi All,
>>>
>>>   How do I enable a particular regulator upon boot?  I have two
>>> identically set LDO entries:
>>>
>>>                         vccio_en: LDO_REG1 {
>>>                                 regulator-always-on;
>>>                                 regulator-boot-on;
>>>                                 regulator-min-microvolt = <3300000>;
>>>                                 regulator-max-microvolt = <3300000>;
>>>                                 regulator-name = "vccio_en";
>>>                                 regulator-state-mem {
>>>                                         regulator-on-in-suspend;
>>>                                         regulator-suspend-microvolt =
> <3300000>;
>>>                                 };
>>>                         };
>>>
>>>                         vcc33_mic: LDO_REG2 {
>>>                                 regulator-always-on;
>>>                                 regulator-boot-on;
>>>                                 regulator-min-microvolt = <3300000>;
>>>                                 regulator-max-microvolt = <3300000>;
>>>                                 regulator-name = "vcc33_mic";
>>>                                 regulator-state-mem {
>>>                                         regulator-on-in-suspend;
>>>                                         regulator-suspend-microvolt =
> <3300000>;
>>>                                 };
>>>                         };
>>>
>>>   Yet one is enabled, the other disabled, any idea why?:
>>>
>>> => regulator status
>>> Name                 Enabled            uV         mA Mode
>>> ...
>>> vccio_en             enabled       3300000          - -
>>> vcc33_mic            disabled      3300000          - -
>>>
>>>   And oddly, the uV values actually don't come from the DT but from
>>> the rk808_ldo table in drivers/power/regulator/rk808.c
>>
>> Do you think this is happening by PMIC settings (in the device) rather
>> than through U-Boot?
> 
>   Think I found the reason for this, it's this way because of the way
> BOOT0, BOOT1 are strapped on the RK808.
> 
>>
>>>
>>>   Any ideas?
>>>
>>> Thanks for any help.
>>>
>>
>> There is a function called regulators_enable_boot_on() which enables
>> all boot-on regulators that have a fixed voltage, but I don't think
>> that is called with rockchip.
>>
>> Now that I look at it, I cannot see why I put the voltage values in
>> the driver. They should come form DT.
> 
>   Do you think the right way to solve this is (from common/board_r.c):
> 
> __weak int power_init_board(void)
> {
>  	regulators_enable_boot_on(false);
> 	return 0;
> }
> 
>   Tried this but it seems to introduce a race condition because often, it
> hangs.

I think it's not solution..I don't know how Simon think about..
But if you need to put regulators_enable_boot_on()..then you put "power_init_board()" in board/rockchip/evb_rk3036(?).

In other words, make the power_init_board() for rockhip...not touch the "__weak int power_init_board()".?

Best Regards,
Jaehoon Chung

> 
>   Cheers,
> 
>   Rick
> 
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 
> 



More information about the U-Boot mailing list