linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] SFF support for ZII CFU1 and devel C.
@ 2018-09-02 16:29 Andrew Lunn
  2018-09-02 16:29 ` [PATCH 1/2] ARM: dts: vf610-zii-cfu1: Add SFF interface to switch Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Lunn @ 2018-09-02 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

Both the ZII CFU1 and Devel C have SFF modules. These patches add some
of them to the device tree description of these boards.

In order for the CFU1 to fully work, it requires patches submitted in
net-next. Without those patches, the link partner must already be up
when the SFF interface is configured up. There are no build time
dependencies, so merging them via different trees is not a problem.

Devel C generally has 2 SFF modules populated. The patch here adds
full support for SFF2. All the needed driver code is already present.
SFF3 is not yet supported by the mv88e6xxx driver. So the SFF3 device
itself is added to DT, but the module is not linked to a port.

Andrew Lunn (1):
  ARM: dts: vf610-zii-cfu1: Add SFF interface to switch

Russell King (1):
  ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module

 arch/arm/boot/dts/vf610-zii-cfu1.dts      | 27 ++++++++++++++
 arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 44 +++++++++++++----------
 2 files changed, 52 insertions(+), 19 deletions(-)

-- 
2.19.0.rc1

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

* [PATCH 1/2] ARM: dts: vf610-zii-cfu1: Add SFF interface to switch
  2018-09-02 16:29 [PATCH 0/2] SFF support for ZII CFU1 and devel C Andrew Lunn
@ 2018-09-02 16:29 ` Andrew Lunn
  2018-09-02 16:29 ` [PATCH 2/2] ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module Andrew Lunn
  2018-09-10  0:33 ` [PATCH 0/2] SFF support for ZII CFU1 and devel C Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2018-09-02 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

The switch has an SFF attached to port 5. Add the SFF device, the
pinmux for its GPIOs, and list the port in the switch configuration.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/vf610-zii-cfu1.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/vf610-zii-cfu1.dts b/arch/arm/boot/dts/vf610-zii-cfu1.dts
index 37777cf22e67..de3ed03ec0e7 100644
--- a/arch/arm/boot/dts/vf610-zii-cfu1.dts
+++ b/arch/arm/boot/dts/vf610-zii-cfu1.dts
@@ -66,6 +66,15 @@
 		 regulator-min-microvolt = <3300000>;
 		 regulator-max-microvolt = <3300000>;
 	};
+
+	sff: sfp {
+		compatible = "sff,sff";
+		pinctrl-0 = <&pinctrl_optical>;
+		pinctrl-names = "default";
+		i2c-bus = <&i2c0>;
+		los-gpio = <&gpio4 4 GPIO_ACTIVE_HIGH>;
+		tx-disable-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &adc0 {
@@ -170,6 +179,14 @@
 					label = "eth_cu_1000_3";
 				};
 
+				port at 5 {
+					reg = <5>;
+					label = "eth_fc_1000_1";
+					phy-mode = "1000base-x";
+					managed = "in-band-status";
+					sfp = <&sff>;
+				};
+
 				port at 6 {
 					reg = <6>;
 					label = "cpu";
@@ -289,6 +306,16 @@
 		>;
 	};
 
+	pinctrl_optical: optical-grp {
+		fsl,pins = <
+		/* SFF SD input */
+		VF610_PAD_PTE27__GPIO_132	0x3061
+
+		/* SFF Transmit disable output */
+		VF610_PAD_PTE13__GPIO_118	0x3043
+		>;
+	};
+
 	pinctrl_switch: switch-grp {
 		fsl,pins = <
 			VF610_PAD_PTB28__GPIO_98		0x3061
-- 
2.19.0.rc1

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

* [PATCH 2/2] ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module
  2018-09-02 16:29 [PATCH 0/2] SFF support for ZII CFU1 and devel C Andrew Lunn
  2018-09-02 16:29 ` [PATCH 1/2] ARM: dts: vf610-zii-cfu1: Add SFF interface to switch Andrew Lunn
@ 2018-09-02 16:29 ` Andrew Lunn
  2018-09-10  0:33 ` [PATCH 0/2] SFF support for ZII CFU1 and devel C Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2018-09-02 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

From: Russell King <rmk+kernel@armlinux.org.uk>

The board typically has 2 populated SFF interfaces. The mv88e6xxx
driver currently supports SFF modules connected to ports 9 and 10 of
the mv88e6390. Add support for sff2, which is connected to port 9.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 44 +++++++++++++----------
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
index 0b1e94c6f25b..6f4a5602cefd 100644
--- a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
@@ -200,6 +200,13 @@
 						phy-handle = <&switch1phy4>;
 					};
 
+					port at 9 {
+						reg = <9>;
+						label = "sff2";
+						phy-mode = "sgmii";
+						managed = "in-band-status";
+						sfp = <&sff2>;
+					};
 
 					switch1port10: port at 10 {
 						reg = <10>;
@@ -245,6 +252,22 @@
 			#size-cells = <0>;
 		};
 	};
+
+	sff2: sff2 {
+		/* lower */
+		compatible = "sff,sff";
+		i2c-bus = <&sff2_i2c>;
+		los-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
+		tx-disable-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>;
+	};
+
+	sff3: sff3 {
+		/* upper */
+		compatible = "sff,sff";
+		i2c-bus = <&sff3_i2c>;
+		los-gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
+		tx-disable-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &dspi0 {
@@ -329,13 +352,6 @@
 		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
 		gpio-controller;
 		interrupt-controller;
-
-		enet_swr_en {
-			gpio-hog;
-			gpios = <0 GPIO_ACTIVE_HIGH>;
-			output-high;
-			line-name = "enet-swr-en";
-		};
 	};
 
 	/*
@@ -378,26 +394,16 @@
 			reg = <0>;
 		};
 
-		i2c at 1 {
+		sff2_i2c: i2c at 1 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <1>;
-
-			sfp2: at24c04 at 50 {
-				compatible = "atmel,24c02";
-				reg = <0x50>;
-			};
 		};
 
-		i2c at 2 {
+		sff3_i2c: i2c at 2 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <2>;
-
-			sfp3: at24c04 at 50 {
-				compatible = "atmel,24c02";
-				reg = <0x50>;
-			};
 		};
 
 		i2c at 3 {
-- 
2.19.0.rc1

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

* [PATCH 0/2] SFF support for ZII CFU1 and devel C.
  2018-09-02 16:29 [PATCH 0/2] SFF support for ZII CFU1 and devel C Andrew Lunn
  2018-09-02 16:29 ` [PATCH 1/2] ARM: dts: vf610-zii-cfu1: Add SFF interface to switch Andrew Lunn
  2018-09-02 16:29 ` [PATCH 2/2] ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module Andrew Lunn
@ 2018-09-10  0:33 ` Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2018-09-10  0:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 02, 2018 at 06:29:10PM +0200, Andrew Lunn wrote:
> Andrew Lunn (1):
>   ARM: dts: vf610-zii-cfu1: Add SFF interface to switch
> 
> Russell King (1):
>   ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module

Applied both, thanks.

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

end of thread, other threads:[~2018-09-10  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-02 16:29 [PATCH 0/2] SFF support for ZII CFU1 and devel C Andrew Lunn
2018-09-02 16:29 ` [PATCH 1/2] ARM: dts: vf610-zii-cfu1: Add SFF interface to switch Andrew Lunn
2018-09-02 16:29 ` [PATCH 2/2] ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module Andrew Lunn
2018-09-10  0:33 ` [PATCH 0/2] SFF support for ZII CFU1 and devel C Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).