All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: Add MDIO bus node to PHY binding document
@ 2013-11-11 13:00 ` Jonas Jensen
  0 siblings, 0 replies; 6+ messages in thread
From: Jonas Jensen @ 2013-11-11 13:00 UTC (permalink / raw)
  To: devicetree; +Cc: grant.likely, rob.herring, linux-kernel, Jonas Jensen

Add MDIO bus node segment and update the example,
allowing trivial bindings to break out boilerplate.

Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
---

Notes:
    Changes per reply from Grant [0]
    
    [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/208851.html
    
    Applies to next-20131111

 Documentation/devicetree/bindings/net/phy.txt | 37 +++++++++++++++++++++------
 1 file changed, 29 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index 7cd18fb..4e58a5d 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -1,3 +1,13 @@
+MDIO Bus Nodes
+
+MDIO bus nodes describe an MDIO bus. It is a container for PHY nodes as
+described below.
+
+Required properties:
+- #address-cells = <1>;
+- #size-cells = <0>;
+
+
 PHY nodes
 
 Required properties:
@@ -23,13 +33,24 @@ Optional Properties:
   assume clause 22. The compatible list may also contain other
   elements.
 
+
 Example:
 
-ethernet-phy@0 {
-	compatible = "ethernet-phy-ieee802.3-c22";
-	linux,phandle = <2452000>;
-	interrupt-parent = <40000>;
-	interrupts = <35 1>;
-	reg = <0>;
-	device_type = "ethernet-phy";
-};
+mdio {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	ethernet-phy@0 {
+		device_type = "ethernet-phy";
+		compatible = "...", "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+		interrupts = <24 0>;
+	}
+
+	ethernet-phy@1 {
+		device_type = "ethernet-phy";
+		compatible = "...";
+		reg = <1>;
+		interrupts = <35 1>;
+	}
+}
-- 
1.8.2.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] Documentation: Add MDIO bus node to PHY binding document
@ 2013-11-11 13:00 ` Jonas Jensen
  0 siblings, 0 replies; 6+ messages in thread
From: Jonas Jensen @ 2013-11-11 13:00 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jonas Jensen

Add MDIO bus node segment and update the example,
allowing trivial bindings to break out boilerplate.

Signed-off-by: Jonas Jensen <jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---

Notes:
    Changes per reply from Grant [0]
    
    [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/208851.html
    
    Applies to next-20131111

 Documentation/devicetree/bindings/net/phy.txt | 37 +++++++++++++++++++++------
 1 file changed, 29 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index 7cd18fb..4e58a5d 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -1,3 +1,13 @@
+MDIO Bus Nodes
+
+MDIO bus nodes describe an MDIO bus. It is a container for PHY nodes as
+described below.
+
+Required properties:
+- #address-cells = <1>;
+- #size-cells = <0>;
+
+
 PHY nodes
 
 Required properties:
@@ -23,13 +33,24 @@ Optional Properties:
   assume clause 22. The compatible list may also contain other
   elements.
 
+
 Example:
 
-ethernet-phy@0 {
-	compatible = "ethernet-phy-ieee802.3-c22";
-	linux,phandle = <2452000>;
-	interrupt-parent = <40000>;
-	interrupts = <35 1>;
-	reg = <0>;
-	device_type = "ethernet-phy";
-};
+mdio {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	ethernet-phy@0 {
+		device_type = "ethernet-phy";
+		compatible = "...", "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+		interrupts = <24 0>;
+	}
+
+	ethernet-phy@1 {
+		device_type = "ethernet-phy";
+		compatible = "...";
+		reg = <1>;
+		interrupts = <35 1>;
+	}
+}
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Documentation: Add MDIO bus node to PHY binding document
@ 2013-11-11 14:57   ` Mark Rutland
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2013-11-11 14:57 UTC (permalink / raw)
  To: Jonas Jensen; +Cc: devicetree, grant.likely, rob.herring, linux-kernel

On Mon, Nov 11, 2013 at 01:00:25PM +0000, Jonas Jensen wrote:
> Add MDIO bus node segment and update the example,
> allowing trivial bindings to break out boilerplate.

Hi, I have a couple of (minor) comments.

> 
> Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
> ---
> 
> Notes:
>     Changes per reply from Grant [0]
>     
>     [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/208851.html
>     
>     Applies to next-20131111
> 
>  Documentation/devicetree/bindings/net/phy.txt | 37 +++++++++++++++++++++------
>  1 file changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
> index 7cd18fb..4e58a5d 100644
> --- a/Documentation/devicetree/bindings/net/phy.txt
> +++ b/Documentation/devicetree/bindings/net/phy.txt
> @@ -1,3 +1,13 @@
> +MDIO Bus Nodes
> +
> +MDIO bus nodes describe an MDIO bus. It is a container for PHY nodes as
> +described below.

Jumping between pllural and singular is a bit jarring, and I assume the
node name is important (i.e. it should be named "mdio").

How about something like:

An MDIO bus node describes an MDIO bus, and is a container for PHY nodes
as described below. An MDIO bus node should be named "mdio".

Given it seems that the MDIO node is expected to live under the node for
the MAC, it would be nice to have a statement to that effect here.

> +
> +Required properties:
> +- #address-cells = <1>;
> +- #size-cells = <0>;

It would be nice to say what the address cell represents (the PHY
address on the MDIO bus, I think?). Also this looks like a fragment of
dts rather than a description. How about:

- #address-cells: Should be <1> - the PHY address on the MDIO bus
- #size-cells: Should be <0>

Otherwise, this looks fine to me.

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Documentation: Add MDIO bus node to PHY binding document
@ 2013-11-11 14:57   ` Mark Rutland
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2013-11-11 14:57 UTC (permalink / raw)
  To: Jonas Jensen
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Mon, Nov 11, 2013 at 01:00:25PM +0000, Jonas Jensen wrote:
> Add MDIO bus node segment and update the example,
> allowing trivial bindings to break out boilerplate.

Hi, I have a couple of (minor) comments.

> 
> Signed-off-by: Jonas Jensen <jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> 
> Notes:
>     Changes per reply from Grant [0]
>     
>     [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/208851.html
>     
>     Applies to next-20131111
> 
>  Documentation/devicetree/bindings/net/phy.txt | 37 +++++++++++++++++++++------
>  1 file changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
> index 7cd18fb..4e58a5d 100644
> --- a/Documentation/devicetree/bindings/net/phy.txt
> +++ b/Documentation/devicetree/bindings/net/phy.txt
> @@ -1,3 +1,13 @@
> +MDIO Bus Nodes
> +
> +MDIO bus nodes describe an MDIO bus. It is a container for PHY nodes as
> +described below.

Jumping between pllural and singular is a bit jarring, and I assume the
node name is important (i.e. it should be named "mdio").

How about something like:

An MDIO bus node describes an MDIO bus, and is a container for PHY nodes
as described below. An MDIO bus node should be named "mdio".

Given it seems that the MDIO node is expected to live under the node for
the MAC, it would be nice to have a statement to that effect here.

> +
> +Required properties:
> +- #address-cells = <1>;
> +- #size-cells = <0>;

It would be nice to say what the address cell represents (the PHY
address on the MDIO bus, I think?). Also this looks like a fragment of
dts rather than a description. How about:

- #address-cells: Should be <1> - the PHY address on the MDIO bus
- #size-cells: Should be <0>

Otherwise, this looks fine to me.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Documentation: Add MDIO bus node to PHY binding document
  2013-11-11 13:00 ` Jonas Jensen
  (?)
  (?)
@ 2013-11-13 14:07 ` Jonas Jensen
  2013-12-11  7:11   ` Florian Fainelli
  -1 siblings, 1 reply; 6+ messages in thread
From: Jonas Jensen @ 2013-11-13 14:07 UTC (permalink / raw)
  To: devicetree
  Cc: grant.likely, rob.herring, linux-kernel, mark.rutland, Jonas Jensen

Add MDIO bus node segment and update the example,
allowing trivial bindings to break out boilerplate.

Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
---

Notes:
    Thanks Mark,
    
    This should have the changes from your comments. It also adds optional properties "compatible" and "reg", were those overlooked or left out intentionally?
    
    Changes since v1:
    
    1. reformat "MDIO bus node" description and add, node name should be "mdio"
    2. reformat property descriptions, describe what the cells represent
    3. add optional properties
    4. add a description after "PHY nodes"
    
    Applies to next-20131113

 Documentation/devicetree/bindings/net/phy.txt | 48 ++++++++++++++++++++++-----
 1 file changed, 40 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index 7cd18fb..4179a70 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -1,5 +1,26 @@
+MDIO Bus Nodes
+
+An MDIO bus node describes an MDIO bus, and is a container for PHY nodes
+as described below. An MDIO bus node should be named "mdio".
+
+Required properties:
+
+- #address-cells = Should be <1>, specifies the number of cells needed
+  to encode the PHY address
+- #size-cells = Should be <0>
+
+Optional Properties:
+
+- compatible : Should contain a specific name for the MDIO bus,
+  if known, followed by "-mdio"
+- reg : Should contain register location and length
+
+
 PHY nodes
 
+Describes the PHY chip. A MAC connecting the PHY may use a phandle to
+this node.
+
 Required properties:
 
  - device_type : Should be "ethernet-phy"
@@ -23,13 +44,24 @@ Optional Properties:
   assume clause 22. The compatible list may also contain other
   elements.
 
+
 Example:
 
-ethernet-phy@0 {
-	compatible = "ethernet-phy-ieee802.3-c22";
-	linux,phandle = <2452000>;
-	interrupt-parent = <40000>;
-	interrupts = <35 1>;
-	reg = <0>;
-	device_type = "ethernet-phy";
-};
+mdio {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	ethernet-phy@0 {
+		device_type = "ethernet-phy";
+		compatible = "...", "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+		interrupts = <24 0>;
+	}
+
+	ethernet-phy@1 {
+		device_type = "ethernet-phy";
+		compatible = "...";
+		reg = <1>;
+		interrupts = <35 1>;
+	}
+}
-- 
1.8.2.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] Documentation: Add MDIO bus node to PHY binding document
  2013-11-13 14:07 ` [PATCH v2] " Jonas Jensen
@ 2013-12-11  7:11   ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2013-12-11  7:11 UTC (permalink / raw)
  To: Jonas Jensen
  Cc: devicetree, grant.likely, rob.herring, linux-kernel,
	mark.rutland, netdev

Le mercredi 13 novembre 2013, 15:07:49 Jonas Jensen a écrit :
> Add MDIO bus node segment and update the example,
> allowing trivial bindings to break out boilerplate.
> 
> Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
> ---
> 
> Notes:
>     Thanks Mark,
> 
>     This should have the changes from your comments. It also adds optional
> properties "compatible" and "reg", were those overlooked or left out
> intentionally?

Please CC netdev@vger.kernel.org too as there might be some interest from 
networking folks not actively following devicetree-discuss.

This does looks good to me, there is not much to be said to the point where I 
wonder if this even deserves such an example, but it cannot hurt.

> 
>     Changes since v1:
> 
>     1. reformat "MDIO bus node" description and add, node name should be
> "mdio" 2. reformat property descriptions, describe what the cells represent
> 3. add optional properties
>     4. add a description after "PHY nodes"
> 
>     Applies to next-20131113
> 
>  Documentation/devicetree/bindings/net/phy.txt | 48
> ++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 8
> deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/phy.txt
> b/Documentation/devicetree/bindings/net/phy.txt index 7cd18fb..4179a70
> 100644
> --- a/Documentation/devicetree/bindings/net/phy.txt
> +++ b/Documentation/devicetree/bindings/net/phy.txt
> @@ -1,5 +1,26 @@
> +MDIO Bus Nodes
> +
> +An MDIO bus node describes an MDIO bus, and is a container for PHY nodes
> +as described below. An MDIO bus node should be named "mdio".
> +
> +Required properties:
> +
> +- #address-cells = Should be <1>, specifies the number of cells needed
> +  to encode the PHY address
> +- #size-cells = Should be <0>
> +
> +Optional Properties:
> +
> +- compatible : Should contain a specific name for the MDIO bus,
> +  if known, followed by "-mdio"
> +- reg : Should contain register location and length
> +
> +
>  PHY nodes
> 
> +Describes the PHY chip. A MAC connecting the PHY may use a phandle to
> +this node.
> +
>  Required properties:
> 
>   - device_type : Should be "ethernet-phy"
> @@ -23,13 +44,24 @@ Optional Properties:
>    assume clause 22. The compatible list may also contain other
>    elements.
> 
> +
>  Example:
> 
> -ethernet-phy@0 {
> -	compatible = "ethernet-phy-ieee802.3-c22";
> -	linux,phandle = <2452000>;
> -	interrupt-parent = <40000>;
> -	interrupts = <35 1>;
> -	reg = <0>;
> -	device_type = "ethernet-phy";
> -};
> +mdio {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +
> +	ethernet-phy@0 {
> +		device_type = "ethernet-phy";
> +		compatible = "...", "ethernet-phy-ieee802.3-c22";
> +		reg = <0>;
> +		interrupts = <24 0>;
> +	}
> +
> +	ethernet-phy@1 {
> +		device_type = "ethernet-phy";
> +		compatible = "...";
> +		reg = <1>;
> +		interrupts = <35 1>;
> +	}
> +}

-- 
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-11  7:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 13:00 [PATCH] Documentation: Add MDIO bus node to PHY binding document Jonas Jensen
2013-11-11 13:00 ` Jonas Jensen
2013-11-11 14:57 ` Mark Rutland
2013-11-11 14:57   ` Mark Rutland
2013-11-13 14:07 ` [PATCH v2] " Jonas Jensen
2013-12-11  7:11   ` Florian Fainelli

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.