]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ipq806x: fix ethernet for Nokia AC400i
authorSebastian Schaper <openwrt@sebastianschaper.net>
Sat, 6 Jun 2026 07:40:06 +0000 (09:40 +0200)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 14 Jun 2026 09:45:32 +0000 (11:45 +0200)
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>
target/linux/ipq806x/base-files/etc/board.d/02_network
target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts

index 0b213b1116186fd3d60a7e082e52e03a02cc6ae3..6f490cb55ddd23151cba1713590b4f337446bf10 100644 (file)
@@ -53,7 +53,8 @@ ipq806x_setup_interfaces()
                ;;
        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)
index 3e13e4e76414f677a8a9f3132928af026a1fd8e7..c081d78f32c7e6fd6efa581839bff37c333b36e4 100644 (file)
                };
        };
 
+       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 {