From: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: netdev@vger.kernel.org, ingrassia@epigenesys.com,
linus.luessing@c0d3.blue, khilman@baylibre.com,
linux-amlogic@lists.infradead.org,
Neil Armstrong <narmstrong@baylibre.com>,
peppe.cavallaro@st.com, alexandre.torgue@st.com
Subject: Re: [RFT net-next v3 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration
Date: Wed, 03 Jan 2018 12:06:43 +0100 [thread overview]
Message-ID: <1514977603.7439.30.camel@baylibre.com> (raw)
In-Reply-To: <CAFBinCAXy+cgju3peA=YBHJReUu=vh8to4UVU5qebN67AZOgPg@mail.gmail.com>
On Sat, 2017-12-30 at 00:40 +0100, Martin Blumenstingl wrote:
> > Maybe this bit 10 is indeed a 5/10 divider, as amlogic claims it is. Maybe, as
> > Emiliano suggested, the output rate of div250 actually needs to be 250Mhz in
> > RGMII, before being divided by 10 to produce the 25MHz of div25
> >
> > IOW, maybe we need this intermediate rate.
>
> I am starting to believe that you (Emiliano and Jerome) are both right
> does anyone of you have access to a scope so we can measure the actual
> clock output?
I wanted to check this out on Gx but the 25M output is not any of the boards I
have (p200, OC2, S400). I should be able to look at the related SoC pad on the
p200 but, I don't know how to enable the GPIOCLK_1 Function 1 in the pinmux
configuration
>
> > It would not be surprising, 1GBps usually requires a 125MHz clock somewhere.
>
> this could mean that two clocks are derived from m250_div (names are
> not final obviously):
> - phy_ref_clk (25MHz or 50MHz)
> - rgmii_tx_clk (fixed divide by 2, 125MHz)
Probably yes.
What we consider in the code as div250 divider is actually described in snip of
doc we have as:
-----
bit 10 : Generate 25MHz clock for PHY
bit 9-7: RMII & RGMII mode:
- 001: clock source is 250MHz
- 010: clock source is 500MHz.
...
-----
1) It kind of shows that the minimum input frequency could be 250M indeed.
2) It is these unclear whether bit 10 is a gate or a divider ... ATM, I can't
check that myself
3) Looks like properly setting up div250 should also be done for RMII.
>
> > This is still doable:
> > * Keep the divider
> > * drop CLK_SET_RATE_PARENT on div25
> > * call set_rate on div250 with 250MHz then on div25 with 25Mhz
>
> yep, I will try this next
> this would also be work with the assumption that the rgmii_tx_clk is
> derived from m250_div
next prev parent reply other threads:[~2018-01-03 11:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-28 22:21 [RFT net-next v3 0/5] dwmac-meson8b: RGMII clock fixes for Meson8b Martin Blumenstingl
2017-12-28 22:21 ` [RFT net-next v3 1/5] net: stmmac: dwmac-meson8b: only configure the clocks in RGMII mode Martin Blumenstingl
2017-12-28 22:21 ` [RFT net-next v3 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names Martin Blumenstingl
2017-12-28 22:21 ` [RFT net-next v3 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration Martin Blumenstingl
2017-12-29 17:57 ` Jerome Brunet
2017-12-29 23:40 ` Martin Blumenstingl
2018-01-03 11:06 ` Jerome Brunet [this message]
2017-12-28 22:21 ` [RFT net-next v3 4/5] net: stmmac: dwmac-meson8b: fix setting the RGMII clock on Meson8b Martin Blumenstingl
2017-12-28 22:21 ` [RFT net-next v3 5/5] net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock Martin Blumenstingl
2017-12-29 1:31 ` [RFT net-next v3 0/5] dwmac-meson8b: RGMII clock fixes for Meson8b Emiliano Ingrassia
2017-12-29 7:48 ` Martin Blumenstingl
2017-12-29 7:52 ` Martin Blumenstingl
2017-12-29 12:04 ` Emiliano Ingrassia
2017-12-29 18:04 ` Jerome Brunet
2017-12-29 23:00 ` Emiliano Ingrassia
2017-12-30 21:02 ` 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=1514977603.7439.30.camel@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=alexandre.torgue@st.com \
--cc=ingrassia@epigenesys.com \
--cc=khilman@baylibre.com \
--cc=linus.luessing@c0d3.blue \
--cc=linux-amlogic@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.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).