I am trying to hook an ar8334 switch to the lantiq switch on a Fritzbox 5490 not sure how to correctly setup. The mdio bus of the lantiq chip probably needs to be chained to the mdio-bus of the qca8k switch... I am not sure.
Any help would be much appreciated! Maybe someone with more experience in this field can give some guidance here.
This is the setup:
Lantiq-gswip --- port0 - fiber
+- port1 - switch-qca8k --- port2 (lan3)
+- port4 (lan4)
+- port2 (lan2)
+- port4 (lan1)
+- port5 (wasp)
This my network related setup in the devicetree:
&gswip_mdio {
// lan2 - port2
phy5: ethernet-phy@5 {
reg = <0x05>;
};
// lan1 - port4
phy9: ethernet-phy@9 {
reg = <0x09>;
};
// wasp - port5
// phy7: ethernet-phy@7 {
// reg = <0x07>;
// reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
// };
// fiber - qca8033 (serdes transciever) - port0
phy6: ethernet-phy@6 {
reg = <0x06>;
reset-gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
};
// switch - qca8334 - port1
switch18: switch@18 {
compatible = "qca,qca8334";
#address-cells = <1>;
#size-cells = <0>;
dsa,member = <0 1>;
// reg = <0x10>;
reg = <0x18>;
reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "switch";
fixed-link {
speed = <1000>;
full-duplex;
};
};
port@2 {
reg = <1>; // 2
label = "lan3";
};
port@3 {
reg = <2>; // 3
label = "lan4";
};
};
};
};
&gswip_ports {
port@0 {
reg = <0>;
label = "fiber";
phy-mode = "rgmii-rxid";
phy-handle = <&phy6>;
};
port@1 {
reg = <1>;
label = "switch";
phy-mode = "rgmii-id";
phy-handle = <&switch18>;
// fixed-link {
// speed = <1000>;
// full-duplex;
// };
};
port@2 {
reg = <2>;
label = "lan2";
phy-mode = "internal";
phy-handle = <&phy5>;
};
port@4 {
reg = <4>;
label = "lan1";
phy-mode = "internal";
phy-handle = <&phy9>;
};
port@5 {
reg = <5>;
label = "wasp";
phy-mode = "rgmii-txid";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
Producing this output:
[ 8.124154] libphy: Fixed MDIO Bus: probed
[ 8.451618] libphy: lantiq,xrx200-mdio: probed
[ 8.545569] gswip 1e108000.switch: dsa switch register failed: -517
[ 8.556733] membase: ae10b100
[ 8.568965] NET: Registered protocol family 10
[ 8.579258] Segment Routing with IPv6
[ 8.581864] NET: Registered protocol family 17
[ 8.586161] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 8.602882] 8021q: 802.1Q VLAN Support v1.8
[ 8.611614] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[ 8.931647] libphy: lantiq,xrx200-mdio: probed
[ 9.060468] DSA: tree 0 has no CPU port
[ 9.062909] qca8k: probe of 1e108000.switch-mii:18 failed with error -22
[ 9.181142] gswip 1e108000.switch fiber (uninitialized): PHY [1e108000.switch-mii:06] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL)
[ 9.193671] gswip 1e108000.switch switch (uninitialized): no phy at 1
[ 9.198669] gswip 1e108000.switch switch (uninitialized): failed to connect to port 1: -19
[ 9.207089] gswip 1e108000.switch switch (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 1
[ 9.220294] gswip 1e108000.switch lan2 (uninitialized): PHY [1e108000.switch-mii:05] driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (irq=POLL)
[ 9.236991] gswip 1e108000.switch lan1 (uninitialized): PHY [1e108000.switch-mii:09] driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (irq=POLL)
[ 9.254228] DSA: tree 0 setup
[ 9.255822] gswip 1e108000.switch: probed GSWIP version 21 mod 0