Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F5B9C001DC for ; Wed, 26 Jul 2023 16:58:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 52E58867DF; Wed, 26 Jul 2023 18:58:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 19B4386844; Wed, 26 Jul 2023 18:58:01 +0200 (CEST) Received: from mail-m12739.qiye.163.com (mail-m12739.qiye.163.com [115.236.127.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B361E84660 for ; Wed, 26 Jul 2023 18:57:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=zhangqing@rock-chips.com Received: from [172.16.12.49] (unknown [58.22.7.114]) by mail-m12739.qiye.163.com (Hmail) with ESMTPA id 128A24A01FA; Wed, 26 Jul 2023 17:20:51 +0800 (CST) Message-ID: <9b056570-946b-5d3d-73ea-db2719ff37bc@rock-chips.com> Date: Wed, 26 Jul 2023 17:20:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH 2/2] power: regulator: rk8xx: Add 500us delay after LDO regulator is enabled To: Jonas Karlman , Kever Yang , Jaehoon Chung Cc: Peng Fan , u-boot@lists.denx.de References: <20230702124110.3709566-1-jonas@kwiboo.se> <20230702124110.3709566-3-jonas@kwiboo.se> <19b577d6-0032-82e3-ef3c-08118b52eb14@kwiboo.se> From: zhangqing In-Reply-To: <19b577d6-0032-82e3-ef3c-08118b52eb14@kwiboo.se> X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGhlMGlYdH0gaGhlISktDGk9VEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSk5DTUtIVUpLS1VKQl kG X-HM-Tid: 0a8991804a37b212kuuu128a24a01fa X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MC46Ggw4CD1IPUwOTEIuFysv KT5PFBJVSlVKTUJLSE1ISU5JS0NLVTMWGhIXVQETGhUcChIVHDsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUpLQ0hDNwY+ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.39 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean hi, Reviewed-by: elaine.zhang 在 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 >>> --- >>> 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 >>> #include >>> #include >>> +#include >>> #include >>> #include >>> #include >>> @@ -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@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. ****************************************************************************