Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp227328rwi; Wed, 12 Oct 2022 19:10:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6NbfpTky+dSYLdldE+MRdck7jrs3XoPQbNuYbZwTGYUeg2/u5jhL9EkUlHmjZby72OHtUh X-Received: by 2002:a17:907:80d:b0:73d:a576:dfbd with SMTP id wv13-20020a170907080d00b0073da576dfbdmr24602976ejb.402.1665627057467; Wed, 12 Oct 2022 19:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665627057; cv=none; d=google.com; s=arc-20160816; b=rfiNe2NTxvFICkengssCyR0ITuWPc2ovs8JBHUlEEe+Ia0EbTW51Ioe9dPEo9dEHRp nyFZbEEKkwNHfya1kjt4uW6Sb3XgHZbl3FHOtl/eBIDYWtxsX7pZppShrlZHHLE3KPj9 FnERquDFKbyqFIP9NyNrINNVOyeNz+ZbOyS0WszOWacji3NnvmHnHK547nZP3scIgBWf sFoohiMyW20S8mQ21u9wE2gHi3ct9+3ouPYsRMqXqLpBWoamPX+ExrBl7XgdekRGB1dX BQBx1ATCs4Ps2cdfWaKzrXp62sqxEol6AM0mZnjhJltgL6Hc9viMkkezn2JfyKiYFxVY gg1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=3EJQnP6UN6tAp+tHRqIKaVBOoijxB4ZZqI6g/bWtfls=; b=RYIB0AKVgWrK72MRcgcXYFh8qFS61FEq0ortsll4NdVrlUEW51xZqM1OyyojMMTsaN UCNL3B+8zrQhG54l25103l0v33GD1pf2L3XVDMr8p3/rmZaGbcLFwfCSE11lRVcMdGI0 kbx+/wl4EkVvGN1C/AZFQmaAMyDZyW+Ah+IS6IHfNJBQrXOCFYGtHLK8K2A1dQRdT6bX 264PViUaAH339cHEytz6Y4ePHbZxL545LQ/VCNLUX7+UmxZ61nbr8S+TKeXy2d/iqz4x 0fVwOEsMaBfjTJuY9ExLWe4kHhRvauuo9r0DK1zdRhsT4dXWtAyl71xXXVB7yzp2+3pf Nb/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a17090658cd00b0077e6bb482adsi16860374ejs.658.2022.10.12.19.10.32; Wed, 12 Oct 2022 19:10:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbiJMCHC (ORCPT + 99 others); Wed, 12 Oct 2022 22:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiJMCG5 (ORCPT ); Wed, 12 Oct 2022 22:06:57 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5994F12B36C; Wed, 12 Oct 2022 19:06:55 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5C4D021101C; Thu, 13 Oct 2022 04:06:53 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 23111211023; Thu, 13 Oct 2022 04:06:53 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 74E371802204; Thu, 13 Oct 2022 10:06:51 +0800 (+08) From: Richard Zhu To: vkoul@kernel.org, a.fatoum@pengutronix.de, p.zabel@pengutronix.de, l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, robh@kernel.org, shawnguo@kernel.org, alexander.stein@ew.tq-group.com, marex@denx.de, richard.leitner@linux.dev Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com, Richard Zhu Subject: [RESEND v12 2/4] phy: freescale: imx8m-pcie: Refine register definitions Date: Thu, 13 Oct 2022 09:47:00 +0800 Message-Id: <1665625622-20551-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1665625622-20551-1-git-send-email-hongxing.zhu@nxp.com> References: <1665625622-20551-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No function changes, refine PHY register definitions. - Keep align with other CMN PHY registers, refine the definitions of PHY_CMN_REG75. - Remove two BIT definitions that are not used at all. Signed-off-by: Richard Zhu Signed-off-by: Lucas Stach Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach --- drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c index c93286483b42..3c8c255499cd 100644 --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c @@ -31,12 +31,10 @@ #define IMX8MM_PCIE_PHY_CMN_REG065 0x194 #define ANA_AUX_RX_TERM (BIT(7) | BIT(4)) #define ANA_AUX_TX_LVL GENMASK(3, 0) -#define IMX8MM_PCIE_PHY_CMN_REG75 0x1D4 -#define PCIE_PHY_CMN_REG75_PLL_DONE 0x3 +#define IMX8MM_PCIE_PHY_CMN_REG075 0x1D4 +#define ANA_PLL_DONE 0x3 #define PCIE_PHY_TRSV_REG5 0x414 -#define PCIE_PHY_TRSV_REG5_GEN1_DEEMP 0x2D #define PCIE_PHY_TRSV_REG6 0x418 -#define PCIE_PHY_TRSV_REG6_GEN2_DEEMP 0xF #define IMX8MM_GPR_PCIE_REF_CLK_SEL GENMASK(25, 24) #define IMX8MM_GPR_PCIE_REF_CLK_PLL FIELD_PREP(IMX8MM_GPR_PCIE_REF_CLK_SEL, 0x3) @@ -131,9 +129,8 @@ static int imx8_pcie_phy_power_on(struct phy *phy) reset_control_deassert(imx8_phy->reset); /* Polling to check the phy is ready or not. */ - ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG75, - val, val == PCIE_PHY_CMN_REG75_PLL_DONE, - 10, 20000); + ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG075, + val, val == ANA_PLL_DONE, 10, 20000); return ret; } -- 2.25.1