From: Andrew Lunn <andrew@lunn.ch>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: netdev@vger.kernel.org, linux-amlogic@lists.infradead.org,
alexandre.torgue@st.com, linux-kernel@vger.kernel.org,
linux@armlinux.org.uk, joabreu@synopsys.com, kuba@kernel.org,
peppe.cavallaro@st.com, davem@davemloft.net,
linux-arm-kernel@lists.infradead.org
Subject: Re: RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b
Date: Sat, 26 Sep 2020 16:45:13 +0200 [thread overview]
Message-ID: <20200926144513.GD3850848@lunn.ch> (raw)
In-Reply-To: <CAFBinCAc2-QV3E8P4gk+7Lq0ushH08UoZ0tQ8ACEoda-D8oaWg@mail.gmail.com>
> I checked this again for the vendor u-boot (where Ethernet is NOT
> working) as well as the Android kernel which this board was shipped
> with (where Ethernet is working)
> - in u-boot the MAC side adds a 2ns TX delay and the PHY side adds a
> 2ns RX delay
So that suggest there is nothing on the PCB. It is all down to MAC and
PHY adding delays.
> yes, there's only one calibration value
> the reference code is calculating the calibration setting for four
> configuration variants:
> - 2ns TX delay on the MAC side, no RX or TX delay on the PHY side, RGMII RX_CLK not inverted
> - 2ns TX delay on the MAC side, no RX or TX delay on the PHY side, RGMII RX_CLK inverted
> - 2ns TX delay on the MAC side, 2ns RX delay on the PHY side, RGMII RX_CLK not inverted
> - 2ns TX delay on the MAC side, 2ns RX delay on the PHY side, RGMII RX_CLK inverted
>
> now that I'm writing this, could it be a calibration of the RX_CLK
> signal?
Yes, seems like it. Which of these four does it end up using? I'm
guessing the 3rd?
So i would forget about configuration clock inversion. Hard code it to
whatever works. It is not something you see other MAC/PHY combinations
allow to configure.
I think you said a value of 0x2 works. I wonder if that corresponds to
something slightly larger than 0ns if option 3 is being used?
> In the meantime Amlogic's "hacked" PHY driver is also using these registers: [0]
> So I assume that I'm doing the right thing in the Realtek PHY driver
Thanks for confirming this. No need to check for the resistors.
Andrew
next prev parent reply other threads:[~2020-09-26 14:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 21:47 RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b Martin Blumenstingl
2020-09-25 22:03 ` Vladimir Oltean
2020-09-25 22:15 ` Martin Blumenstingl
2020-09-25 22:46 ` Vladimir Oltean
2020-09-25 22:14 ` Andrew Lunn
2020-09-25 22:39 ` Martin Blumenstingl
2020-09-26 0:41 ` Andrew Lunn
2020-09-26 8:30 ` Martin Blumenstingl
2020-09-26 14:45 ` Andrew Lunn [this message]
2020-09-28 20:23 ` Martin Blumenstingl
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=20200926144513.GD3850848@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=martin.blumenstingl@googlemail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/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).