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 59E74C433F5 for ; Fri, 24 Sep 2021 14:19:37 +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 BE34C61164 for ; Fri, 24 Sep 2021 14:19:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BE34C61164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 4F7D382C45; Fri, 24 Sep 2021 16:19:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1632493174; bh=VSwh+8AujHZW7c98suZFh5d5Qn9QUr1eQ3zOYrD0/Ys=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jeBedAP3Rb7zkJwMZdZjRdJjEYF4ivp/CQyXJN4KEUsyyRMz+TkfPoQGBTcB3qU9C 0ZEb/nbhwK3R4SfR46vQ7eg7D0bfs82HuVDBNPFyo1lOMaSBFxRRXyt3OOGz0Usxcf 9feO6J/TapwDN+F6y5QyZNnIoSRpp3NLTZfokhQNlJDrTUF2Ok34I48rWu5VldQUuq H0qQyH5Bp/Ftk7MA9DbtaD2UmBIu2jgprHCYXFlqGhIpCh4OY5L6bM/rj2BOUqK7wT zbJ6MFnVDlatkiCcdxyidKO0bk47/G9vVCVW7avM4sDgCFMFAwk+4X74vxLl/eBZJm +i2iVSWCaU2cQ== Received: by phobos.denx.de (Postfix, from userid 109) id D82A0834BF; Fri, 24 Sep 2021 16:19:16 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3F287834C7 for ; Fri, 24 Sep 2021 16:18:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4HGDfg0ltwzQjkC; Fri, 24 Sep 2021 16:18:51 +0200 (CEST) Subject: Re: [PATCH 1/3] phy: marvell: a3700: Set TXDCLK_2X_SEL bit during PCIe initialization To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: Konstantin Porotchkin , Grzegorz Jaszczyk , =?UTF-8?Q?Marek_Beh=c3=ban?= , u-boot@lists.denx.de References: <20210924141157.523-1-pali@kernel.org> From: Stefan Roese Message-ID: <34fd1b72-8948-eb02-a64f-3dc783677ea6@denx.de> Date: Fri, 24 Sep 2021 16:18:46 +0200 MIME-Version: 1.0 In-Reply-To: <20210924141157.523-1-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 97F0F181B 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 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? 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