[PATCH net-next 2/9] dt-bindings: net: add backplane dt bindings

From: Florinel Iordache
Date: Thu Mar 26 2020 - 09:52:02 EST


Add ethernet backplane device tree bindings

Signed-off-by: Florinel Iordache <florinel.iordache@xxxxxxx>
---
.../bindings/net/ethernet-controller.yaml | 3 +-
.../devicetree/bindings/net/ethernet-phy.yaml | 53 +++++++++++++
Documentation/devicetree/bindings/net/serdes.yaml | 90 ++++++++++++++++++++++
3 files changed, 145 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/net/serdes.yaml

diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index ac471b6..541cee5 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -93,8 +93,9 @@ properties:
- rxaui
- xaui

- # 10GBASE-KR, XFI, SFI
+ # 10GBASE-KR, 40GBASE-KR4, XFI, SFI
- 10gbase-kr
+ - 40gbase-kr4
- usxgmii

phy-mode:
diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 8927941..2fb377e 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -158,6 +158,42 @@ properties:
description:
Specifies a reference to a node representing a SFP cage.

+ eq-algorithm:
+ oneOf:
+ - const: fixed
+ description:
+ Backplane KR using fixed coefficients meaning no
+ equalization algorithm
+ - const: bee
+ description:
+ Backplane KR using 3-Taps Bit Edge Equalization (BEE)
+ algorithm
+ description:
+ Specifies the desired equalization algorithm to be used
+ by the KR link training
+
+ eq-init:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 3
+ maxItems: 3
+ description:
+ Triplet of KR coefficients. Specifies the initialization
+ values for standard KR equalization coefficients used by
+ the link training: pre-cursor, post-cursor, main-cursor
+
+ eq-params:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ Variable size array of KR parameters. Specifies the HW
+ specific parameters used by the link training
+
+ lane-handle:
+ $ref: /schemas/types.yaml#definitions/phandle
+ description:
+ Specifies a reference (or array of references) to a node
+ representing the desired SERDES lane (or lanes) used in
+ backplane mode
+
required:
- reg

@@ -180,3 +216,20 @@ examples:
reset-deassert-us = <2000>;
};
};
+ - |
+ /* Backplane configurations for specific setup */
+ &mdio9 {
+ bpphy6: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <0x0>;
+ lane-handle = <&lane_d>; /* use lane D */
+ eq-algorithm = "bee";
+ /* 10G Short cables setup: up to 30 cm cable */
+ eq-init = <0x2 0x5 0x29>;
+ eq-params = <0>;
+ };
+ };
+ &mac9 {
+ phy-connection-type = "10gbase-kr";
+ phy-handle = <&bpphy6>;
+ };
diff --git a/Documentation/devicetree/bindings/net/serdes.yaml b/Documentation/devicetree/bindings/net/serdes.yaml
new file mode 100644
index 0000000..965152f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/serdes.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/serdes.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Serdes Module Binding
+
+maintainers:
+ - Florinel Iordache <florinel.iordache@xxxxxxx>
+
+properties:
+ $nodename:
+ pattern: "^serdes(@[a-f0-9]+)?$"
+
+ compatible:
+ oneOf:
+ - const: serdes-10g
+ description: SerDes module type of 10G
+ - const: serdes-28g
+ description: SerDes module type of 28G
+
+ reg:
+ description:
+ Registers memory map offset and size for this serdes module
+
+ reg-names:
+ description:
+ Names of the register map given in "reg" node.
+ Should be one of the following according to serdes type:
+ "serdes", "serdes-10g", "serdes-28g"
+
+ little-endian:
+ description:
+ Specifies the endianness of serdes module
+ For complete definition see:
+ Documentation/devicetree/bindings/common-properties.txt
+
+ #address-cells:
+ description: Must be <1>
+
+ #size-cells:
+ description: Must be <1>
+
+ ranges:
+ description:
+ Address range of serdes module.
+
+properties:
+ $nodename:
+ pattern: "^lane(@[a-f0-9]+)?$"
+
+ compatible:
+ oneOf:
+ - const: lane-10g
+ description: Lane part of a 10G SerDes module
+ - const: lane-28g
+ description: Lane part of a 28G SerDes module
+
+ reg:
+ description:
+ Registers memory map offset and size for this lane
+
+ reg-names:
+ description:
+ Names of the register map given in "reg" node.
+ Should be one of the following: "lane", "serdes-lane"
+
+examples:
+ - |
+ serdes1: serdes@1ea0000 {
+ compatible = "serdes-10g";
+ reg = <0x0 0x1ea0000 0 0x00002000>;
+ reg-names = "serdes", "serdes-10g";
+ little-endian;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x00 0x1ea0000 0x00002000>;
+ lane_a: lane@800 {
+ compatible = "lane-10g";
+ reg = <0x800 0x40>;
+ reg-names = "lane", "serdes-lane";
+ };
+ lane_b: lane@840 {
+ compatible = "lane-10g";
+ reg = <0x840 0x40>;
+ reg-names = "lane", "serdes-lane";
+ };
+ };
--
1.9.1