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 89809C433EF for ; Mon, 27 Sep 2021 05:44:31 +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 A5D4E610A2 for ; Mon, 27 Sep 2021 05:44:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A5D4E610A2 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 6EDEF8357A; Mon, 27 Sep 2021 07:44:27 +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=1632721467; bh=cVdFoSotA+psXsHEq4aFVEXb87AzbJbEm6xvhmeGesw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rDms//FOUaFczoGJ9eM4Rk9UPNuVfyfGC5hS930vyRIAXjpiWOUrPcD4HV3OCBVkc kAyTS5zSGrGOc9sT6zlZsqmEirktymwKKCxcDqbBcwN/01wMhg2Dsrs4QKCtbYpik6 RrjsJao7GS/iJjc08D+7VRr3LNd6uyq/EAykMRWybYvgdZc+40xyc+aAXWJPoXCy2l FMLJg2yNiVOkyl1UVbt1Rk9FX8bQxKVdawXhZrF3ciV6s6fOwwebuhPRFvC2i5a0OB cBcyVFnw/faav9FlmRdrUOXAu/vT6f0vKfSDAPAe6D1HBjvMRG3MWXFjo8HadtdyLD n2XNPJSmumLQw== Received: by phobos.denx.de (Postfix, from userid 109) id 7F8F1835F3; Mon, 27 Sep 2021 07:44:25 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:1::465:204]) (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 A134D83246 for ; Mon, 27 Sep 2021 07:44:22 +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 [80.241.60.241]) (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-204.mailbox.org (Postfix) with ESMTPS id 4HHs5f44b0zQjf3; Mon, 27 Sep 2021 07:44:22 +0200 (CEST) Subject: Re: [PATCH 1/1] phy: marvell: cp110: Support SATA invert polarity To: Denis Odintsov , u-boot@lists.denx.de Cc: Baruch Siach , Rabeeh Khoury References: <20210915134531.49810-1-shiva@mail.ru> From: Stefan Roese Message-ID: Date: Mon, 27 Sep 2021 07:44:18 +0200 MIME-Version: 1.0 In-Reply-To: <20210915134531.49810-1-shiva@mail.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 92F911702 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 15.09.21 15:45, Denis Odintsov wrote: > In commit b24bb99d cp110 configuration initially done in u-boot > was removed and delegated to atf firmware as smc call. > That commit didn't account for later introduced in d13b740c SATA invert polarity support. > > This patch adds support of passing SATA invert polarity flags to atf > firmware during the smc call. > > Signed-off-by: Denis Odintsov > Cc: Baruch Siach > Cc: Rabeeh Khoury > Cc: Stefan Roese Reviewed-by: Stefan Roese Thanks, Stefan > --- > drivers/phy/marvell/comphy_cp110.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c > index 418318d12f..4fe2dfcdd1 100644 > --- a/drivers/phy/marvell/comphy_cp110.c > +++ b/drivers/phy/marvell/comphy_cp110.c > @@ -36,6 +36,10 @@ DECLARE_GLOBAL_DATA_PTR; > (COMPHY_CALLER_UBOOT | ((pcie_width) << 18) | \ > ((clk_src) << 17) | COMPHY_FW_FORMAT(mode, 0, speeds)) > > +/* Invert polarity are bits 1-0 of the mode */ > +#define COMPHY_FW_SATA_FORMAT(mode, invert) \ > + ((invert) | COMPHY_FW_MODE_FORMAT(mode)) > + > #define COMPHY_SATA_MODE 0x1 > #define COMPHY_SGMII_MODE 0x2 /* SGMII 1G */ > #define COMPHY_HS_SGMII_MODE 0x3 /* SGMII 2.5G */ > @@ -607,7 +611,8 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg, > break; > case COMPHY_TYPE_SATA0: > case COMPHY_TYPE_SATA1: > - mode = COMPHY_FW_MODE_FORMAT(COMPHY_SATA_MODE); > + mode = COMPHY_FW_SATA_FORMAT(COMPHY_SATA_MODE, > + serdes_map[lane].invert); > ret = comphy_sata_power_up(lane, hpipe_base_addr, > comphy_base_addr, > ptr_chip_cfg->cp_index, > 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