WIP: attempt to fix ethernet
authorStijn Tintel <stijn@linux-ipv6.be>
Tue, 15 Mar 2022 01:07:04 +0000 (03:07 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Wed, 8 Feb 2023 15:18:05 +0000 (17:18 +0200)
eth0, eth1 and eth2 have working TX but no RX. Tried rgmii, rgmii-id,
rgmii-rxid, rgmii-txid, sgmii, gmii, but all of them seem to have the
same problem :/

target/linux/qoriq/base-files/etc/board.d/02_network
target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m200.dts
target/linux/qoriq/patches-5.10/300-m200-interface-order.patch [new file with mode: 0644]

index 355c8d37a4644f72737edc9b1d9757c3eaf7758f..959b6e4ffc872999618f4c7ee9a60ff158c5b20f 100644 (file)
@@ -15,6 +15,7 @@ wg_set_opt_interface() {
 }
 
 case "$board" in
+watchguard,firebox-m200|\
 watchguard,firebox-m300)
        ucidef_set_interfaces_lan_wan "eth1" "eth0"
        wg_set_opt_interface "eth2" "2"
index 17593607773e416e6dc5ff62144347603d7d85d9..cadb7ff4793c69319bdbe229eb2a5f51eeb7047f 100644 (file)
        model = "WatchGuard Firebox M200";
        compatible = "watchguard,firebox-m200", "fsl,T1042RDB_PI";
 
+       aliases {
+               /delete-property/ ethernet0;
+               /delete-property/ ethernet1;
+               /delete-property/ ethernet2;
+               /delete-property/ ethernet3;
+               /delete-property/ ethernet4;
+
+               ethernet0 = &enet2;
+               ethernet1 = &enet0;
+               ethernet2 = &enet1;
+       };
+
+};
+
+&soc {
+/include/ "qoriq-fman3-0-1g-2.dtsi"
 };
 
 #include "t1040si-post.dtsi"
 #include "watchguard-firebox-mx00-ifc.dtsi"
 
-/ {
+&fman0 {
+       // ethernet@e6000 and ethernet@e8000 are defined in t104xrdb.dtsi
+       // remove these nodes to fix the interface order
+       /delete-node/ ethernet@e6000;
+       /delete-node/ ethernet@e8000;
+};
+
+// ethernet @ e4000 = eth0 = phy@0
+&enet2 {
+       phy-mode = "rgmii";
+       phy-handle = <&phy0>;
+};
+
+// ethernet @ e0000 = eth1 = phy@1
+&enet0 {
+       phy-mode = "sgmii";
+       phy-handle = <&phy1>;
+};
+
+// ethernet @ e2000 = eth2 = phy@2
+&enet1 {
+       phy-mode = "gmii";
+       phy-handle = <&phy2>;
+};
+
+
+&mdio0 {
+       // m200 ethernet port 0
+       phy0: ethernet-phy@0 {
+               reg = <0x00>;
+       };
+
+       // m200 ethernet port 1
+       phy1: ethernet-phy@1 {
+               reg = <0x01>;
+       };
+
+       // m200 ethernet port 2
+       phy2: ethernet-phy@2 {
+               reg = <0x02>;
+       };
 
-       localbus@ffe124000 {
-               /* one of these causes serious havoc, didn't happen in m200 branch */
-               /* likely due to qoriq having more kernel options enabled, disable for now */
-               /delete-node/ nor@0,0;
-               /delete-node/ nand@2,0;
+       phy3: ethernet-phy@3 {
+               reg = <0x03>;
        };
 };
diff --git a/target/linux/qoriq/patches-5.10/300-m200-interface-order.patch b/target/linux/qoriq/patches-5.10/300-m200-interface-order.patch
new file mode 100644 (file)
index 0000000..e001799
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/arch/powerpc/boot/dts/fsl/t104xrdb.dtsi b/arch/powerpc/boot/dts/fsl/t104xrdb.dtsi
+index 099a598c74c0..5263b00bbc35 100644
+--- a/arch/powerpc/boot/dts/fsl/t104xrdb.dtsi
++++ b/arch/powerpc/boot/dts/fsl/t104xrdb.dtsi
+@@ -137,16 +137,6 @@ pca9546@77 {
+               };
+               fman@400000 {
+-                      ethernet@e6000 {
+-                              phy-handle = <&phy_rgmii_0>;
+-                              phy-connection-type = "rgmii";
+-                      };
+-
+-                      ethernet@e8000 {
+-                              phy-handle = <&phy_rgmii_1>;
+-                              phy-connection-type = "rgmii";
+-                      };
+-
+                       mdio0: mdio@fc000 {
+                               phy_sgmii_2: ethernet-phy@3 {
+                                       reg = <0x03>;