All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Florian Fainelli <f.fainelli@gmail.com>, <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH v2] net: phy: dp83867: Add TI dp83867 phy
Date: Mon, 8 Jun 2015 09:04:59 -0500	[thread overview]
Message-ID: <5575A10B.8080701@ti.com> (raw)
In-Reply-To: <556FBC3E.8050803@gmail.com>

Florian

Thanks for the re-review

On 06/03/2015 09:47 PM, Florian Fainelli wrote:
> Le 06/02/15 07:34, Dan Murphy a écrit :
>> Add support for the TI dp83867 Gigabit ethernet phy
>> device.
>>
>> The DP83867 is a robust, low power, fully featured
>> Physical Layer transceiver with integrated PMD
>> sublayers to support 10BASE-T, 100BASE-TX and
>> 1000BASE-T Ethernet protocols.
> Sorry for the late feedback, since this is a new driver, things outline
> below can still be submitted as incremental fixes.
>
> [snip]
>
>> +Required properties:
>> +	- reg - The ID number for the phy, usually a small integer
>> +	- ti,rx_int_delay - RGMII Recieve Clock Delay - see dt-bindings/net/ti-dp83867.h
>> +		for applicable values
>> +	- ti,tx_int_delay - RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
>> +		for applicable values
>> +	- ti,fifo_depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
>> +		for applicable values
> We typically use "-" to separate words in DT properties, not "_". I am
> not sure about the required nature of these 3 proprietary/specific
> properties, cannot there be good reset defaults from the HW in any case?

Yes you are correct I will modify as an incremental fix.

The hardware is defaulted to an internal delay of 2 ns.  This value needs to be adjusted
per product based on trace length.  I would anticipate the DT properties to grow a little as the
part gets used more.

> You might want to add a reference to net/phy.txt for the remaiming DT
> properties.
>
> [snip]
>
>> +
>> +	if (phy_interface_is_rgmii(phydev)) {
>> +		ret = phy_write(phydev, MII_DP83867_PHYCTRL,
>> +			(dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));
>> +		if (ret)
>> +			return ret;
>> +	}
>> +
>> +	if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) ||
>> +	    (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
> This one has not been converted to use the phy_interface_is_rgmii()
> helper, but in fact, once you do that, you could probably just add an
> early check for this condition, return, and reduce the indentation for
> the normal case/RGMII, and eliminate two redundant condition checks.

This check is different then the generic RGMII check.  I am checking to see if the interface has the internal
delay flag set.  The RGMII check is to broad.  Maybe I can add a helper for this
if it makes sense thoughts?  Maybe a phy_interface_has_rgmii_int_delay API just to enter this check.

Dan

> Thanks!


-- 
------------------
Dan Murphy

  reply	other threads:[~2015-06-08 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 14:34 [PATCH v2] net: phy: dp83867: Add TI dp83867 phy Dan Murphy
2015-06-04  2:41 ` David Miller
2015-06-04  2:47 ` Florian Fainelli
2015-06-08 14:04   ` Dan Murphy [this message]
2015-06-08 18:03     ` Florian Fainelli

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=5575A10B.8080701@ti.com \
    --to=dmurphy@ti.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.