All of lore.kernel.org
 help / color / mirror / Atom feed
* [bindings][PATCH] bindings/net: DPAA Backplane Device Bindings
@ 2018-11-06 11:48 Florinel Iordache
  2018-11-06 13:29 ` Andrew Lunn
  2018-11-12 18:10 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Florinel Iordache @ 2018-11-06 11:48 UTC (permalink / raw)
  To: robh+dt, mark.rutland, broonie, horms+renesas, geert+renesas,
	linus.walleij
  Cc: devicetree, davem, netdev, linux-kernel, Florinel Iordache

Device Tree Bindings for DPAA backplane available on Layerscape
 communications processors.

Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
---
 .../devicetree/bindings/net/dpaa-backplane.txt     | 105 +++++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dpaa-backplane.txt

diff --git a/Documentation/devicetree/bindings/net/dpaa-backplane.txt b/Documentation/devicetree/bindings/net/dpaa-backplane.txt
new file mode 100644
index 0000000..f147c84
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dpaa-backplane.txt
@@ -0,0 +1,105 @@
+=============================================================================
+DPAA Backplane Device Bindings
+
+CONTENTS
+  - SerDes Node
+  - PCS Phy Node
+
+=============================================================================
+SerDes Node
+
+DESCRIPTION
+
+SerDes (Serializer/Deserializer) HW peripheral
+
+PROPERTIES
+
+- compatible
+		Usage: required
+		Value type: <stringlist>
+		Definition: Specifies the type of SerDes.
+		Must include the prefix "fsl,serdes"
+		SerDes can be of different types:
+		- 10G SerDes must be specified as: "fsl,serdes-10g"
+		- 28G SerDes must be specified as: "fsl,serdes-28g"
+
+- reg
+		Usage: required
+		Value type: <prop-encoded-array>
+		Definition: Specifies the offset of the SerDes configuration registers
+
+- little-endian
+		Usage: optional
+		Value type: <Boolean>
+		Definition: Specifies endianness access to SerDes registers.
+		If omitted, big-endian will be used
+		See common-properties.txt for complete definition
+
+EXAMPLE
+
+Example of 10G SerDes node:
+
+serdes1: serdes@1ea0000 {
+		compatible = "fsl,serdes-10g";
+		reg = <0x0 0x1ea0000 0 0x00002000>;
+		little-endian;
+};
+
+=============================================================================
+PCS Phy Node
+
+DESCRIPTION
+
+PCS Phy (Physical Coding Sublayer / Physical layer) node
+
+PROPERTIES
+
+- compatible
+		Usage: required
+		Value type: <stringlist>
+		Definition: A standard property. Specifies the IEEE 802.3 Clause
+		Different IEEE 802.3 Clauses can be specified:
+		- Clause 22 must be specified as: "ethernet-phy-ieee802.3-c22"
+		- Clause 45 must be specified as: "ethernet-phy-ieee802.3-c45"
+		For complete definition see:
+		Documentation/devicetree/bindings/net/phy.txt
+
+- reg
+		Usage: required
+		Value type: <prop-encoded-array>
+		Definition: A standard property.
+		Specifies the offset of the PCS Phy configuration registers
+		For complete definition see:
+		Documentation/devicetree/bindings/net/phy.txt
+
+- backplane-mode
+		Usage: required
+		Value type: <stringlist>
+		Definition: Specifies the speed and type of the protocol used
+		Different speeds and backplane protocol types can be used:
+		- 10GBase-KR must be specified as: "10gbase-kr"
+		- 40GBase-KR must be specified as: "40gbase-kr"
+
+- fsl,lane-handle
+		Usage: required
+		Value type: <phandle>
+		Definition: Specifies the reference to a node representing the SerDes
+		device
+
+- fsl,lane-reg
+		Usage: required
+		Value type: <prop-encoded-array>
+		Definition: Specifies the offsets of the SerDes lanes configuration
+		registers
+
+EXAMPLE
+
+Example of pcs phy node for 10GBase-KR:
+
+pcs_phy1: ethernet-phy@0 {
+	compatible = "ethernet-phy-ieee802.3-c45";
+	backplane-mode = "10gbase-kr";
+	reg = <0x0>;
+	fsl,lane-handle = <&serdes1>;
+	fsl,lane-reg = <0xE00>; /* lane G */
+};
-- 
1.9.1


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

* Re: [bindings][PATCH] bindings/net: DPAA Backplane Device Bindings
  2018-11-06 11:48 [bindings][PATCH] bindings/net: DPAA Backplane Device Bindings Florinel Iordache
@ 2018-11-06 13:29 ` Andrew Lunn
  2018-11-12 18:10 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2018-11-06 13:29 UTC (permalink / raw)
  To: Florinel Iordache
  Cc: robh+dt, mark.rutland, broonie, horms+renesas, geert+renesas,
	linus.walleij, devicetree, davem, netdev, linux-kernel

On Tue, Nov 06, 2018 at 11:48:30AM +0000, Florinel Iordache wrote:
> Device Tree Bindings for DPAA backplane available on Layerscape
>  communications processors.
> 
> Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
> ---
>  .../devicetree/bindings/net/dpaa-backplane.txt     | 105 +++++++++++++++++++++
>  1 file changed, 105 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/dpaa-backplane.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/dpaa-backplane.txt b/Documentation/devicetree/bindings/net/dpaa-backplane.txt
> new file mode 100644
> index 0000000..f147c84
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dpaa-backplane.txt
> @@ -0,0 +1,105 @@
> +=============================================================================
> +DPAA Backplane Device Bindings
> +
> +CONTENTS
> +  - SerDes Node
> +  - PCS Phy Node
> +
> +=============================================================================
> +SerDes Node
> +
> +DESCRIPTION
> +
> +SerDes (Serializer/Deserializer) HW peripheral
> +

Hi Florinel

It is normal to indicate which properties are required, and which are
optional using the section headers. There is a defacto standard for
the format of a device tree binding, and this text does not follow it.

> +PROPERTIES
> +
> +- compatible
> +		Usage: required
> +		Value type: <stringlist>
> +		Definition: Specifies the type of SerDes.
> +		Must include the prefix "fsl,serdes"
> +		SerDes can be of different types:
> +		- 10G SerDes must be specified as: "fsl,serdes-10g"
> +		- 28G SerDes must be specified as: "fsl,serdes-28g"

Does a different driver get loaded depending on the compatible? I'm
just wondering if there should be one compatible string, and a speed
property.

> +
> +- reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: Specifies the offset of the SerDes configuration registers
> +
> +- little-endian
> +		Usage: optional
> +		Value type: <Boolean>
> +		Definition: Specifies endianness access to SerDes registers.
> +		If omitted, big-endian will be used
> +		See common-properties.txt for complete definition
> +
> +EXAMPLE
> +
> +Example of 10G SerDes node:
> +
> +serdes1: serdes@1ea0000 {
> +		compatible = "fsl,serdes-10g";
> +		reg = <0x0 0x1ea0000 0 0x00002000>;
> +		little-endian;
> +};
> +
> +=============================================================================
> +PCS Phy Node
> +
> +DESCRIPTION
> +
> +PCS Phy (Physical Coding Sublayer / Physical layer) node
> +
> +PROPERTIES
> +
> +- compatible
> +		Usage: required

This is normally optional, and defaults to c22 if not present.

> +		Value type: <stringlist>
> +		Definition: A standard property. Specifies the IEEE 802.3 Clause
> +		Different IEEE 802.3 Clauses can be specified:
> +		- Clause 22 must be specified as: "ethernet-phy-ieee802.3-c22"
> +		- Clause 45 must be specified as: "ethernet-phy-ieee802.3-c45"
> +		For complete definition see:
> +		Documentation/devicetree/bindings/net/phy.txt
> +
> +- reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: A standard property.
> +		Specifies the offset of the PCS Phy configuration registers
> +		For complete definition see:
> +		Documentation/devicetree/bindings/net/phy.txt

Rather than state what is already in phy.txt, just say that the
following additional properties can be used:

> +
> +- backplane-mode
> +		Usage: required

So your PHYs can only be used in backplane-mode? Base-T is never
supported?

> +		Value type: <stringlist>
> +		Definition: Specifies the speed and type of the protocol used
> +		Different speeds and backplane protocol types can be used:
> +		- 10GBase-KR must be specified as: "10gbase-kr"
> +		- 40GBase-KR must be specified as: "40gbase-kr"

I don't see why this is needed. The PHY driver should know what speeds
the PHY supports. You might want to make use of the standard max-speed
property to prevent it doing a high speed, because of layout issues,
etc.

> +
> +- fsl,lane-handle
> +		Usage: required
> +		Value type: <phandle>
> +		Definition: Specifies the reference to a node representing the SerDes
> +		device
> +
> +- fsl,lane-reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: Specifies the offsets of the SerDes lanes configuration
> +		registers

No other PHY driver we have needs such properties. Why are these
needed?

It is also a bit ununsed to post a binding without the code. Maybe the
code for these two drivers will help me understand.

     Thanks
	Andrew

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

* Re: [bindings][PATCH] bindings/net: DPAA Backplane Device Bindings
  2018-11-06 11:48 [bindings][PATCH] bindings/net: DPAA Backplane Device Bindings Florinel Iordache
  2018-11-06 13:29 ` Andrew Lunn
@ 2018-11-12 18:10 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2018-11-12 18:10 UTC (permalink / raw)
  To: Florinel Iordache
  Cc: mark.rutland, broonie, horms+renesas, geert+renesas,
	linus.walleij, devicetree, davem, netdev, linux-kernel

On Tue, Nov 06, 2018 at 11:48:30AM +0000, Florinel Iordache wrote:
> Device Tree Bindings for DPAA backplane available on Layerscape
>  communications processors.
> 
> Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
> ---
>  .../devicetree/bindings/net/dpaa-backplane.txt     | 105 +++++++++++++++++++++
>  1 file changed, 105 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/dpaa-backplane.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/dpaa-backplane.txt b/Documentation/devicetree/bindings/net/dpaa-backplane.txt
> new file mode 100644
> index 0000000..f147c84
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dpaa-backplane.txt
> @@ -0,0 +1,105 @@
> +=============================================================================
> +DPAA Backplane Device Bindings
> +
> +CONTENTS
> +  - SerDes Node
> +  - PCS Phy Node
> +
> +=============================================================================
> +SerDes Node
> +
> +DESCRIPTION
> +
> +SerDes (Serializer/Deserializer) HW peripheral
> +
> +PROPERTIES
> +
> +- compatible
> +		Usage: required
> +		Value type: <stringlist>
> +		Definition: Specifies the type of SerDes.
> +		Must include the prefix "fsl,serdes"
> +		SerDes can be of different types:
> +		- 10G SerDes must be specified as: "fsl,serdes-10g"
> +		- 28G SerDes must be specified as: "fsl,serdes-28g"

These should be SoC specific.

> +
> +- reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: Specifies the offset of the SerDes configuration registers
> +
> +- little-endian
> +		Usage: optional
> +		Value type: <Boolean>
> +		Definition: Specifies endianness access to SerDes registers.
> +		If omitted, big-endian will be used
> +		See common-properties.txt for complete definition
> +
> +EXAMPLE
> +
> +Example of 10G SerDes node:
> +
> +serdes1: serdes@1ea0000 {
> +		compatible = "fsl,serdes-10g";
> +		reg = <0x0 0x1ea0000 0 0x00002000>;
> +		little-endian;
> +};
> +
> +=============================================================================
> +PCS Phy Node

This should be separate file.

> +
> +DESCRIPTION
> +
> +PCS Phy (Physical Coding Sublayer / Physical layer) node
> +
> +PROPERTIES
> +
> +- compatible
> +		Usage: required
> +		Value type: <stringlist>
> +		Definition: A standard property. Specifies the IEEE 802.3 Clause
> +		Different IEEE 802.3 Clauses can be specified:
> +		- Clause 22 must be specified as: "ethernet-phy-ieee802.3-c22"
> +		- Clause 45 must be specified as: "ethernet-phy-ieee802.3-c45"
> +		For complete definition see:
> +		Documentation/devicetree/bindings/net/phy.txt
> +
> +- reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: A standard property.
> +		Specifies the offset of the PCS Phy configuration registers
> +		For complete definition see:
> +		Documentation/devicetree/bindings/net/phy.txt
> +
> +- backplane-mode
> +		Usage: required
> +		Value type: <stringlist>
> +		Definition: Specifies the speed and type of the protocol used
> +		Different speeds and backplane protocol types can be used:
> +		- 10GBase-KR must be specified as: "10gbase-kr"
> +		- 40GBase-KR must be specified as: "40gbase-kr"

Is this a standard property? If so just reference the common definition. 
If not, should it be? Otherwise, it needs a vendor prefix.

> +
> +- fsl,lane-handle
> +		Usage: required
> +		Value type: <phandle>
> +		Definition: Specifies the reference to a node representing the SerDes
> +		device
> +
> +- fsl,lane-reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: Specifies the offsets of the SerDes lanes configuration
> +		registers

Seems like you should use the phy binding (generic, not net phy) here 
instead of these 2 custom properties.

Rob

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

end of thread, other threads:[~2018-11-12 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 11:48 [bindings][PATCH] bindings/net: DPAA Backplane Device Bindings Florinel Iordache
2018-11-06 13:29 ` Andrew Lunn
2018-11-12 18:10 ` Rob Herring

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.