Commit 3275231e authored by Rabeeh Khoury's avatar Rabeeh Khoury

sfp: added sfp configuration bits and misc dts fixes

- Enabled CONFIG_SFP in the kernel build
- Pulled SFP device tree patch from mainline - this enables
dpmac7,8,9,10 that are the 4 SFP+ connectors on HoneyComb / ClearFog-CX
- Pulled AR8035 phy device tree patch
- Remove RTC interrupt from device tree
- Added power button support to device tree
Signed-off-by: default avatarRabeeh Khoury <rabeeh@solid-run.com>
parent b39c7432
......@@ -42,3 +42,4 @@ CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_RNG=y
CONFIG_CRYPTO_USER_API_AEAD=y
CONFIG_SFP=y
From 8900d0d59b63766c4ed10462eb921c4bd595e4c7 Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Fri, 8 Jan 2021 23:09:58 +0000
Subject: [PATCH] arm64: dts: lx2160a-clearfog-itx: add power button support
Add support for the power button.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
.../boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
index f3741a32e868..2b63235ca627 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
@@ -8,6 +8,7 @@
/dts-v1/;
#include "fsl-lx2160a-cex7.dtsi"
+#include <dt-bindings/input/linux-event-codes.h>
/ {
aliases {
@@ -18,6 +19,17 @@ aliases {
chosen {
stdout-path = "serial0:115200n8";
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key {
+ label = "power";
+ linux,can-disable;
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ };
+ };
};
&emdio2 {
--
2.25.1
From 12dffe14e372ab7af26c12ca4cc91876a0fb7b41 Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Sun, 10 Jan 2021 13:58:15 +0000
Subject: [PATCH] arm64: dts: lx2160a-cex7: delete RTC interrupt
The RTC interrupt is incorrect and prevents the RTC driver
initialising. In any case, the PCF2127 driver wants an active low
interrupt, which neither the GIC nor the GPIO blocks support.
There is an ISPPT block in the LX2160A, but this is not supported
in mainline kernels. So, just delete the interrupt.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
index d87d16460875..49fcf025494f 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
@@ -134,8 +134,6 @@ &i2c4 {
rtc@51 {
compatible = "nxp,pcf2129";
reg = <0x51>;
- // IRQ10_B
- interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
};
};
--
2.25.1
From 22171213e503edce38f249cff82b9ad3775b9026 Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Fri, 15 Jan 2021 23:36:39 +0000
Subject: [PATCH] arm64: dts: lx2160a-cex7: increase at8035 PHY gigabit Tw
parameter
Increase the SmartEEE Tw parameter for Atheros PHYs to stop gigabit
links from sporadically dropping. Testing on this platform shows that
a value of 24 results in a stable link, whereas 23 or below has the
occasional drop.
Tested with a Netgear GS116 unmanaged switch link partner with Cat 5e
cabling.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
index 49fcf025494f..459dccad8326 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
@@ -40,6 +40,7 @@ &emdio1 {
rgmii_phy1: ethernet-phy@1 {
reg = <1>;
+ qca,smarteee-tw-us-1g = <24>;
};
};
--
2.25.1
From 312a46148513d8567d013c3474e64543aeea5950 Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 9 Mar 2021 16:36:58 +0000
Subject: [PATCH] arm64: dts: lx2160a-clearfog-itx: add SFP support
Add 2x2 SFP+ cage support for clearfog-itx boards.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
.../boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 24 +++++++
.../freescale/fsl-lx2160a-clearfog-itx.dtsi | 64 +++++++++++++++++++
2 files changed, 88 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
index 459dccad8326..afb455210bd0 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
@@ -122,6 +122,30 @@ temperature-sensor@48 {
vcc-supply = <&sb_3v3>;
};
};
+
+ sfp0_i2c: i2c@4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <4>;
+ };
+
+ sfp1_i2c: i2c@5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <5>;
+ };
+
+ sfp2_i2c: i2c@6 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <6>;
+ };
+
+ sfp3_i2c: i2c@7 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <7>;
+ };
};
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
index 2b63235ca627..17f8e733972a 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
@@ -30,6 +30,54 @@ key {
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
};
};
+
+ sfp0: sfp-0 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp0_i2c>;
+ mod-def0-gpio = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ maximum-power-milliwatt = <2000>;
+ };
+
+ sfp1: sfp-1 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp1_i2c>;
+ mod-def0-gpio = <&gpio2 9 GPIO_ACTIVE_LOW>;
+ maximum-power-milliwatt = <2000>;
+ };
+
+ sfp2: sfp-2 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp2_i2c>;
+ mod-def0-gpio = <&gpio2 10 GPIO_ACTIVE_LOW>;
+ maximum-power-milliwatt = <2000>;
+ };
+
+ sfp3: sfp-3 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp3_i2c>;
+ mod-def0-gpio = <&gpio2 11 GPIO_ACTIVE_LOW>;
+ maximum-power-milliwatt = <2000>;
+ };
+};
+
+&dpmac7 {
+ sfp = <&sfp0>;
+ managed = "in-band-status";
+};
+
+&dpmac8 {
+ sfp = <&sfp1>;
+ managed = "in-band-status";
+};
+
+&dpmac9 {
+ sfp = <&sfp2>;
+ managed = "in-band-status";
+};
+
+&dpmac10 {
+ sfp = <&sfp3>;
+ managed = "in-band-status";
};
&emdio2 {
@@ -44,6 +92,22 @@ &esdhc0 {
status = "okay";
};
+&pcs_mdio7 {
+ status = "okay";
+};
+
+&pcs_mdio8 {
+ status = "okay";
+};
+
+&pcs_mdio9 {
+ status = "okay";
+};
+
+&pcs_mdio10 {
+ status = "okay";
+};
+
&sata0 {
status = "okay";
};
--
2.25.1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment