All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Vokáč" <michal.vokac@ysoft.com>
To: Vinod Koul <vkoul@kernel.org>, David S Miller <davem@davemloft.net>
Cc: linux-arm-msm@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	netdev@vger.kernel.org, Niklas Cassel <niklas.cassel@linaro.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH] net: dsa: qca8k: Enable delay for RGMII_ID mode
Date: Mon, 18 Feb 2019 14:35:53 +0100	[thread overview]
Message-ID: <d930360c-b49d-23f8-7887-f0550d81b118@ysoft.com> (raw)
In-Reply-To: <20190218130352.9373-1-vkoul@kernel.org>

On 18. 02. 19 14:03, Vinod Koul wrote:
> RGMII_ID specifies that we should have internal delay, so resurrect the
> delay addition routine but under the RGMII_ID mode.
> 
> Fixes: 40269aa9f40a ("net: dsa: qca8k: disable delay for RGMII mode")
> Signed-off-by: Vinod Koul <vkoul@kernel.org>

Fixes the problem on my imx6dl platform with QCA8334 switch.
Thank you!

Tested-by: Michal Vokáč <michal.vokac@ysoft.com>

> ---
>   drivers/net/dsa/qca8k.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index a4b6cda38016..aa1f7f1b20d3 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -443,6 +443,18 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode)
>   		val = QCA8K_PORT_PAD_RGMII_EN;
>   		qca8k_write(priv, reg, val);
>   		break;
> +	case PHY_INTERFACE_MODE_RGMII_ID:
> +		/* RGMII_ID needs internal delay. This is enabled through
> +		 * PORT5_PAD_CTRL for all ports, rather than individual port
> +		 * registers
> +		 */
> +		qca8k_write(priv, reg,
> +			    QCA8K_PORT_PAD_RGMII_EN |
> +			    QCA8K_PORT_PAD_RGMII_TX_DELAY(3) |
> +			    QCA8K_PORT_PAD_RGMII_RX_DELAY(3));
> +		qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL,
> +			    QCA8K_PORT_PAD_RGMII_RX_DELAY_EN);
> +		break;
>   	case PHY_INTERFACE_MODE_SGMII:
>   		qca8k_write(priv, reg, QCA8K_PORT_PAD_SGMII_EN);
>   		break;
> 

  parent reply	other threads:[~2019-02-18 13:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 13:03 [PATCH] net: dsa: qca8k: Enable delay for RGMII_ID mode Vinod Koul
2019-02-18 13:33 ` Andrew Lunn
2019-02-19  4:59   ` Vinod Koul
2019-02-18 13:35 ` Michal Vokáč [this message]
2019-02-18 13:36 ` Andrew Lunn
2019-02-19  5:00   ` Vinod Koul

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=d930360c-b49d-23f8-7887-f0550d81b118@ysoft.com \
    --to=michal.vokac@ysoft.com \
    --cc=andrew@lunn.ch \
    --cc=bjorn.andersson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.cassel@linaro.org \
    --cc=vkoul@kernel.org \
    /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.