Message ID | 20201115135923.11523-5-kabel@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Turris Omnia device-tree changes | expand |
On Mon, 16 Nov 2020 13:24:22 +0100
Marek Behún <kabel@kernel.org> wrote:
JFI, added
> maximum-power-milliwatt = <3000>;
since HW guys just confirmed this.
Marek
On Mon, Nov 16, 2020 at 01:24:22PM +0100, Marek Behún wrote: > Describe the SFP cage, but leave it disabled. Until phylink has support > for such configuration, we are leaving it to U-Boot to enable SFP and > disable WAN PHY at boot time depending on whether a SFP module is > present. Let's be clear: this is _not_ something I have any plans to be working on adding; this is for others to get involved with. I am not going to ack or review your patch to hack around this either.
On Mon, 16 Nov 2020 12:34:56 +0000 Russell King - ARM Linux admin <linux@armlinux.org.uk> wrote: > Let's be clear: this is _not_ something I have any plans to be working > on adding; this is for others to get involved with. Russell, I consider this self-evident. Since Turris Omnia is currently probably the only device with such configuration, it will be on me to add this support. I will try to work out the correct solution and send patches for review. For now though, lets merge this. It will simplify our (the vendor of the device) patching on TurrisOS. Marek
diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts index 7ccebf7d1757..f7498543c9ad 100644 --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts @@ -82,6 +82,23 @@ pcie@3,0 { }; }; }; + + sfp: sfp { + compatible = "sff,sfp"; + i2c-bus = <&sfp_i2c>; + tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>; + tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>; + rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>; + los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>; + + /* + * For now this has to be enabled at boot time by U-Boot when + * a SFP module is present. Read more in the comment in the + * eth2 node below. + */ + status = "disabled"; + }; }; &bm { @@ -126,10 +143,20 @@ fixed-link { /* WAN port */ ð2 { + /* + * eth2 is connected via a multiplexor to both the SFP cage and to + * ethernet-phy@1. The multiplexor switches the signal to SFP cage when + * a SFP module is present, as determined by the mode-def0 GPIO. + * + * Until kernel supports this configuration properly, in case SFP module + * is present, U-Boot has to enable the sfp node above, remove phy + * handle and add managed = "in-band-status" property. + */ status = "okay"; phy-mode = "sgmii"; phy = <&phy1>; phys = <&comphy5 2>; + sfp = <&sfp>; buffer-manager = <&bm>; bm,pool-long = <2>; bm,pool-short = <3>; @@ -195,7 +222,7 @@ i2c@3 { /* routed to PCIe2 connector (CN62A) */ }; - i2c@4 { + sfp_i2c: i2c@4 { #address-cells = <1>; #size-cells = <0>; reg = <4>;