Skip to contentSkip to conversation

SFF support for ZII CFU1 and devel C.

PATCH New Andrew Lunn 2 participants 4 messages Sep 2, 2018 – Sep 10, 2018 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover SFF support for ZII CFU1 and devel C.

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(-)
Signature · 1 line
2.19.0.rc1
#1 lore raw

PATCH 1/2 ARM: dts: vf610-zii-cfu1: Add SFF interface to switch

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.

---
 arch/arm/boot/dts/vf610-zii-cfu1.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm/boot/dts/vf610-zii-cfu1.dts +27 -0
index 37777cf22e67..de3ed03ec0e7 100644
@@ -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
Signature · 1 line
2.19.0.rc1
#2 lore raw

PATCH 2/2 ARM: dts: vf610-zii-dev-rev-c: add support for one SFF module

In reply to Andrew Lunn

From: Russell King <[email protected]>

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.

---
 arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 44 +++++++++++++----------
 1 file changed, 25 insertions(+), 19 deletions(-)
arch/arm/boot/dts/vf610-zii-dev-rev-c.dts +25 -19
index 0b1e94c6f25b..6f4a5602cefd 100644
@@ -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 {
Signature · 1 line
2.19.0.rc1
Applied
#3 lore raw

cover SFF support for ZII CFU1 and devel C.

In reply to Andrew Lunn
Quoted 5 lines · Andrew Lunn

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.