In previous versions of OpenWrt, ethernet was partially working,
sometimes depending on initialization state left by bootloader.
Since the switch to NSS drivers, it is completely broken.
- swap GMAC to PHY address mapping
- use rgmii internal delay
- drop `fixed-link` rates
- add pinctrl settings for rgmii0
- declare reset GPIO 51 (used for both PHYs)
- disable hibernation
Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Link: https://github.com/openwrt/openwrt/pull/23740
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
;;
fortinet,fap-421e|\
ignitenet,ss-w2-ac2600|\
- ubnt,unifi-ac-hd)
+ ubnt,unifi-ac-hd|\
+ nokia,ac400i)
ucidef_set_interface_lan "eth0 eth1"
;;
meraki,mr42)
};
};
+ rgmii0_pins: rgmii0_pins {
+ mux {
+ pins = "gpio66";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
};
&gsbi5 {
&mdio0 {
status = "okay";
+
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
+ reset-gpios = <&qcom_pinmux 51 GPIO_ACTIVE_LOW>;
+ qca,disable-hibernation-mode;
};
phy1: ethernet-phy@1 {
reg = <1>;
+ qca,disable-hibernation-mode;
};
-
};
//POE
pinctrl-names = "default";
mdiobus = <&mdio0>;
- phy-handle = <&phy0>;
- phy-mode = "rgmii";
-
- fixed-link {
- speed = <1000>;
- full-duplex;
- };
+ phy-handle = <&phy1>;
+ phy-mode = "rgmii-id";
};
-//LAN1
+//LAN2
&gmac1 {
status = "okay";
qcom,id = <1>;
- mdiobus = <&mdio0>;
- phy-handle = <&phy1>;
- phy-mode = "rgmii";
+ pinctrl-0 = <&rgmii0_pins>;
+ pinctrl-names = "default";
- fixed-link {
- speed = <1000>;
- full-duplex;
- };
+ mdiobus = <&mdio0>;
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii-id";
};
&nand {