LSDK21.08 LS1043AQDS RGMII & QSGMII

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

LSDK21.08 LS1043AQDS RGMII & QSGMII

Jump to solution
1,846 Views
SpringMelon
Contributor III

Dear WANG,My custom ls1043ads board, one PHY RTL8211B connected to EC2 through GMAC2, one microchip LAN8814 connected to serdes using QSGMII0, I want to know how I should modify the kernel to make it work properly in rootfs? Looking forward to your reply, the final kick.The complete log is attached.

SpringMelon_0-1721296090591.png

SpringMelon_1-1721296128537.png

@yipingwang 

Labels (1)
0 Kudos
Reply
1 Solution
1,347 Views
SpringMelon
Contributor III

Wang, Thank you very much for your support. After checking, because we used RGMII2, we did not connect the EC1_GTX_CLK125 clock source used by the CPU by default, so RGMI2_TX_CLK could not work properly. At present, it has been pinged through, and the hardware flight line test is indeed the problem.However, packet loss may occur.

SpringMelon_0-1722230172510.png

 

However, the most important our qsgmii is still not working properly, do I need to open a new topic?

@yipingwang 

View solution in original post

0 Kudos
Reply
16 Replies
1,796 Views
yipingwang
NXP TechSupport
NXP TechSupport

First, please configure the MAC addresses for your Ethernet ports similar as the following.

eth10addr=00:04:9F:01:04:0D
eth11addr=00:04:9F:01:04:0E
eth12addr=00:04:9F:01:04:0F
eth13addr=00:04:9F:01:04:10
eth14addr=00:04:9F:01:04:11
eth15addr=00:04:9F:01:04:12
eth1addr=00:04:9F:01:04:04
eth2addr=00:04:9F:01:04:05
eth3addr=00:04:9F:01:04:06
eth4addr=00:04:9F:01:04:07
eth5addr=00:04:9F:01:04:08
eth6addr=00:04:9F:01:04:09
eth7addr=00:04:9F:01:04:0A
eth8addr=00:04:9F:01:04:0B
eth9addr=00:04:9F:01:04:0C

In the default Linux Kernel configuration, the following configurations have been enabled, no need to reconfigure Linux Kernel.

CONFIG_REALTEK_PHY

CONFIG_MICREL_PHY

For dts configuration, RGMII PHY addresses are same as LS1043AQDS, no need to do modification.

You need to modify the MDIO PHY address for QSGMII interface in dts file /arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts. 

Please modify the following dts file, modify "status" as "okay", modify "reg = <0x8>" with your real PHY address connecting to QSGMII0 interface.

     ethernet@e0000 {

                phy-handle = <&qsgmii_phy_s2_p1>;

                phy-connection-type = "sgmii";

        };

       

           /* Slot 1 */

                ls1043mdio_s2: mdio@3 {

                        reg = <0x60>;

                        #address-cells = <1>;

                        #size-cells = <0>;

                        status = "disabled";

 

                        qsgmii_phy_s2_p1: ethernet-phy@8 {

                                reg = <0x8>;

                        };

0 Kudos
Reply
1,787 Views
SpringMelon
Contributor III

Wang,Thank you very much for your prompt reply.But it still does not work completely. I will provide more relevant information in the attachment for your reference. Looking forward to your reply, thank you.
SpringMelon_0-1721644270689.png

SpringMelon_2-1721644395591.png

SpringMelon_3-1721644426469.png

@yipingwang 

 

 

 

0 Kudos
Reply
1,767 Views
yipingwang
NXP TechSupport
NXP TechSupport

Pls check if PHY probed under /sys/bus/mdio_bus/

root@TinyLinux:~# ls -lh /sys/bus/mdio_bus/devices/0.0:01/
total 0
-r--r--r-- 1 root root 4.0K Jul 23 12:28 consumers
lrwxrwxrwx 1 root root 0 Jul 23 12:28 driver -> ../../../../../../../../../bus/mdio_bus/drivers/RTL8211F Gigabit Ethernet
lrwxrwxrwx 1 root root 0 Jul 23 12:28 of_node -> ../../../../../../../../../firmware/devicetree/base/soc/ifc@1530000/board-control@2,0/mdio-mux-emi1/mdio@0/ethernet-phy@1
-r--r--r-- 1 root root 4.0K Jul 23 12:28 phy_has_fixups
-r--r--r-- 1 root root 4.0K Jul 23 12:28 phy_id
-r--r--r-- 1 root root 4.0K Jul 23 12:28 phy_interface
drwxr-xr-x 2 root root 0 Jul 23 12:28 power
drwxr-xr-x 2 root root 0 Jul 23 12:28 statistics
lrwxrwxrwx 1 root root 0 Jul 23 12:28 subsystem -> ../../../../../../../../../bus/mdio_bus
-r--r--r-- 1 root root 4.0K Jul 23 12:28 suppliers
-rw-r--r-- 1 root root 4.0K Jul 23 12:21 uevent
root@TinyLinux:~#

0 Kudos
Reply
1,756 Views
yipingwang
NXP TechSupport
NXP TechSupport

If you cannot get PHY information with the above command.

Please delete device node &fpga  and modify dts as the following.

&fman0 {

        ethernet@e0000 {

                phy-handle = <&qsgmii_phy1>;

                phy-connection-type = "qsgmii";

        };

 

        ethernet@e4000 {

                phy-handle = <&rgmii_phy1>;

                phy-connection-type = "rgmii-id";

        };

 

        ethernet@e6000 {

                phy-handle = <&rgmii_phy2>;

                phy-connection-type = "rgmii-id";

        };

 

        mdio@fc000 {

                rgmii_phy1: ethernet-phy@1 {

                        reg = <0x1>;

                };

 

                rgmii_phy2: ethernet-phy@2 {

                        reg = <0x2>;

                };

 

                qsgmii_phy1: ethernet-phy@4 {

                        reg = <0x4>;

                };

}

Then check whether you could get PHY information with the following commands.

root@TinyLinux:~# cd /sys/bus/mdio_bus/devices/

root@TinyLinux:/sys/bus/mdio_bus/devices# cd 0x0000000001afc000\:01/

consumers       of_node/        phy_id          power/          subsystem/      uevent

driver/         phy_has_fixups  phy_interface   statistics/     suppliers

root@TinyLinux:/sys/bus/mdio_bus/devices# cd 0x0000000001afc000\:01/

root@TinyLinux:/sys/bus/mdio_bus/devices/0x0000000001afc000:01# ls -l

total 0

-r--r--r-- 1 root root 4096 Mar  9 12:35 consumers

lrwxrwxrwx 1 root root    0 Mar  9 12:35 driver -> ../../../../../../../../bus/mdio_bus/drivers/RTL8211F Gigabit Ethernet

lrwxrwxrwx 1 root root    0 Mar  9 12:35 of_node -> ../../../../../../../../firmware/devicetree/base/soc/fman@1a00000/mdio@fc000/ethernet-phy@1

-r--r--r-- 1 root root 4096 Mar  9 12:35 phy_has_fixups

-r--r--r-- 1 root root 4096 Mar  9 12:35 phy_id

-r--r--r-- 1 root root 4096 Mar  9 12:35 phy_interface

drwxr-xr-x 2 root root    0 Mar  9 12:35 power

drwxr-xr-x 2 root root    0 Mar  9 12:35 statistics

lrwxrwxrwx 1 root root    0 Mar  9 12:35 subsystem -> ../../../../../../../../bus/mdio_bus

-r--r--r-- 1 root root 4096 Mar  9 12:35 suppliers

-rw-r--r-- 1 root root 4096 Jan  1  1970 uevent

root@TinyLinux:/sys/bus/mdio_bus/devices/0x0000000001afc000:01#      

0 Kudos
Reply
1,736 Views
SpringMelon
Contributor III

Wang, I'm sorry to tell you that the debugging still hasn't been done, but when I pulled down rgmii in ramdisk, no errors related to phy were reported, and QSGMII didn't seem to have any changes. What I want to know is whether my QSGMII should enable 4 network ports instead of one, because I connected lan8814 with 4 network ports. In the attachment, I submitted the content of the latest device tree that I want to try.

SpringMelon_2-1721719047759.png

 

SpringMelon_1-1721718573939.png

 

 

0 Kudos
Reply
1,712 Views
yipingwang
NXP TechSupport
NXP TechSupport

You need to define 4 QSGMII ports.

Please check the following after using your new dts file.

root@TinyLinux:/sys/bus/mdio_bus/devices# cd 0x0000000001afc000:02
root@TinyLinux:/sys/bus/mdio_bus/devices/0x0000000001afc000:02# ls -lh
total 0
-r--r--r-- 1 root root 4.0K Mar 9 16:21 consumers
lrwxrwxrwx 1 root root 0 Mar 9 16:21 driver -> ../../../../../../../../bus/mdio_bus/drivers/RTL8211F Gigabit Ethernet
lrwxrwxrwx 1 root root 0 Mar 9 16:21 of_node -> ../../../../../../../../firmware/devicetree/base/soc/fman@1a00000/mdio@fc000/ethernet-phy@2
-r--r--r-- 1 root root 4.0K Mar 9 16:21 phy_has_fixups
-r--r--r-- 1 root root 4.0K Mar 9 16:21 phy_id
-r--r--r-- 1 root root 4.0K Mar 9 16:21 phy_interface
drwxr-xr-x 2 root root 0 Mar 9 16:21 power
drwxr-xr-x 2 root root 0 Mar 9 16:21 statistics
lrwxrwxrwx 1 root root 0 Mar 9 16:21 subsystem -> ../../../../../../../../bus/mdio_bus
-r--r--r-- 1 root root 4.0K Mar 9 16:21 suppliers
-rw-r--r-- 1 root root 4.0K Jan 1 1970 uevent
root@TinyLinux:/sys/bus/mdio_bus/devices/0x0000000001afc000:02#

 

Please check QSGMII PHY information with the following command.

~# ls -lh /sys/bus/mdio_bus/devices/0x0000000001afc000:04/
total 0
-r--r--r-- 1 root root 4.0K Mar 9 16:30 consumers
lrwxrwxrwx 1 root root 0 Mar 9 16:30 driver -> ../../../../../../../../bus/mdio_bus/drivers/Microsemi GE VSC8514 SyncE
lrwxrwxrwx 1 root root 0 Mar 9 16:30 of_node -> ../../../../../../../../firmware/devicetree/base/soc/fman@1a00000/mdio@fc000/ethernet-phy@4
-r--r--r-- 1 root root 4.0K Mar 9 16:30 phy_has_fixups
-r--r--r-- 1 root root 4.0K Mar 9 16:30 phy_id
-r--r--r-- 1 root root 4.0K Mar 9 16:30 phy_interface
drwxr-xr-x 2 root root 0 Mar 9 16:30 power
drwxr-xr-x 2 root root 0 Mar 9 16:30 statistics
lrwxrwxrwx 1 root root 0 Mar 9 16:30 subsystem -> ../../../../../../../../bus/mdio_bus
-r--r--r-- 1 root root 4.0K Mar 9 16:30 suppliers
-rw-r--r-- 1 root root 4.0K Jan 1 1970 uevent
root@TinyLinux:~#

 

0 Kudos
Reply
1,698 Views
SpringMelon
Contributor III

Because I use EC2, as you say, I should check the/sys/bus/mdio_bus/devices / 0 x0000000001afc000:02 /. But the driver of rgmii is not displayed correctly, I asked for rtl8211B, qsgmii does not display the driver at all.

SpringMelon_1-1721725452983.png

 

SpringMelon_0-1721725396393.png

 

0 Kudos
Reply
1,663 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please read the PHY ID of MDIO PHY address 2 with the following command.

~# cat /sys/bus/mdio_bus/devices/0x0000000001afc000\:02/phy_id

 

Please check whether the following path exists.

/sys/devices/platform/soc/soc\:fsl\,dpaa/soc\:fsl\,dpaa\:ethernet\@0/net/fm1-mac1

 

0 Kudos
Reply
1,641 Views
SpringMelon
Contributor III

Wang,Thank you for your patient support. Last night, I found that the configuration of dts about rgmii was different from my schematic diagram (mdio1-- QSGMII mdio2-- RGMII). Now it has been modified, the driver can be recognized and the link can be normal, but the computer directly connected to ping cannot be pinged.
I want to know if I need to configure the value of PHY RTL8211F tx/rx delay in the phy register. I have just tried the attributes phy-connection-type = "rgmii" and phy-connection-type = "rgmii-id", but nothing has changed.

SpringMelon_1-1721802720638.png

SpringMelon_2-1721805620232.png

SpringMelon_3-1721805655227.png

Also, I don't know if this tip is useful information.

SpringMelon_4-1721805762282.png

 

 

0 Kudos
Reply
1,632 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please use "phy-connection-type = "rgmii-id"

Linux booting up information is normal.

For PC, configure IP address to 192.168.0.1, netmask is 255.255.255.0 For LS1 board, configure IP address to 192.168.0.2, netmask is 255.255.255.0

 

Please check whether RX counters increased in PC to check whether PC received frames from LS1 board.

 

Also, if there is a firewall strategy on the PC side, turn off the firewall.

 

In addition, is it correct to connect RGMII2(fm1-mac4) to phy address 1 on MDIO2 ? Not phy address 2?

 

0 Kudos
Reply
1,627 Views
SpringMelon
Contributor III

Trying as you suggested still failed, because my firewall has been down for a long time due to debugging, and I can ping through other device network ports. On the issue of phy address, since I only used one phy, my schematic design also set it to 1, the reason the reference board is phy address 2 is to distinguish between the two PhYs. rgmii-id reads rx/tx delay from phy, so I suspect there is a problem here.

SpringMelon_0-1721810079572.png

In addition, I have heard before that there is a bug in the recognition interface type rgmii or rgmii-id in the previous version of the kernel.

0 Kudos
Reply
1,622 Views
yipingwang
NXP TechSupport
NXP TechSupport

The demo board also uses the same phy as your custom board, so there should be no problem with the software.

Please refer to the attached picture to check whether the PC can receive packets from the custom board.

In addition, please connect the PC and your custom board directly with Ethernet cable.

0 Kudos
Reply
1,619 Views
SpringMelon
Contributor III
Hello, I have checked, when I ping the packet in my custom board, the PC does not receive the corresponding packet.
0 Kudos
Reply
1,507 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check /sys/devices/platform/soc/soc\:fsl\,dpaa/soc\:fsl\,dpaa\:ethernet\@3/net/fm1-mac4/mac_tx_stats after ping PC from the target board.

root@TinyLinux:~# ifconfig fm1-mac4 100.1.1.100
root@TinyLinux:~# ping 100.1.1.1
PING 100.1.1.1 (100.1.1.1): 56 data bytes
64 bytes from 100.1.1.1: seq=0 ttl=64 time=0.774 ms
64 bytes from 100.1.1.1: seq=1 ttl=64 time=0.352 ms
^C
--- 100.1.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.352/0.563/0.774 ms
root@TinyLinux:~# cat /sys/devices/platform/soc/soc\:fsl\,dpaa/soc\:fsl\,dpaa\:ethernet\@3/net/fm1-mac4/mac_tx_stats
-------


FM MAC - MEMAC -3 Tx stats (0xFFFFA73DF2A8D000)
----------------------------------------

0xFFFFA73DF2A8D200: 0x000003bc teoct_l
0xFFFFA73DF2A8D204: 0x00000000 teoct_u
0xFFFFA73DF2A8D208: 0x000003bc toct_l
0xFFFFA73DF2A8D20C: 0x00000000 toct_u
0xFFFFA73DF2A8D218: 0x00000000 txpf_l
0xFFFFA73DF2A8D21C: 0x00000000 txpf_u
0xFFFFA73DF2A8D220: 0x0000000b tfrm_l
0xFFFFA73DF2A8D224: 0x00000000 tfrm_u
0xFFFFA73DF2A8D228: 0x00000000 tfcs_l
0xFFFFA73DF2A8D22C: 0x00000000 tfcs_u
0xFFFFA73DF2A8D230: 0x00000000 tvlan_l
0xFFFFA73DF2A8D234: 0x00000000 tvlan_u
0xFFFFA73DF2A8D238: 0x00000000 terr_l
0xFFFFA73DF2A8D23C: 0x00000000 terr_u
0xFFFFA73DF2A8D240: 0x00000002 tuca_l
0xFFFFA73DF2A8D244: 0x00000000 tuca_u
0xFFFFA73DF2A8D248: 0x00000008 tmca_l
0xFFFFA73DF2A8D24C: 0x00000000 tmca_u
0xFFFFA73DF2A8D250: 0x00000001 tbca_l
0xFFFFA73DF2A8D254: 0x00000000 tbca_u
0xFFFFA73DF2A8D260: 0x0000000b tpkt_l
0xFFFFA73DF2A8D264: 0x00000000 tpkt_u
0xFFFFA73DF2A8D268: 0x00000000 tund_l
0xFFFFA73DF2A8D26C: 0x00000000 tund_u
0xFFFFA73DF2A8D270: 0x00000001 t64_l
0xFFFFA73DF2A8D274: 0x00000000 t64_u
0xFFFFA73DF2A8D278: 0x0000000a t127_l
0xFFFFA73DF2A8D27C: 0x00000000 t127_u
0xFFFFA73DF2A8D280: 0x00000000 t255_l
0xFFFFA73DF2A8D284: 0x00000000 t255_u
0xFFFFA73DF2A8D288: 0x00000000 t511_l
0xFFFFA73DF2A8D28C: 0x00000000 t511_u
0xFFFFA73DF2A8D290: 0x00000000 t1023_l
0xFFFFA73DF2A8D294: 0x00000000 t1023_u
0xFFFFA73DF2A8D298: 0x00000000 t1518_l
0xFFFFA73DF2A8D29C: 0x00000000 t1518_u
0xFFFFA73DF2A8D2A0: 0x00000000 t1519x_l
0xFFFFA73DF2A8D2A4: 0x00000000 t1519x_u
0xFFFFA73DF2A8D2C0: 0x00000000 tcnp_l
0xFFFFA73DF2A8D2C4: 0x00000000 tcnp_u
root@TinyLinux:~#

0 Kudos
Reply
1,348 Views
SpringMelon
Contributor III

Wang, Thank you very much for your support. After checking, because we used RGMII2, we did not connect the EC1_GTX_CLK125 clock source used by the CPU by default, so RGMI2_TX_CLK could not work properly. At present, it has been pinged through, and the hardware flight line test is indeed the problem.However, packet loss may occur.

SpringMelon_0-1722230172510.png

 

However, the most important our qsgmii is still not working properly, do I need to open a new topic?

@yipingwang 

0 Kudos
Reply
1,339 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please create a new thread to continue to discuss qsgmii.

0 Kudos
Reply