Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp124627rdb; Thu, 1 Feb 2024 04:14:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOvBpVfTaXabQtFW7/YV/Y+A6SxAazRM7tRg/YqHqYHIP8r2nyqrZD0JZEnFqrcDfgJLWe X-Received: by 2002:a05:6808:2381:b0:3be:a6ea:b80a with SMTP id bp1-20020a056808238100b003bea6eab80amr5342103oib.31.1706789642088; Thu, 01 Feb 2024 04:14:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706789642; cv=pass; d=google.com; s=arc-20160816; b=07u0/wBsNmIqYpORs5HpaeEgQDH+zD8TEh2u+bNk8y9JrftE6DWBu/zsGvtrn2cox7 mZ1xqzg1+bK0gWOJyYodIs1PfNYW9jsv7gjtHRQeRWUUCCI2Nsyzpkla01/WUr7Qj8uj 1iCjE1yqOJQdB8seT8x7M2MnFgQfdzn/bKW9CuBmdQeS2zgBcWb08t9UusBvVTReK7FG XzRMcLrrwC31H+B6sttYUBI0ybJdJbmqN+0zdZeaA/UjrRICyGMvUlEKpyh+OP8GhBsH reL2Qau2mWHrUhnf+0yRNTw2OO2OObneQ2sjsJkMdd/FFgaKzTpAlTKxVv5eqOiKkxjv xJ3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yOixHx4GJFH9DHtuXP1abFp8ch8dtUBz2KDWoIetUuc=; fh=KXNQleWn4z5KX6tlRkfJ9VWKxZVbuPC26MNmNgPqhgg=; b=ddmayBwbHMF1ZepEs6LbBdOhx3Sli5lMpjYWWkWonCUzUDByqh3k1+qpYHMOCtMhco eWk8nQT/ASsDtUMVrks5VrxgCxKrKBqkWXTZAU3JmyMgaotNx7Uatxv17QFmp3xBRwNa JFQq5N06F1+2HROLsasnFIy1unyWsm5AH2y4Il9mgkSVWLgUlh8rlkGrl03PzE9uGkNu pduN3LzMLyVV81wWrA7Z1cg2jEfujKg+nWbedxcdMDibR8AP/jdhDMovzTpMz/Kx6PBI Hjzv2jOWtx9Av1aNtRZMNm9Xxj9u8QIXVCmOLEvMd6huSYDDMw8kLOK+IPxh93IPUoeI HF7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z476S7EF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48094-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48094-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUNMcDdW53WfHO9pKhP8XNagHjdXnVmdx2eyOrvmvKBQAgvQYs85uRb538DXHhV+SfXf5EpLQ+Lb2dXsZ7Pxyj2VyUQesqfqsSrbtErKQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d19-20020a05622a15d300b0042bfceee2f3si167406qty.637.2024.02.01.04.14.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:14:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48094-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=@kernel.org header.s=k20201202 header.b=Z476S7EF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48094-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48094-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 C8F851C25E81 for ; Thu, 1 Feb 2024 12:14:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A022015DBCA; Thu, 1 Feb 2024 12:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z476S7EF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5C44160899; Thu, 1 Feb 2024 12:12:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789554; cv=none; b=YD52ayZpGpU4uG5RQmtnujtYJCQPW7oQRLWMhA6p0/HYj1LcGCGFlRxfmzHf7HfVrIsW8cFnOKJT0UHuKL9blB7I0WTwDM5OMSrj5hvmJu1wVg/ceFA+Y8qsOhKEzyjGwrqIl4wZcUwrojN2YTbaHQAXiixTJYQQDwWFA3IEw50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789554; c=relaxed/simple; bh=Qfbq+sSZxjAM/hD8kTbPYklUiveqLxLWC3K9/YiS0nA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WCSRILlNeAe+IzncV6r2a/9LSViEAlw6AVkmH3w7z6FT8NLTwIWZOkXXjmCWdRumhD2+0TwZTVJiXIn9DL2n4xpIWDe69jK/uwlME2VI2ljYRNqCXd6aKwqV38C43x1hWMYT5mc2Fd2q6CBthMbQ6WzS43Lab+KmFDT5uJbTdzU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z476S7EF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91FCAC433F1; Thu, 1 Feb 2024 12:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706789554; bh=Qfbq+sSZxjAM/hD8kTbPYklUiveqLxLWC3K9/YiS0nA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z476S7EFyvaNHyNGCa3WqeFNbLqRxCzcnu5y+ulWZ3GlLGBKVnFxa2yremgbIkQFt OpNscSzEANRIH3vI7cTo8XXbSZb5nMCgHsCreqla9060r5IlAVc3iL/SZ0frpc/LFa oFTRQs9m+RSz+TepjBeqUJioiO1StzsCmQzjOMGpViBgq+Zwf/lwv2fTqILUFwFBrm q+uWKkEhwewRrgWfLv53uLqzDuQ8wGEcldlNzwfBWcoru7LpUxp9vhbNf+R0qJQZzE afsK8CvHj20puC6AuQKKl1kD8HPYmA6M9HSa6GZh9pcXljFoqln5zpZKFx5TGfUjJv JANEIODaR8VMQ== From: Roger Quadros To: Thinh.Nguyen@synopsys.com Cc: gregkh@linuxfoundation.org, r-gunasekaran@ti.com, b-liu@ti.com, srk@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 3/4] usb: dwc3-am62: Fix PHY core voltage selection Date: Thu, 1 Feb 2024 14:12:19 +0200 Message-Id: <20240201121220.5523-4-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240201121220.5523-1-rogerq@kernel.org> References: <20240201121220.5523-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit TRM information is outdated and design team has confirmed that PHY_CORE_VOLTAGE should be 0 irrespective of VDD_CORE voltage. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-am62.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index 600ba9cfefea..af1ce934e7fb 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -97,7 +97,8 @@ #define USBSS_VBUS_STAT_SESSVALID BIT(2) #define USBSS_VBUS_STAT_VBUSVALID BIT(0) -/* Mask for PHY PLL REFCLK */ +/* USB_PHY_CTRL register bits in CTRL_MMR */ +#define PHY_CORE_VOLTAGE_MASK BIT(31) #define PHY_PLL_REFCLK_MASK GENMASK(3, 0) #define DWC3_AM62_AUTOSUSPEND_DELAY 100 @@ -162,6 +163,13 @@ static int phy_syscon_pll_refclk(struct dwc3_am62 *am62) am62->offset = args.args[0]; + /* Core voltage. PHY_CORE_VOLTAGE bit Recommended to be 0 always */ + ret = regmap_update_bits(am62->syscon, am62->offset, PHY_CORE_VOLTAGE_MASK, 0); + if (ret) { + dev_err(dev, "failed to set phy core voltage\n"); + return ret; + } + ret = regmap_update_bits(am62->syscon, am62->offset, PHY_PLL_REFCLK_MASK, am62->rate_code); if (ret) { dev_err(dev, "failed to set phy pll reference clock rate\n"); -- 2.34.1