Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2283628rdb; Wed, 21 Feb 2024 02:57:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6BStYqEh/mFpV1muc7ujnylkFfSDHAa46yPtp89Z2kRwVpfHzfR62MXOp2+qkQAYlgw6fEBdlU7MLEl0dRL1RLvAM5VrehR+ERb1l4w== X-Google-Smtp-Source: AGHT+IHEyQI8sZctX270UMdj7aQZ3T2AR9u0F0pOtk6VhuwPrVkTVWLFbn4rADr6BplZjFUIzvT0 X-Received: by 2002:a37:ef14:0:b0:784:aae1:10de with SMTP id j20-20020a37ef14000000b00784aae110demr17867763qkk.3.1708513024480; Wed, 21 Feb 2024 02:57:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708513024; cv=pass; d=google.com; s=arc-20160816; b=uYRh7nr82xE1bDjR/jWHkUu5lpKxazxmremlQbw3W8wa89QgID5e0+Dos6hRs4pHLT 2MVlFjBEYaP4a3fRvItINOfEDOEAzAjB27A4fwrNiiMUJCXKPoVFcoAj+FP9gHX3DEP7 x3G1SD3aEY08wQGHEOiuBTdnlWQgHfsSkeL94HdAIcC9MK3c2GepotNHRdfnHLJWe9Iw UzyDvPdGkv6uyvB7tGt+cIpOcpbqUeH+bZfzb4gJTOIT60OVvah1SfbaconJ5npZ219P w5V0QgX8TTR7cFkxJhI2PxA4s095mA6wvPY7cKG96gdJvX+f9OS8ZH0yLepYh3hjTeW7 80mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=i+ncsQZDtkxlo5wIjHq/CdTQpHc5QZi5GaNWKD+dMSg=; fh=y8PD8ORflA4Pt+fL3sSNppxB6HuwS3/x/Stl9YkfYk8=; b=dp7dQxzlSaFri2JWqy9eKWCc3fggQmhbyMYR3H8whTsP5l/wB4PgKI/vepqF0uUrHK iqv6Ir6u7dapYZLA4s/XdOGk0kBlecFM8266+U/pgWe1NYdZAx48jhvMXyzBw3TIabie VqjjoYJ8N9fKlIfNvA2CnkB/xwKzorwTiErf4ywVltmISv6Xy4wyL6uy0jecuoH5Nuv8 xFQhH/W1HvSzh9BcHVWGC9KyWdl3dFe4ODLXpKAbs1x+YuujejossXziO9Uhad4XoYfn DK71ZchCgIp6xS0QXjhuKsqVpAKA9pSKW3eFbGaAvgQjagIS6ph7xIhCSy6Ic8C/RQlE FaYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wRxolPFq; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-74570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id oq22-20020a05620a611600b0078733526593si10259834qkn.46.2024.02.21.02.57.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:57:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wRxolPFq; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-74570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 349501C216DF for ; Wed, 21 Feb 2024 10:57:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AAADC3DB8C; Wed, 21 Feb 2024 10:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wRxolPFq" Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F60336AF1 for ; Wed, 21 Feb 2024 10:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708513019; cv=none; b=EuxDPiVVvlUGqrudpL4gh/mEZzuGVobpcP+Joqqv9VRDhuRxxtW9/bSwC2qXkey89kQ/D1Gd7UxN0dL5q8AftVuZkVT4518pWVCiGLk/5W1d57y9/LIpseWFq6+U+O4xHRhxbwiBHq79AphgWoWQkcYAFk1hnwSfq0e/W+806zk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708513019; c=relaxed/simple; bh=vbWMRmS1rFnN3OCYfqHmxe0l6A9GOkYIALwfyrOlRrY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MVmCBmyMQTzPcyAmWWYKwFwu1OYlCIC8dXQRcYRt5rw/tWfI6nTGN9pCuVet0xNk4p/90bOfBsfbHrfzLN5X1kJVqMc1R20Dls90w/ib86dfrSwa7BY2GXWVrozX5PvNiUE8tZ655PH9iQAMddaCp0jxwQxKWpTDtCNOGnynDvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=wRxolPFq; arc=none smtp.client-ip=209.85.219.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-dc6d8bd618eso6315986276.3 for ; Wed, 21 Feb 2024 02:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708513011; x=1709117811; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=i+ncsQZDtkxlo5wIjHq/CdTQpHc5QZi5GaNWKD+dMSg=; b=wRxolPFqKJ5spFJS732SEnqTalMhyxzyquFjBtWb+qkY7Cypys45JzvxUGEXZLdrw5 2/5q4Xpmb4zC5WvN46F83scAmDdhzuzl1X5M/oyNg10SvMhFN/fdFe4WanS0JAm41IkJ 9lidcGyPe5Jodb8iBuYNzl8Pf3d2TIVISkmu+RhoDhVIVNBEanN+xqGxv4C8O5UPsv5f MLbtCALp7IZoP14OaMR33PNR2m3oeNv/6PFsKpVTgUItQPnwxWbYKyH4lkOWXulpTaMs ItK2qV4GosRMHbujN/RnNCRX/G+osmDJDy+jnL3aMUO3kYnobzYVP+QX61FkgOq6bPpu HA+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708513011; x=1709117811; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i+ncsQZDtkxlo5wIjHq/CdTQpHc5QZi5GaNWKD+dMSg=; b=oygk5PCYvIISGL9W+uOrmJcb1UAg9a0vI1/fID/bP2DhWbkpFx7l+IAgaRaKlnuPNc eorNPhagSmiV84w03VT8h+/XLuxJVgXwnoABY/0roFOeJgDHTMyCYXcLcEFSLkpMpqF6 AJsns3R5Xeb1MspHq5UkAQotWHWTVeH8+nOpmC1w14naP9IHfUAHeJSQrAXfXHn9B+rV Pd0yUDxmvtcuyTaZ8DIGux2egMjWH+054qubRk8laiTj6GvLiw9gH1LlLgPPKjIWbcF2 t/GI4syK6Zr35RQet8hIDNSxrOi7wteh2lQdZjGQGK8V/BNJGsBqQzQ9DYZT/2Z8L9Wu 6ANQ== X-Forwarded-Encrypted: i=1; AJvYcCUjlMFvr18A2EYh5xCdImDLq9VLP4ERXwt5Ir004sE77azpah86eD5oEGVpCbqp35ZNDzti3+RBDCspnVTgSuuPEZTw2d8iCdB5CWMB X-Gm-Message-State: AOJu0YwFRkEGeWl5F3Gyy/5UmRA6ERRzX8l6XL6vOX5oQ2byS1ZfxaBe dX16UFUNywdmKygWQ/tbjlRlG7IAaHSWYzmekhEgW4tN2woIg0POPiQJq9G2P62xH5p1QjcLs3x um1/a0FXY756RAwRBKU8vOYmzia0U0sONCMroRw== X-Received: by 2002:a25:b347:0:b0:dcc:5a25:ae88 with SMTP id k7-20020a25b347000000b00dcc5a25ae88mr15176976ybg.19.1708513011384; Wed, 21 Feb 2024 02:56:51 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240221103202.3628142-1-quic_kriskura@quicinc.com> In-Reply-To: <20240221103202.3628142-1-quic_kriskura@quicinc.com> From: Dmitry Baryshkov Date: Wed, 21 Feb 2024 12:56:40 +0200 Message-ID: Subject: Re: [PATCH] phy: qcom-snps: Fixed order of enabling regulators To: Krishna Kurapati Cc: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com Content-Type: text/plain; charset="UTF-8" On Wed, 21 Feb 2024 at 12:32, Krishna Kurapati wrote: > > The SNPS Femto phy has 3 supplies, vdda-pll (0.88V), vdd18 (1.8V), > vdd33 (3.3V). The driver enables these in order of 0.88 -> 3.3 -> 1.88. > But on phy instances which have EUD attached, it is seen that not enabling > the regulators in the order of (0.88 -> 1.8V -> 3.3V) is causing the EUD to > reset the phy (issue seen rarely) thereby disturbing enumeration. > > This change doesn't disturb operation of phy's where EUD is not present. > According to the some of the applicable power-supply ramp scenarios present > in data book: (DVDD is 0.88V, VDDH is 1.8V) > > a) VDDH<#> and VDD33<#> held to 0 V (cannot be left floating) with DVDD > ramped to a valid level > b) VDD33<#> held to 0 V (cannot be left floating) with DVDD and VDDH<#> > ramped to their respective, valid levels > > Modify the driver to power up the phy regulators in order of: > 0.88 -> 1.8 -> 3.3 respectively. > > Signed-off-by: Krishna Kurapati > --- > > Downstream kernels on QC targets use this sequence to power up > the phy and this has been tested extensively on multiple targets. > This change has been tested with upstream kernel on QCM6490-IDP > without EUD to ensure there is no loss or breakage of functionality. > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > index eb0b0f61d98e..e86d221b7397 100644 > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > @@ -79,7 +79,7 @@ > #define LS_FS_OUTPUT_IMPEDANCE_MASK GENMASK(3, 0) > > static const char * const qcom_snps_hsphy_vreg_names[] = { > - "vdda-pll", "vdda33", "vdda18", > + "vdda-pll", "vdda18", "vdda33", NAK. The driver uses regulator_bulk_enable, which enables all three regulators simultaneously via async calls, thus your change doesn't have any effect. Also note, that these regulators are frequently shared between different consumers. As such, even if you have tight control of regulator ordering in the driver, other drivers might enable corresponding regulators on their own, breaking the ordering. -- With best wishes Dmitry