mvebu: fix SFP insert detection GPIO name on 4.14
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.14 / 414-ARM-dts-armada388-clearfog-add-SFP-module-support.patch
1 From 74fa68669c88f73bceff523cb764297b7d1e132b Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@arm.linux.org.uk>
3 Date: Tue, 29 Nov 2016 10:13:44 +0000
4 Subject: ARM: dts: armada388-clearfog: add SFP module support
5
6 Add SFP module support for Clearfog using the SFP phylink support.
7
8 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 ---
10 arch/arm/boot/dts/armada-388-clearfog.dtsi | 44 ++++++++----------------------
11 1 file changed, 11 insertions(+), 33 deletions(-)
12
13 --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi
14 +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi
15 @@ -117,6 +117,15 @@
16 };
17 };
18 };
19 +
20 + sfp: sfp {
21 + compatible = "sff,sfp";
22 + i2c-bus = <&i2c1>;
23 + los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
24 + mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
25 + tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
26 + tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
27 + };
28 };
29
30 &eth1 {
31 @@ -133,13 +142,10 @@
32 bm,pool-long = <3>;
33 bm,pool-short = <1>;
34 buffer-manager = <&bm>;
35 + managed = "in-band-status";
36 phy-mode = "sgmii";
37 + sfp = <&sfp>;
38 status = "okay";
39 -
40 - fixed-link {
41 - speed = <1000>;
42 - full-duplex;
43 - };
44 };
45
46 &i2c0 {
47 @@ -208,34 +214,6 @@
48 output-low;
49 line-name = "m.2 devslp";
50 };
51 - sfp_los {
52 - /* SFP loss of signal */
53 - gpio-hog;
54 - gpios = <12 GPIO_ACTIVE_HIGH>;
55 - input;
56 - line-name = "sfp-los";
57 - };
58 - sfp_tx_fault {
59 - /* SFP laser fault */
60 - gpio-hog;
61 - gpios = <13 GPIO_ACTIVE_HIGH>;
62 - input;
63 - line-name = "sfp-tx-fault";
64 - };
65 - sfp_tx_disable {
66 - /* SFP transmit disable */
67 - gpio-hog;
68 - gpios = <14 GPIO_ACTIVE_HIGH>;
69 - output-low;
70 - line-name = "sfp-tx-disable";
71 - };
72 - sfp_mod_def0 {
73 - /* SFP module present */
74 - gpio-hog;
75 - gpios = <15 GPIO_ACTIVE_LOW>;
76 - input;
77 - line-name = "sfp-mod-def0";
78 - };
79 };
80
81 /* The MCP3021 supports standard and fast modes */