netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Trent Piepho <tpiepho@impinj.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net-next v2 4/8] net: phy: dp83867: Rework delay rgmii delay handling
Date: Wed, 22 May 2019 20:54:00 +0200	[thread overview]
Message-ID: <20190522185400.GB7281@lunn.ch> (raw)
In-Reply-To: <20190522184255.16323-4-tpiepho@impinj.com>

On Wed, May 22, 2019 at 06:43:23PM +0000, Trent Piepho wrote:
> The code was assuming the reset default of the delay control register
> was to have delay disabled.  This is what the datasheet shows as the
> register's initial value.  However, that's not actually true: the
> default is controlled by the PHY's pin strapping.
> 
> If the interface mode is selected as RX or TX delay only, insure the
> other direction's delay is disabled.
> 
> If the interface mode is just "rgmii", with neither TX or RX internal
> delay, one might expect that the driver should disable both delays.  But
> this is not what the driver does.  It leaves the setting at the PHY's
> strapping's default.  And that default, for no pins with strapping
> resistors, is to have delay enabled and 2.00 ns.
> 
> Rather than change this behavior, I've kept it the same and documented
> it.  No delay will most likely not work and will break ethernet on any
> board using "rgmii" mode.  If the board is strapped to have a delay and
> is configured to use "rgmii" mode a warning is generated that "rgmii-id"
> should have been used.
> 
> Also validate the delay values and fail if they are not in range.
> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Trent Piepho <tpiepho@impinj.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2019-05-22 18:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 18:43 [PATCH net-next v2 1/8] dt-bindings: phy: dp83867: Describe how driver behaves w.r.t rgmii delay Trent Piepho
2019-05-22 18:43 ` [PATCH net-next v2 2/8] dt-bindings: phy: dp83867: Add documentation for disabling clock output Trent Piepho
2019-05-22 19:11   ` Andrew Lunn
2019-05-23  0:44   ` David Miller
2019-05-22 18:43 ` [PATCH net-next v2 3/8] net: phy: dp83867: Add ability to disable output clock Trent Piepho
2019-05-22 18:51   ` Andrew Lunn
2019-05-23  0:44   ` David Miller
2019-05-22 18:43 ` [PATCH net-next v2 4/8] net: phy: dp83867: Rework delay rgmii delay handling Trent Piepho
2019-05-22 18:54   ` Andrew Lunn [this message]
2019-05-23  0:44   ` David Miller
2019-05-22 18:43 ` [PATCH net-next v2 5/8] net: phy: dp83867: Use unsigned variables to store unsigned properties Trent Piepho
2019-05-22 18:59   ` Andrew Lunn
2019-05-23  0:44   ` David Miller
2019-05-22 18:43 ` [PATCH net-next v2 6/8] net: phy: dp83867: IO impedance is not dependent on RGMII delay Trent Piepho
2019-05-22 19:03   ` Andrew Lunn
2019-05-23  0:44   ` David Miller
2019-05-22 18:43 ` [PATCH net-next v2 7/8] net: phy: dp83867: Validate FIFO depth property Trent Piepho
2019-05-22 19:05   ` Andrew Lunn
2019-05-23  0:44   ` David Miller
2019-05-22 18:43 ` [PATCH net-next v2 8/8] net: phy: dp83867: Allocate state struct in probe Trent Piepho
2019-05-22 19:09   ` Andrew Lunn
2019-05-23  0:44   ` David Miller
2019-05-22 19:10 ` [PATCH net-next v2 1/8] dt-bindings: phy: dp83867: Describe how driver behaves w.r.t rgmii delay Andrew Lunn
2019-05-23  0:43 ` David Miller

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=20190522185400.GB7281@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tpiepho@impinj.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).