mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Moritz Fischer <moritz.fischer@ettus.com>
To: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	alex.williams@ni.com, andrew@lunn.ch, robh+dt@kernel.org,
	davem@davemloft.net, moritz.fischer@ettus.com,
	Moritz Fischer <mdf@kernel.org>
Subject: [PATCH net-next 3/3] dt-bindings: net: Add fixed-link support
Date: Mon,  4 Feb 2019 09:30:40 -0800	[thread overview]
Message-ID: <20190204173040.5538-4-moritz.fischer@ettus.com> (raw)
In-Reply-To: <20190204173040.5538-1-moritz.fischer@ettus.com>

From: Moritz Fischer <mdf@kernel.org>

Update device-tree binding with fixed-link support.

With fixed-link support the formerly required property 'phy-handle'
is now optional if 'fixed-link' child is present.

Signed-off-by: Moritz Fischer <mdf@kernel.org>
---
 .../devicetree/bindings/net/nixge.txt         | 33 ++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/nixge.txt b/Documentation/devicetree/bindings/net/nixge.txt
index bb2929f9c64f..85d7240a9b20 100644
--- a/Documentation/devicetree/bindings/net/nixge.txt
+++ b/Documentation/devicetree/bindings/net/nixge.txt
@@ -12,12 +12,14 @@ Required properties:
 - interrupts: Should contain tx and rx interrupt
 - interrupt-names: Should be "rx" and "tx"
 - phy-mode: See ethernet.txt file in the same directory.
-- phy-handle: See ethernet.txt file in the same directory.
 - nvmem-cells: Phandle of nvmem cell containing the MAC address
 - nvmem-cell-names: Should be "address"
 
 Optional properties:
 - mdio subnode to indicate presence of MDIO controller
+- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
+  Use instead of phy-handle.
+- phy-handle: See ethernet.txt file in the same directory.
 
 Examples (10G generic PHY):
 	nixge0: ethernet@40000000 {
@@ -59,3 +61,32 @@ Examples (10G generic PHY, no MDIO):
 		phy-mode = "xgmii";
 		phy-handle = <&ethernet_phy1>;
 	};
+
+Examples (1G generic fixed-link + MDIO):
+	nixge0: ethernet@40000000 {
+		compatible = "ni,xge-enet-2.00";
+		reg = <0x40000000 0x6000>;
+
+		nvmem-cells = <&eth1_addr>;
+		nvmem-cell-names = "address";
+
+		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "rx", "tx";
+		interrupt-parent = <&intc>;
+
+		phy-mode = "xgmii";
+
+		fixed-link {
+			speed = <1000>;
+			pause;
+			link-gpios = <&gpio0 63 GPIO_ACTIVE_HIGH>;
+		};
+
+		mdio {
+			ethernet_phy1: ethernet-phy@4 {
+				compatible = "ethernet-phy-ieee802.3-c22";
+				reg = <4>;
+			};
+		};
+
+	};
-- 
2.20.1


  parent reply	other threads:[~2019-02-04 17:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 17:30 [PATCH net-next 0/3] nixge: Fixed-link support Moritz Fischer
2019-02-04 17:30 ` [PATCH net-next 1/3] net: nixge: Make mdio child node optional Moritz Fischer
2019-02-04 17:30 ` [PATCH net-next 2/3] net: nixge: Add support for fixed-link configurations Moritz Fischer
2019-02-04 17:30 ` Moritz Fischer [this message]
2019-02-05 18:34 ` [PATCH net-next 0/3] nixge: Fixed-link support David Miller

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=20190204173040.5538-4-moritz.fischer@ettus.com \
    --to=moritz.fischer@ettus.com \
    --cc=alex.williams@ni.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®