All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: Denis Odintsov <shiva@mail.ru>, u-boot@lists.denx.de
Cc: Baruch Siach <baruch@tkos.co.il>, Rabeeh Khoury <rabeeh@solid-run.com>
Subject: Re: [PATCH 1/1] phy: marvell: cp110: Support SATA invert polarity
Date: Mon, 27 Sep 2021 07:44:18 +0200	[thread overview]
Message-ID: <ffebd34f-f5ec-e9a2-501b-e7f0d7a1a720@denx.de> (raw)
In-Reply-To: <20210915134531.49810-1-shiva@mail.ru>

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 <shiva@mail.ru>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Rabeeh Khoury <rabeeh@solid-run.com>
> Cc: Stefan Roese <sr@denx.de>

Reviewed-by: Stefan Roese <sr@denx.de>

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

  reply	other threads:[~2021-09-27  5:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 13:45 [PATCH 1/1] phy: marvell: cp110: Support SATA invert polarity Denis Odintsov
2021-09-27  5:44 ` Stefan Roese [this message]
2021-09-27  5:47 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ffebd34f-f5ec-e9a2-501b-e7f0d7a1a720@denx.de \
    --to=sr@denx.de \
    --cc=baruch@tkos.co.il \
    --cc=rabeeh@solid-run.com \
    --cc=shiva@mail.ru \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.