From mboxrd@z Thu Jan 1 00:00:00 1970 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 6F9A4C433EF for ; Mon, 27 Sep 2021 05:48:01 +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 AF6BB61157 for ; Mon, 27 Sep 2021 05:48:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF6BB61157 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 C18C782FC0; Mon, 27 Sep 2021 07:47:57 +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=1632721678; bh=djR/vOtX8165hP/PMfCGWLB3fPb71TNgoQ+mXsFyrQA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QTVhxO40HqKYWdXL37sgJ6AbzSelqf/cZ6Lqh773EABpJSBuUwM0fV7RGp+Wefkzi Rw5krdU5D+ctaCM+xUYL8KVDHb9U/LXl/WlBOXCEnUUdl9/MDMSg3ca+DMN+NjeayN I3lmG9fnd8XsFrE4XKWnglGaWEaAu7sO8jgJywKzwE9++THPfdEHdl9xJ3bcygIR+O 5mdI2SOi0ooqd5b5u9lvg58dWWJCK8/P3MUWgNfFoqQKkzkd+Skj8O0NQkYL8xjvb+ nzbkuY3caNiEoggpa6b866DUiq7bHE6S+L1kvjvlTPXNX36GDrX77iSXkwo7VgpJb2 hoVAuTj63RuwA== Received: by phobos.denx.de (Postfix, from userid 109) id CF6DD8357A; Mon, 27 Sep 2021 07:47:55 +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 05B8A82D50 for ; Mon, 27 Sep 2021 07:47:53 +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 smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (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 4HHs9h6k8YzQjYl; Mon, 27 Sep 2021 07:47:52 +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: <329da2df-3128-8136-eb3d-0a43d81f8235@denx.de> Date: Mon, 27 Sep 2021 07:47:49 +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: 1F81826A 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 Applied to u-boot-marvell/master 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