From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Rob Herring <robherring2@gmail.com>
Cc: netdev@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Landley <rob@landley.net>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH] DT: net: document Ethernet bindings in one place
Date: Tue, 21 Jan 2014 00:45:27 +0300 [thread overview]
Message-ID: <52DD98F7.4090202@cogentembedded.com> (raw)
In-Reply-To: <CAL_Jsq+oa9P=rh+p-dMZyGP8TcmpX7bTnMU0ynLvFxjxFDYbRg@mail.gmail.com>
On 01/20/2014 05:06 PM, Rob Herring wrote:
>> This patch is an attempt to gather the Ethernet related bindings in one file,
>> like it's done in the MMC and some other subsystems. It should save the trouble
>> of documenting several properties over and over in each binding document.
>> I have used the Embedded Power Architecture(TM) Platform Requirements (ePAPR)
>> standard as a base for the properties description, also documenting some ad-hoc
>> properties that have been introduced over time despite having direct analogs in
>> ePAPR.
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> ---
>> The patch is against DaveM's 'net-next.git' repo and the DaVinci EMAC bindings
>> fix I've posted yesterday:
>> http://patchwork.ozlabs.org/patch/311854/
[...]
>> Index: net-next/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
>> ===================================================================
>> --- net-next.orig/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
>> +++ net-next/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
>> @@ -4,13 +4,8 @@ Required properties:
>> - compatible: should be "allwinner,sun4i-emac".
>> - reg: address and length of the register set for the device.
>> - interrupts: interrupt for the device
>> -- phy: A phandle to a phy node defining the PHY address (as the reg
>> - property, a single integer).
>> - clocks: A phandle to the reference clock for this device
>> -Optional properties:
>> -- (local-)mac-address: mac address to be used by this driver
>> -
> You should reference that this binding uses the common ethernet binding doc.
Oh, I was hoping to avoid that like MMC subsys mostly managed to do (most
MMC specific properties are only described once, without outside references to
mmc.txt). OTOH, the MMC bindings handling is mostly centralized in the core
code, while the Ethernet one is not, so you're probably right here...
>> Index: net-next/Documentation/devicetree/bindings/net/ethernet.txt
>> ===================================================================
>> --- /dev/null
>> +++ net-next/Documentation/devicetree/bindings/net/ethernet.txt
>> @@ -0,0 +1,20 @@
>> +The following properties are common to the Ethernet controllers:
>> +
>> +- local-mac-address: array of 6 bytes, specifies the MAC address that was
>> + assigned to the network device;
>> +- mac-address: array of 6 bytes, specifies the MAC address that was last used by
>> + the boot program; should be used in cases where the MAC address assigned to
>> + the device by the boot program is different from the "local-mac-address"
>> + property;
>> +- max-speed: number, specifies maximum speed in Mbit/s supported by the device;
>> +- phy-mode: string, operation mode of the PHY interface; supported values are
>> + "mii", "gmii", "sgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id",
>> + "rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii";
> Mark this as deprecated
That's kind of wishful thinking at this point, as that's what the majority
of drivers use. I'm unsure of the reasons why that was done, probably people
just didn't read the proper specs...
> in favor of phy-connection-type
That one is only used by the oldish PowerPC 'gianfar' driver.
> so it's use does not spread.
I'm afraid that's too late, it has spread very far, so that
of_get_phy_mode() handles that property, not "phy-connection-type".
>> +- phy-connection-type: the same as "phy-mode" property (but described in ePAPR);
>> +- phy-handle: phandle, specifies a reference to a node representing a PHY
>> + device (this property is described in ePAPR);
>> +- phy: the same as "phy-handle" property (but actually ad-hoc one).
> Mark this as deprecated in favor of phy-handle.
Here situation is more optimistic. Quite many drivers still use
"phy-handle", though some use even more exotic props I didn't document here.
WBR, Sergei
next prev parent reply other threads:[~2014-01-20 21:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-18 1:05 [PATCH] DT: net: document Ethernet bindings in one place Sergei Shtylyov
[not found] ` < CAL_Jsq+oa9P=rh+p-dMZyGP8TcmpX7bTnMU0ynLvFxjxFDYbRg@mail.gmail.com>
[not found] ` < 52DD98F7.4090202@cogentembedded.com>
[not found] ` < CAL_JsqJXbF1-PcPHR2VP+Vi9A1aWizdsG_r3kDvRt3itXDhCGQ@mail.gmail.com>
[not found] ` < CAGVrzcb3X3soJNJCE5+YSpQrr+EdycCRFkptPvBCgFg4CbGJ4Q@mail.gmail.com>
[not found] ` < CAGVrzcb0dfw1orZzUt5-YkShOg-HNbUYvvo2vfmsZUZXy1Aqfg@mail.gmail.com>
2014-01-20 14:06 ` Rob Herring
2014-01-20 21:45 ` Sergei Shtylyov [this message]
2014-01-20 21:20 ` Rob Herring
2014-01-20 23:33 ` Sergei Shtylyov
2014-01-21 19:56 ` Florian Fainelli
2014-01-21 20:05 ` Florian Fainelli
2014-01-21 21:19 ` Sergei Shtylyov
2014-01-29 23:04 ` Sergei Shtylyov
2014-02-04 17:26 ` Grant Likely
2014-02-04 18:40 ` Sergei Shtylyov
2014-02-05 12:08 ` Grant Likely
[not found] ` < 52F25A63.3010608@cogentembedded.com>
2014-02-05 15:36 ` Sergei Shtylyov
2014-02-06 9:43 ` Grant Likely
2014-02-06 14:06 ` Sergei Shtylyov
2014-02-10 22:05 ` Grant Likely
[not found] ` <20140210220541.C7A56C408F7-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-02-14 23:05 ` Sergei Shtylyov
2014-01-22 1:30 ` Rob Herring
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=52DD98F7.4090202@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-doc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.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).