Hello,
we are using the LS1021a with yocto linux. We were using the 3.12 rt kernel which worked fine but now want to upgrade to the 4.14 rt Kernel.
With the new Kernel i have troubles.
When i connect one of the SGMII Ethernet Ports to a 100MBit Network and restart the interface with ifdown / ifup i get the following Error Message:
803x_aneg_done: SGMII link is not ok
This means the autoneg on SGMII won't finish and thus the link is not up.
I can come clean from this state if i use ethtool and set autoneg off and on again
I can also solve this error by reverting the at803x driver to the state from the 3.12 kernel.
But then i get the next Problem, also only if i'm connected to a 100Mbit Network. If i ifdown and ifup now the interface sometimes it is broken. That means it looks like the link is up but no Packets were transmitted or received (also the driver says he transmittes some packets). If i do the ifdown ifup again most times the interface is working again.
Has anyone some suggestions how i can find and solve this issue?
Kind Regards
Matthias
NXP offers LSDK 1909 for the TWR-LS1021A board:
This LSDK Support of the dual kernel, LTS 4.14.140 and LTS 4.19.68.
Perhaps this LSDK can be used for your task.
See also AN4980 about kernel and modules debugging:
https://www.nxp.com/docs/en/application-note/AN4980.pdf
Have a great day,
Pavel Chubakov
Check SW2 and SW3 setting on your board.
See below:
// NOR boot
SW2[1-3]=100
SW2[4]=0
SW2[5-8]=1111
SW2= 1000_1111 0-OFF 1-ON
// SD boot
SW2[1-3]=001 => SD boot
SW2[4]=0
SW2[5-8]=1111 => NOR is enabled
SW2[5-8]=1010 => QSPI is enabled
SW3=0110_0101
Have a great day,
Pavel Chubakov
Thx for the reminder, i read this in the getting started manual but it did not work.
For my problem with the network i tried to compile driver/net/ethernet/freescale from 3.12 Kernel with the 4.14 Kernel (i removed the 4.14 sourced and copied the 3.12 sources in this folder) - with some minor modifications compilation and running worked - but the problem remains the same.
Do you have some recommendations how i could debug this sgmii bus? Where can be codefragments which alter the state of this bus?
Build .img file for the TWR-LS1021a board using the following command in LSKD 1909:
flex-builder -i mkfw -m ls1021atwr -b sd
Use the following command on your Linux PC to write .img file to SD card:
sudo dd if=firmware_ls1021atwr_uboot_sdboot.img of=/dev/sdb bs=512 seek=8
Test this image on your LS1021a board.
Have a great day,
Pavel Chubakov
I tried this, also install with flex-builder but it does not work. Maybe because i have a old Version of the Twr?
I can't load uboot from sdcard - the D5 LED goes dark but no output on the serial console.
And when i tried some things i also cleared the uboot from the nor memory.
But i found some posts on the internet which mentioned some big little Endian changes in the network driver and i use an old u-boot Version (from the sdk with kernel 3.12) and i wan't to run here a 4.14 Kernel. So maybe the problem comes from this. I will look into this now.
NXP offers LSDK 1909 for the TWR-LS1021a board.
This LSDK supports PREEMPT_RT patch and the dual kernel, LTS 4.14.140 and LTS 4.19.68.
There is no problem for Ethernet using under this LSDK.
Perhaps this LSDK can be used for your task.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for the advice, also i don't use the lsdk i use the kernel from the lsdk from the codeaurora repository. (qoriq-components/linux - Linux Tree for QorIQ support )
I used the LSDK1906 version and now tried the 1909 but the behavior remains the same.
I then compiled the ls1021a-twr.dts from the LSDK1909 version and the kernel and tested it on the ls1021a-twr board but get the same results.
So i will try to find a LSDK1909 image for the ls1021a-twr board and will post my results.
King Regards,
Matthias