From: Andrew Lunn <andrew@lunn.ch>
To: "Biao Huang (黄彪)" <Biao.Huang@mediatek.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peppe.cavallaro@st.com" <peppe.cavallaro@st.com>,
"joabreu@synopsys.com" <joabreu@synopsys.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
"alexandre.torgue@foss.st.com" <alexandre.torgue@foss.st.com>,
"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"richardcochran@gmail.com" <richardcochran@gmail.com>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"Macpaul Lin (林智斌)" <Macpaul.Lin@mediatek.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v5 1/2] stmmac: dwmac-mediatek: enable 2ns delay only for special cases
Date: Mon, 26 Dec 2022 16:19:20 +0100 [thread overview]
Message-ID: <Y6m7eNdWVL3IKFj2@lunn.ch> (raw)
In-Reply-To: <4a82aa5437e496e2b65b77ef08d7897a4b23f7e5.camel@mediatek.com>
> We don't want to restrict phy-mode to rgmii-id only, so I don't think
> we need mask RXID bit, then, User can use rgmii-rxid/-txid/-id as their
> will.
The phy-mode is a property of the board. It describes what delays are
required, in addition to what the board itself provides via extra long
lines. As such, there is no choice, it is set by physics.
How you implement those delays is then up to the MAC and PHY. 95% of
all MAC drivers simply pass phy-mode to the PHY and let the PHY add
the delays. The Renesas MAC driver is one of the exceptions, it often
adds the delays, and then passes a different phy-mode to the PHY in
order that there are not double delays.
So you can be different to everybody else, have MAC do one delay, and
the PHY do the other. Just be aware that nobody else does this, no DT
developers will expect it, etc.
Or you can just do what everybody else does and let the PHY add the
delays.
What some MACs do is implement rx-internal-delay-ps and
tx-internal-delay-ps These allow fine tuning of the delays. These are
expected to be small values, adding 10s or 100s of pico seconds. They
are not expected to be 2000ps.
Andrew
next prev parent reply other threads:[~2022-12-26 15:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 1:50 [PATCH v5 0/2] arm64: dts: mt8195: Add Ethernet controller Biao Huang
2022-12-23 1:50 ` [PATCH v5 1/2] stmmac: dwmac-mediatek: enable 2ns delay only for special cases Biao Huang
2022-12-23 9:24 ` AngeloGioacchino Del Regno
2022-12-23 14:18 ` Andrew Lunn
2022-12-26 3:50 ` Biao Huang (黄彪)
2022-12-26 15:19 ` Andrew Lunn [this message]
2022-12-27 7:09 ` Biao Huang (黄彪)
2022-12-27 16:20 ` Andrew Lunn
2022-12-28 6:22 ` Biao Huang (黄彪)
2022-12-28 16:00 ` Andrew Lunn
2022-12-29 0:37 ` Biao Huang (黄彪)
2022-12-23 1:50 ` [PATCH v5 2/2] arm64: dts: mt8195: Add Ethernet controller Biao Huang
2022-12-23 9:24 ` AngeloGioacchino Del Regno
2022-12-28 6:23 ` Biao Huang (黄彪)
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=Y6m7eNdWVL3IKFj2@lunn.ch \
--to=andrew@lunn.ch \
--cc=Biao.Huang@mediatek.com \
--cc=Macpaul.Lin@mediatek.com \
--cc=alexandre.torgue@foss.st.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).