[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c5f12cd.37b0.1982ada38e5.Coremail.lizhi2@eswincomputing.com>
Date: Mon, 21 Jul 2025 10:40:01 +0800 (GMT+08:00)
From: 李志 <lizhi2@...incomputing.com>
To: "Andrew Lunn" <andrew@...n.ch>
Cc: weishangjuan@...incomputing.com, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, mcoquelin.stm32@...il.com,
alexandre.torgue@...s.st.com, rmk+kernel@...linux.org.uk,
yong.liang.choong@...ux.intel.com, vladimir.oltean@....com,
jszhang@...nel.org, jan.petrous@....nxp.com,
prabhakar.mahadev-lad.rj@...renesas.com, inochiama@...il.com,
boon.khai.ng@...era.com, dfustini@...storrent.com, 0x1207@...il.com,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, ningyu@...incomputing.com,
linmin@...incomputing.com, pinkesh.vaghela@...fochips.com
Subject: Re: Re: Re: [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet
driver
Dear Andrew Lunn,
Thank you for your professional and valuable suggestions.
Our questions are embedded below your comments in the original email below.
Best regards,
Li Zhi
Eswin Computing
> -----原始邮件-----
> 发件人: "Andrew Lunn" <andrew@...n.ch>
> 发送时间:2025-07-15 21:09:17 (星期二)
> 收件人: 李志 <lizhi2@...incomputing.com>
> 抄送: weishangjuan@...incomputing.com, andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org, netdev@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, mcoquelin.stm32@...il.com, alexandre.torgue@...s.st.com, rmk+kernel@...linux.org.uk, yong.liang.choong@...ux.intel.com, vladimir.oltean@....com, jszhang@...nel.org, jan.petrous@....nxp.com, prabhakar.mahadev-lad.rj@...renesas.com, inochiama@...il.com, boon.khai.ng@...era.com, dfustini@...storrent.com, 0x1207@...il.com, linux-stm32@...md-mailman.stormreply.com, linux-arm-kernel@...ts.infradead.org, ningyu@...incomputing.com, linmin@...incomputing.com, pinkesh.vaghela@...fochips.com
> 主题: Re: Re: [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet driver
>
> > > > + dwc_priv->dly_param_1000m[0] = EIC7700_DELAY_VALUE0;
> > > > + dwc_priv->dly_param_1000m[1] = EIC7700_DELAY_VALUE1;
> > > > + dwc_priv->dly_param_1000m[2] = EIC7700_DELAY_VALUE0;
> > > > + dwc_priv->dly_param_100m[0] = EIC7700_DELAY_VALUE0;
> > > > + dwc_priv->dly_param_100m[1] = EIC7700_DELAY_VALUE1;
> > > > + dwc_priv->dly_param_100m[2] = EIC7700_DELAY_VALUE0;
> > > > + dwc_priv->dly_param_10m[0] = 0x0;
> > > > + dwc_priv->dly_param_10m[1] = 0x0;
> > > > + dwc_priv->dly_param_10m[2] = 0x0;
> > >
> > > What are the three different values for?
> > >
> >
> > Let me clarify the purpose of the three elements in each dly_param_* array:
> > dly_param_[x][0]: Delay configuration for TXD signals
> > dly_param_[x][1]: Delay configuration for control signals (e.g., TX_EN, RX_DV, RX_CLK)
> > dly_param_[x][2]: Delay configuration for RXD signals
>
> Maybe add a #define or an enum for the index.
>
> Do these delays represent the RGMII 2ns delay?
>
Yes, these delays refer to the RGMII delay, but they are not strictly 2ns. There are a few points that require further clarification:
1. Regarding delay configuration logic:
As you mentioned in version V2, rx-internal-delay-ps and tx-internal-delay-ps will be mapped to and overwrite the corresponding bits in the EIC7700_DELAY_VALUE1 register, which controls the rx_clk and tx_clk delays. Is this understanding and approach correct and feasible?
2. About the phy-mode setting:
In our platform, the internal delays are provided by the MAC. When configuring rx-internal-delay-ps and tx-internal-delay-ps in the device tree, is it appropriate to set phy-mode = "rgmii-id" in this case?
3. Delay values being greater than 2ns:
In our platform, the optimal delay values for rx_clk and tx_clk are determined based on the board-level timing adjustment, and both are greater than 2ns. Given this, is it reasonable and compliant with the RGMII specification to set both rx-internal-delay-ps and tx-internal-delay-ps to values greater than 2ns in the Device Tree?
> > > {
> > > > + eic7700_set_delay(dwc_priv->rx_delay_ps, dwc_priv->tx_delay_ps,
> > > > + &dwc_priv->dly_param_1000m[1]);
> > > > + eic7700_set_delay(dwc_priv->rx_delay_ps, dwc_priv->tx_delay_ps,
> > > > + &dwc_priv->dly_param_100m[1]);
> > > > + eic7700_set_delay(dwc_priv->rx_delay_ps, dwc_priv->tx_delay_ps,
> > > > + &dwc_priv->dly_param_10m[1]);
> > > > + } else {
> > > > + dev_dbg(&pdev->dev, " use default dly\n");
> > >
> > > What is the default? It should be 0ps. So there is no point printing
> > > this message.
> > >
> >
> > The default value is EIC7700_DELAY_VALUE1
>
> But what does EIC7700_DELAY_VALUE1 mean? It should mean 0ps? But i'm
> not sure it does.
>
There is a question that needs clarification:
The EIC7700_DELAY_VALUE0 and EIC7700_DELAY_VALUE1 registers contain the optimal delay configurations determined through board-level phase adjustment. Therefore, they are also used as the default values in our platform. If the default delay is set to 0ps, the Ethernet interface may fail to function correctly in our platform.
> Andrew
Powered by blists - more mailing lists