LS1043A Ethernet Additional Issue!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1043A Ethernet Additional Issue!

Jump to solution
3,433 Views
Gyosun
Contributor III

Hello,

I am using LS1043A custom board.
SDK is QORIQ-SDK-2.0-1703.

Previously, Ethernet was used well as follows.
SRDS_PRTCL_S1_RCW[128:143]: 1460
SerdesA - XFI - Retimer - 10G SFP+
Reset Configuration Word (RCW):
00000000: 08100010 0a000000 00000000 00000000
00000010: 14600002 80004012 60040000 c1002000
00000020: 00000000 00000000 00000000 0002e806
00000030: 00000000 001e1308 00000096 00000001

We needed additional 1G Ethernet, so we changed the existing 10G slot to 1G.
SRDS_PRTCL_S1_RCW[128:143]: 3460
SerdesA - SGMII - PHY - RJ45

I changed RCW from 1460 to 3460 and tried to boot,
but even u-boot doesn't show any logs.

Do I need to change the fsl_fman_ucode_ls1043_r1.1_108_4_9.bin file?
If I need to change it, how can I do it without the source code?
Or do you know what else is wrong?

Thank you,
Best Regards,
Gyosun.

 

0 Kudos
Reply
1 Solution
3,384 Views
Gyosun
Contributor III
I solved it myself and share it for help.
 
I set up dts like this:
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
fman0_10g_rx0: port@90000 {
  cell-index = <0>;
  compatible = "fsl,fman-port-10g-rx";
  reg = <0x90000 0x1000>;
};
 
fman0_10g_tx0: port@b0000 {
  cell-index = <0>;
  compatible = "fsl,fman-port-10g-tx";
  reg = <0xb0000 0x1000>;
  fsl,qman-channel-id = <0x800>;
};
 
fm1mac9: ethernet@f0000 {
  cell-index = <0>;
  compatible = "fsl,fman-memac";
  reg = <0xf0000 0x1000>;
  fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>;
};
 
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
&fman0 {
  ethernet@e4000 {
    phy-handle = <&rgmii_phy1>;
    phy-connection-type = "rgmii";
  };
 
  ethernet@e6000 {
    phy-handle = <&rgmii_phy2>;
    phy-connection-type = "rgmii";
  };
 
  ethernet@f0000 { 
    phy-handle = <&sgmii_phy1>;
    phy-connection-type = "sgmii";
  };
 
  mdio@fc000 {
    rgmii_phy1: ethernet-phy@0 {
      reg = <0x0>;
    };
 
    rgmii_phy2: ethernet-phy@1 {
      reg = <0x1>;
    };
 
    sgmii_phy1: ethernet-phy@3 {
      reg = <0x3>;
    };
  };
};
 
When changing from xfi to sgmii, you need to change SD1_REF_CLK from 156MHz to 125MHz. 
I reset the phy address in uboot and dts.
 

View solution in original post

0 Kudos
Reply
2 Replies
3,396 Views
Gyosun
Contributor III
Somehow the log was printed.
 
It was recognized as follows in u-boot.
 
=> mdio list
FSL_MDIO0:
0 - AR8035 <--> FM1@DTSEC6
1 - AR8035 <--> FM1@DTSEC4
3 - AR8031/AR8033 <--> FM1@DTSEC9
FM_TGEC_MDIO:
=> mii info
PHY 0x00: OUI = 0x1374, Model = 0x07, Rev = 0x02, 1000baseX, HDX
PHY 0x01: OUI = 0x1374, Model = 0x07, Rev = 0x02, 1000baseX, HDX
PHY 0x03: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, FDX
=>
 
After booting, 
 
CASE1:
The dts file is set up as follows:
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
fman0: fman@1a00000 {
...
fman0_rx8: port@90000 {
cell-index = <8>;
compatible = "fsl,fman-port-1g-rx";
reg = <0x90000 0x1000>;
};
 
fman0_tx8: port@b0000 {
cell-index = <8>;
compatible = "fsl,fman-port-1g-tx";
reg = <0xb0000 0x1000>;
};
 
fm1mac9: ethernet@f0000 {
cell-index = <8>;
compatible = "fsl,fman-memac";
reg = <0xf0000 0x1000>;
fsl,port-handles = <&fman0_rx8 &fman0_tx8>;
};
...
};
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
&fman0 {
ethernet@e4000 {
status = "okay";
phy-handle = <&rgmii_phy1>;
phy-connection-type = "rgmii";
};
 
ethernet@e6000 {
status = "okay";
phy-handle = <&rgmii_phy2>;
phy-connection-type = "rgmii";
};
 
ethernet@f0000 { 
status = "okay";
phy-handle = <&sgmii_phy1>;
phy-connection-type = "sgmii";
};
 
mdio@fc000 {
rgmii_phy1: ethernet-phy@1 {
reg = <0x1>;
};
 
rgmii_phy2: ethernet-phy@2 {
reg = <0x2>;
};
 
sgmii_phy1: ethernet-phy@3 {
reg = <0x3>;
};
};
};
I checked with ifconfig -a and fm1-mac9 is not visible at all.
root@ls1043ardb:~# ifconfig -a
fm1-mac3  Link encap:Ethernet  HWaddr fc:c2:3d:31:76:54
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:1ae4000-1ae4fff
 
fm1-mac4  Link encap:Ethernet  HWaddr 00:04:9f:04:4d:e2
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:1ae6000-1ae6fff
 
root@ls1043ardb:~# dmesg | grep fm1
[    4.458930] fsl_dpa fsl,dpaa:ethernet@2 fm1-mac3: renamed from eth0
[    4.519680] udevd[1353]: renamed network interface eth0 to fm1-mac3
[    4.526057] fsl_dpa fsl,dpaa:ethernet@3 fm1-mac4: renamed from eth1
[    4.669416] udevd[1354]: renamed network interface eth1 to fm1-mac4
root@ls1043ardb:~# uname -a
Linux ls1043ardb 4.1.35-rt41 #16 SMP Tue Nov 8 19:14:01 KST 2022 aarch64 GNU/Linux
 
CASE2:
The dts file is set up as follows:
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
fman0: fman@1a00000 {
...
fman0_10g_rx0: port@90000 {
cell-index = <0>;
compatible = "fsl,fman-port-10g-rx";
reg = <0x90000 0x1000>;
};
 
fman0_10g_tx0: port@b0000 {
cell-index = <0>;
compatible = "fsl,fman-port-10g-tx";
reg = <0xb0000 0x1000>;
fsl,qman-channel-id = <0x800>;
};
 
fm1mac9: ethernet@f0000 {
cell-index = <0>;
compatible = "fsl,fman-memac";
reg = <0xf0000 0x1000>;
fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>;
};
...
};
 
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
&fman0 {
ethernet@e4000 {
status = "okay";
phy-handle = <&rgmii_phy1>;
phy-connection-type = "rgmii";
};
 
ethernet@e6000 {
status = "okay";
phy-handle = <&rgmii_phy2>;
phy-connection-type = "rgmii";
};
 
ethernet@f0000 { 
phy-connection-type = "sgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};
 
mdio@fc000 {
rgmii_phy1: ethernet-phy@1 {
reg = <0x1>;
};
 
rgmii_phy2: ethernet-phy@2 {
reg = <0x2>;
};
};
};
 
This time I can see fm1-mac9 but I can't ping it. Other ports that were working fine also can't ping it.
root@ls1043ardb:~# ifconfig -a
fm1-mac3  Link encap:Ethernet  HWaddr fc:c2:3d:31:76:54
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:1ae4000-1ae4fff
 
fm1-mac4  Link encap:Ethernet  HWaddr 00:04:9f:04:4d:e2
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:1ae6000-1ae6fff
 
fm1-mac9  Link encap:Ethernet  HWaddr 00:04:9f:04:4d:e5
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:1af0000-1af0fff
root@ls1043ardb:~# ifconfig fm1-mac9 192.168.0.100/16
root@ls1043ardb:~# ping 192.168.20.10
PING 192.168.20.10 (192.168.20.10) 56(84) bytes of data.
From 192.168.0.100 icmp_seq=1 Destination Host Unreachable
From 192.168.0.100 icmp_seq=2 Destination Host Unreachable
From 192.168.0.100 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.20.10 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3000ms
pipe 3
root@ls1043ardb:~# dmesg | grep fm1
[    4.455602] fsl_dpa fsl,dpaa:ethernet@2 fm1-mac3: renamed from eth0
[    4.549437] udevd[1494]: renamed network interface eth0 to fm1-mac3
[    4.549772] fsl_dpa fsl,dpaa:ethernet@8 fm1-mac9: renamed from eth2
[    4.629395] udevd[1497]: renamed network interface eth2 to fm1-mac9
[    4.631714] fsl_dpa fsl,dpaa:ethernet@3 fm1-mac4: renamed from eth1
[    4.719371] udevd[1495]: renamed network interface eth1 to fm1-mac4
root@ls1043ardb:~# ifconfig fm1-mac9 down
[  174.695225] cpu 0: > WARNING (FM-Port) [CPU00, /home/yhoh/wk-qoriqSDKv2-1703/qoriqSDKv2-1703_dru100_V1_180316/build_ls1043ardb/tmp/work-shared/ls1043ardb/kernel-source/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c:3547 FM_PORT_Disable]:
[  174.718163] cpu 0: FM-0-port-10g-TX-0: BMI or QMI is Busy. Port forced down[  174.725120] cpu 0:
root@ls1043ardb:~# ifconfig fm1-mac3 192.168.0.100/16
root@ls1043ardb:~# ping 192.168.20.10
PING 192.168.20.10 (192.168.20.10) 56(84) bytes of data.
From 192.168.0.100 icmp_seq=1 Destination Host Unreachable
From 192.168.0.100 icmp_seq=2 Destination Host Unreachable
From 192.168.0.100 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.20.10 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5008ms
pipe 3
root@ls1043ardb:~# ifconfig fm1-mac3 down
root@ls1043ardb:~# ifconfig fm1-mac4 192.168.0.100/16
[  267.330310] fsl_dpa fsl,dpaa:ethernet@3 fm1-mac4: Could not connect to PHY /soc/fman@1a00000/mdio@fc000/ethernet-phy@2
[  267.341016] fsl_dpa fsl,dpaa:ethernet@3 fm1-mac4: init_phy() = -19
SIOCSIFFLAGS: No such device
 
What's the problem? I need help.
 
Thank you,
Best Regards,
Gyosun.
0 Kudos
Reply
3,385 Views
Gyosun
Contributor III
I solved it myself and share it for help.
 
I set up dts like this:
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
fman0_10g_rx0: port@90000 {
  cell-index = <0>;
  compatible = "fsl,fman-port-10g-rx";
  reg = <0x90000 0x1000>;
};
 
fman0_10g_tx0: port@b0000 {
  cell-index = <0>;
  compatible = "fsl,fman-port-10g-tx";
  reg = <0xb0000 0x1000>;
  fsl,qman-channel-id = <0x800>;
};
 
fm1mac9: ethernet@f0000 {
  cell-index = <0>;
  compatible = "fsl,fman-memac";
  reg = <0xf0000 0x1000>;
  fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>;
};
 
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
&fman0 {
  ethernet@e4000 {
    phy-handle = <&rgmii_phy1>;
    phy-connection-type = "rgmii";
  };
 
  ethernet@e6000 {
    phy-handle = <&rgmii_phy2>;
    phy-connection-type = "rgmii";
  };
 
  ethernet@f0000 { 
    phy-handle = <&sgmii_phy1>;
    phy-connection-type = "sgmii";
  };
 
  mdio@fc000 {
    rgmii_phy1: ethernet-phy@0 {
      reg = <0x0>;
    };
 
    rgmii_phy2: ethernet-phy@1 {
      reg = <0x1>;
    };
 
    sgmii_phy1: ethernet-phy@3 {
      reg = <0x3>;
    };
  };
};
 
When changing from xfi to sgmii, you need to change SD1_REF_CLK from 156MHz to 125MHz. 
I reset the phy address in uboot and dts.
 
0 Kudos
Reply