[PATCH 2/2] power: regulator: rk8xx: Add 500us delay after LDO regulator is enabled

zhangqing zhangqing at rock-chips.com
Wed Jul 26 11:20:50 CEST 2023


hi,

Reviewed-by: elaine.zhang<elaine.zhang at rock-chips.com>

在 2023/7/26 16:40, Jonas Karlman 写道:
> Hi Kever,
> On 2023-07-26 10:36, Kever Yang wrote:
>> Hi Jonas,
>>
>> On 2023/7/2 20:41, Jonas Karlman wrote:
>>> A quick power cycle of a LDO regulator during dw-mmc signal voltage
>>> change has shown that SD-card does not always get recognized.
>>>
>>> Linux driver use an enable_time of 400us for LDO regulators. Apply a
>>> 500us delay when a LDO regulator is enabled to fix possible issues.
>> Does 400us not enough for the board you test?
> It probably is, linux apply a 400-500us range sleep so I went with upper
> limit of 500us for this patch.

This looks okay.

>
> Regards,
> Jonas
>
>> Hi Elaine,
>>
>>       Could help to check this change?
>>
>>
>> Thanks,
>>
>> - Kever
>>
>>> Fixes: 94afc1cb466a ("power: regulator: rk8xx: update the driver for rk808 and rk818")
>>> Signed-off-by: Jonas Karlman<jonas at kwiboo.se>
>>> ---
>>>    drivers/power/regulator/rk8xx.c | 4 ++++
>>>    1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
>>> index 0ee07ad299d7..e95640a39b0a 100644
>>> --- a/drivers/power/regulator/rk8xx.c
>>> +++ b/drivers/power/regulator/rk8xx.c
>>> @@ -12,6 +12,7 @@
>>>    #include <dm.h>
>>>    #include <errno.h>
>>>    #include <log.h>
>>> +#include <linux/delay.h>
>>>    #include <power/rk8xx_pmic.h>
>>>    #include <power/pmic.h>
>>>    #include <power/regulator.h>
>>> @@ -616,6 +617,9 @@ static int _ldo_set_enable(struct udevice *pmic, int ldo, bool enable)
>>>    		break;
>>>    	}
>>>    
>>> +	if (enable)
>>> +		udelay(500);
>>> +
>>>    	return ret;
>>>    }
>>>    

-- 
张晴
瑞芯微电子股份有限公司
Rockchip Electronics Co.,Ltd
地址:福建省福州市铜盘路软件大道89号软件园A区21号楼
Add:No.21 Building, A District, No.89 Software Boulevard Fuzhou, Fujian 350003, P.R.China
Tel:+86-0591-83991906-8601
邮编:350003
E-mail:elaine.zhang at rock-chips.com
****************************************************************************
保密提示:本邮件及其附件含有机密信息,仅发送给本邮件所指特定收件人。若非该特定收件人,请勿复制、使用或披露本邮件的任何内容。若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件或其他方式即刻告知发件人。福州瑞芯微电子有限公司拥有本邮件信息的著作权及解释权,禁止任何未经授权许可的侵权行为。

IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd .The contents of this email and any attachments may contain information that is privileged, confidential and/or exempt from disclosure under applicable law and relevant NDA. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information is STRICTLY PROHIBITED. Please immediately contact the sender as soon as possible and destroy the material in its entirety in any format. Thank you.

****************************************************************************


More information about the U-Boot mailing list