All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmk+kernel@arm.linux.org.uk (Russell King)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support
Date: Tue, 27 Feb 2018 16:02:02 +0000	[thread overview]
Message-ID: <E1eqhha-0004l3-Rd@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20180227160135.GU9418@n2100.armlinux.org.uk>

Add SFP module support for Clearfog using the SFP phylink support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/boot/dts/armada-388-clearfog.dtsi | 45 ++++++++----------------------
 1 file changed, 12 insertions(+), 33 deletions(-)

diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi
index 0e3b1f140e6d..a44bf20ab7f8 100644
--- a/arch/arm/boot/dts/armada-388-clearfog.dtsi
+++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi
@@ -117,6 +117,16 @@
 			};
 		};
 	};
+
+	sfp: sfp {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c1>;
+		los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
+		tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <2000>;
+	};
 };
 
 &eth1 {
@@ -133,13 +143,10 @@
 	bm,pool-long = <3>;
 	bm,pool-short = <1>;
 	buffer-manager = <&bm>;
+	managed = "in-band-status";
 	phy-mode = "sgmii";
+	sfp = <&sfp>;
 	status = "okay";
-
-	fixed-link {
-		speed = <1000>;
-		full-duplex;
-	};
 };
 
 &i2c0 {
@@ -208,34 +215,6 @@
 			output-low;
 			line-name = "m.2 devslp";
 		};
-		sfp_los {
-			/* SFP loss of signal */
-			gpio-hog;
-			gpios = <12 GPIO_ACTIVE_HIGH>;
-			input;
-			line-name = "sfp-los";
-		};
-		sfp_tx_fault {
-			/* SFP laser fault */
-			gpio-hog;
-			gpios = <13 GPIO_ACTIVE_HIGH>;
-			input;
-			line-name = "sfp-tx-fault";
-		};
-		sfp_tx_disable {
-			/* SFP transmit disable */
-			gpio-hog;
-			gpios = <14 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "sfp-tx-disable";
-		};
-		sfp_mod_def0 {
-			/* SFP module present */
-			gpio-hog;
-			gpios = <15 GPIO_ACTIVE_LOW>;
-			input;
-			line-name = "sfp-mod-def0";
-		};
 	};
 
 	/* The MCP3021 supports standard and fast modes */
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Russell King <rmk+kernel@arm.linux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Jason Cooper <jason@lakedaemon.net>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support
Date: Tue, 27 Feb 2018 16:02:02 +0000	[thread overview]
Message-ID: <E1eqhha-0004l3-Rd@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20180227160135.GU9418@n2100.armlinux.org.uk>

Add SFP module support for Clearfog using the SFP phylink support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/boot/dts/armada-388-clearfog.dtsi | 45 ++++++++----------------------
 1 file changed, 12 insertions(+), 33 deletions(-)

diff --git a/arch/arm/boot/dts/armada-388-clearfog.dtsi b/arch/arm/boot/dts/armada-388-clearfog.dtsi
index 0e3b1f140e6d..a44bf20ab7f8 100644
--- a/arch/arm/boot/dts/armada-388-clearfog.dtsi
+++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi
@@ -117,6 +117,16 @@
 			};
 		};
 	};
+
+	sfp: sfp {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c1>;
+		los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
+		tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <2000>;
+	};
 };
 
 &eth1 {
@@ -133,13 +143,10 @@
 	bm,pool-long = <3>;
 	bm,pool-short = <1>;
 	buffer-manager = <&bm>;
+	managed = "in-band-status";
 	phy-mode = "sgmii";
+	sfp = <&sfp>;
 	status = "okay";
-
-	fixed-link {
-		speed = <1000>;
-		full-duplex;
-	};
 };
 
 &i2c0 {
@@ -208,34 +215,6 @@
 			output-low;
 			line-name = "m.2 devslp";
 		};
-		sfp_los {
-			/* SFP loss of signal */
-			gpio-hog;
-			gpios = <12 GPIO_ACTIVE_HIGH>;
-			input;
-			line-name = "sfp-los";
-		};
-		sfp_tx_fault {
-			/* SFP laser fault */
-			gpio-hog;
-			gpios = <13 GPIO_ACTIVE_HIGH>;
-			input;
-			line-name = "sfp-tx-fault";
-		};
-		sfp_tx_disable {
-			/* SFP transmit disable */
-			gpio-hog;
-			gpios = <14 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "sfp-tx-disable";
-		};
-		sfp_mod_def0 {
-			/* SFP module present */
-			gpio-hog;
-			gpios = <15 GPIO_ACTIVE_LOW>;
-			input;
-			line-name = "sfp-mod-def0";
-		};
 	};
 
 	/* The MCP3021 supports standard and fast modes */
-- 
2.7.4

  parent reply	other threads:[~2018-02-27 16:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 16:01 [PATCH 0/2] SolidRun Clearfog SFP support Russell King - ARM Linux
2018-02-27 16:01 ` Russell King - ARM Linux
2018-02-27 16:01 ` [PATCH 1/2] ARM: dts: armada388-clearfog: increase speed of i2c0 to 400kHz Russell King
2018-02-27 16:01   ` Russell King
2018-03-05 15:48   ` Gregory CLEMENT
2018-03-05 15:48     ` Gregory CLEMENT
2018-03-05 16:09     ` Russell King - ARM Linux
2018-03-05 16:09       ` Russell King - ARM Linux
2018-03-05 16:22       ` Gregory CLEMENT
2018-03-05 16:22         ` Gregory CLEMENT
2018-02-27 16:02 ` Russell King [this message]
2018-02-27 16:02   ` [PATCH 2/2] ARM: dts: armada388-clearfog: add SFP module support Russell King
2018-03-02 21:56   ` Andrew Lunn
2018-03-02 21:56     ` Andrew Lunn
2018-03-02 22:02     ` Russell King - ARM Linux
2018-03-02 22:02       ` Russell King - ARM Linux
2018-03-02 22:04       ` Andrew Lunn
2018-03-02 22:04         ` Andrew Lunn
2018-03-04 12:13   ` Baruch Siach
2018-03-04 12:13     ` Baruch Siach
2018-03-04 12:49     ` Russell King - ARM Linux
2018-03-04 12:49       ` Russell King - ARM Linux
2018-03-04 13:19       ` Baruch Siach
2018-03-04 13:19         ` Baruch Siach
2018-03-19 21:41   ` Gregory CLEMENT
2018-03-19 21:41     ` Gregory CLEMENT

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=E1eqhha-0004l3-Rd@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 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.