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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDC1DC433F5 for ; Fri, 24 Sep 2021 14:21:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2A0A6606A5 for ; Fri, 24 Sep 2021 14:21:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2A0A6606A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E7407834E8; Fri, 24 Sep 2021 16:21:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="CvJzmZCl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A5D5834E6; Fri, 24 Sep 2021 16:21:33 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 610ED834E2 for ; Fri, 24 Sep 2021 16:21:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id D0DE9610F7; Fri, 24 Sep 2021 14:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632493287; bh=1lwkZC2kDCVP/uJtb4eShUd5ITjFKjyQG9+eXKNzLRE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CvJzmZClXI87xs+ZpEX+HEeJKLomRQoUWD2QwAJtZTzlNY5vnWPJUdPyw/Zd0thr7 /TdroiPexfavtgE0LfWk1K+kAcKaejfx4Et/ljcoDMFVAj7CVfU6s0/sS8n0vs4TJc BQ7TfWEXiRsi9m8BYLJouaVm5u9RZDPLfooNfefGi2XMJHPw2jStuDbCtbECsxIKbS fEQHDJZbZEuGT7B3PzZMrgyZKTqBDpWg+BDuENBu6dK19yITgs72gavEc3+o4jlg5f pUrI3y4uAARhgAFtaMW9YE61BPsbpFCFUY/QEjIaCKVEwKbMitMQVxeTW+EWYiRakk K4Kf6cetlmiCA== Received: by pali.im (Postfix) id 97D907A6; Fri, 24 Sep 2021 16:21:24 +0200 (CEST) Date: Fri, 24 Sep 2021 16:21:24 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Stefan Roese Cc: Konstantin Porotchkin , Grzegorz Jaszczyk , Marek =?utf-8?B?QmVow7pu?= , u-boot@lists.denx.de Subject: Re: [PATCH 1/3] phy: marvell: a3700: Set TXDCLK_2X_SEL bit during PCIe initialization Message-ID: <20210924142124.wkb5r7so3ave6egy@pali> References: <20210924141157.523-1-pali@kernel.org> <34fd1b72-8948-eb02-a64f-3dc783677ea6@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <34fd1b72-8948-eb02-a64f-3dc783677ea6@denx.de> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean On Friday 24 September 2021 16:18:46 Stefan Roese wrote: > On 24.09.21 16:11, Pali Rohár wrote: > > Marvell Armada 3700 Functional Specifications, section 52.2 PCIe Link > > Initialization says that TXDCLK_2X_SEL bit needs to be enabled for PCIe > > Root Complex mode. > > > > Same change was included in TF-A project: > > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/9408 > > > > Signed-off-by: Pali Rohár > > Did you experience some problems without this change? I think I did not see problems neither with nor without this change. Code just aligns with what is written in documentation guidelines. > If yes, which? > > Reviewed-by: Stefan Roese > > Thanks, > Stefan > > > --- > > drivers/phy/marvell/comphy_a3700.c | 2 +- > > drivers/phy/marvell/comphy_a3700.h | 1 + > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c > > index 5eb137db4884..afa1295bbdb8 100644 > > --- a/drivers/phy/marvell/comphy_a3700.c > > +++ b/drivers/phy/marvell/comphy_a3700.c > > @@ -200,7 +200,7 @@ static int comphy_pcie_power_up(u32 speed, u32 invert) > > * 6. Enable the output of 100M/125M/500M clock > > */ > > reg_set16(phy_addr(PCIE, MISC_REG0), > > - 0xA00D | rb_clk500m_en | rb_clk100m_125m_en, 0xFFFF); > > + 0xA00D | rb_clk500m_en | rb_txdclk_2x_sel | rb_clk100m_125m_en, 0xFFFF); > > /* > > * 7. Enable TX > > diff --git a/drivers/phy/marvell/comphy_a3700.h b/drivers/phy/marvell/comphy_a3700.h > > index 8748c6c84ae6..23c8ffbff44d 100644 > > --- a/drivers/phy/marvell/comphy_a3700.h > > +++ b/drivers/phy/marvell/comphy_a3700.h > > @@ -120,6 +120,7 @@ static inline void __iomem *phy_addr(enum phy_unit unit, u32 addr) > > #define MISC_REG0 0x4f > > #define rb_clk100m_125m_en BIT(4) > > +#define rb_txdclk_2x_sel BIT(6) > > #define rb_clk500m_en BIT(7) > > #define rb_ref_clk_sel BIT(10) > > > > > Viele Grüße, > Stefan > > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de