From: Sebastian Schaper Date: Sat, 6 Jun 2026 07:40:06 +0000 (+0200) Subject: ipq806x: fix ethernet for Nokia AC400i X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8443da363ebe72161ddfd75d01ec67afe52d0f63;p=thirdparty%2Fopenwrt.git ipq806x: fix ethernet for Nokia AC400i 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 Link: https://github.com/openwrt/openwrt/pull/23740 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 0b213b11161..6f490cb55dd 100644 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -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) diff --git a/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts b/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts index 3e13e4e7641..c081d78f32c 100644 --- a/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts +++ b/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts @@ -153,6 +153,13 @@ }; }; + rgmii0_pins: rgmii0_pins { + mux { + pins = "gpio66"; + drive-strength = <8>; + bias-disable; + }; + }; }; &gsbi5 { @@ -259,17 +266,20 @@ &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 @@ -281,28 +291,21 @@ 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 {