From: Andrew Lunn <andrew@lunn.ch>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Vinod Koul <vkoul@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [BISECTED, REGRESSION] Broken networking on MIPS/OCTEON EdgeRouter Lite
Date: Sun, 24 Mar 2019 21:17:34 +0100 [thread overview]
Message-ID: <20190324201734.GC7782@lunn.ch> (raw)
In-Reply-To: <20190322214120.GB29013@darkstar.musicnaut.iki.fi>
On Fri, Mar 22, 2019 at 11:41:20PM +0200, Aaro Koskinen wrote:
> Hi,
>
> On Fri, Mar 22, 2019 at 10:25:57PM +0100, Andrew Lunn wrote:
> > > The OCTEON HW code knows only about RGMII. And looking at
> > > octeon ethernet staging driver it does phy connect always with
> > > PHY_INTERFACE_MODE_GMII. I did some experimentation, and it seems that
> > > with PHY_INTERFACE_MODE_RGMII_RXID it starts to work.. In the DT we have
> > > for ethernet for this board:
> > >
> > > rx-delay = <0>;
> > > tx-delay = <0x10>;
> >
> > These are not PHY properties.
> >
> > Looking at the code, it looks like these control delays the MAC
> > inserts. I don't see a binding document for these properties, so i've
> > no idea what 0x10 means. Before this driver moves out of staging,
> > these values should be changed to be in ns.
>
> Documentation/devicetree/bindings/net/cavium-pip.txt
Hi Aaro
Ah, sorry, missed that.
- rx-delay: Delay value for RGMII receive clock. Optional. Disabled if 0.
Value range is 1-31, and mapping to the actual delay varies depending on HW.
- tx-delay: Delay value for RGMII transmit clock. Optional. Disabled if 0.
Value range is 1-31, and mapping to the actual delay varies depending on HW.
I'm surprised this made it passed review. We try to avoid having DT
poke magic values into registers. That is what this appears to be,
since it is unclear what the value actually means.
It is also good to state what happens if the property is not
present. It often means it defaults to zero. But this implementation
just leaves the value alone. So to be on the safe side, the DT blob
should probably have these properties, so the behaviour is well
defined.
Andrew
next prev parent reply other threads:[~2019-03-24 20:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 0:21 [BISECTED, REGRESSION] Broken networking on MIPS/OCTEON EdgeRouter Lite Aaro Koskinen
2019-03-22 6:45 ` Vinod Koul
2019-03-22 20:50 ` Aaro Koskinen
2019-03-22 21:25 ` Andrew Lunn
2019-03-22 21:41 ` Aaro Koskinen
2019-03-24 20:17 ` Andrew Lunn [this message]
2019-03-25 19:30 ` Aaro Koskinen
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=20190324201734.GC7782@lunn.ch \
--to=andrew@lunn.ch \
--cc=aaro.koskinen@iki.fi \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=netdev@vger.kernel.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 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).