openwrt/target/linux/ramips/dts/mt7621_mikrotik_routerboard-760igs.dts
John Thomson 7ea965b578 ramips: mt7621: mikrotik 760igs (hEX S) fix SFP
This device uses an AR8031/AR8033 chip to convert SoC gmac1
RGMII to 1000base-x or sgmii for the SFP fibre cage.
The SFP cage requires phy-mode rgmii-rxid, and without it will not
recieve any packets: ethtool -S sfp rx_fcs_errors will increase when
packets should be being received, but no other _rx counters will change.

Fixes: c77858aa79 ("ramips: mt7621-dts: change phy-mode of gmac1 to rgmii")
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2022-12-06 01:47:36 +01:00

70 lines
1.2 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621_mikrotik_routerboard-7xx.dtsi"
/ {
compatible = "mikrotik,routerboard-760igs", "mediatek,mt7621-soc";
model = "MikroTik RouterBOARD 760iGS";
aliases {
led-boot = &led_pwr;
led-failsafe = &led_pwr;
led-running = &led_pwr;
led-upgrade = &led_pwr;
};
leds {
compatible = "gpio-leds";
led_pwr: pwr {
label = "blue:pwr";
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
sfp {
label = "blue:sfp";
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
};
sfp1: sfp1 {
compatible = "sff,sfp";
i2c-bus = <&i2c>;
los-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
tx-disable-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1000>;
};
};
&mdio {
ephy7: ethernet-phy@7 {
reg = <7>;
sfp = <&sfp1>;
};
};
&gmac1 {
status = "okay";
label = "sfp";
phy-mode = "rgmii-rxid";
phy-handle = <&ephy7>;
};
&i2c {
status = "okay";
};
&state_default {
gpio {
/* gpio7 (uart3 group) goes high when
* port5 (PoE out) is cabled to a
* Mikrotik PoE-in capable port,
* such as port1 on another rb760iGS */
groups = "uart2", "uart3", "jtag", "wdt";
function = "gpio";
};
};