Ls1046a 1000Base-KX/10gBase-KR Linux support

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

Ls1046a 1000Base-KX/10gBase-KR Linux support

Jump to solution
6,340 Views
renaud
Contributor IV

We have a board using with two 10G (1000Base-KR) and one 1000Base-KX connection on Serdes 1. Protocol is 1133

We are using Linux 6.4 and soon 6.11.x

My understanding is that the 1000Base-KX support is not found in the kernel.org as per comment in fman_memac.:

/* TODO: The following interface modes are supported by (some) hardware
* but not by this driver:
* - 1000BASE-KX

 

but can be found in nxp qoirq Linux support:  https://github.com/nxp-qoriq/linux.git

in branch lf-6.6.y.

Also i found: https://community.nxp.com/t5/QorIQ/Eval-Board-for-1000Base-KX-LS1046A/m-p/1178936 which shows what needs to be initialized by the boot loader and Linux.

So could you confirm the following:

1. The upstream Linux support cannot be used to support 1000Base-KX and/or 1000Base-KR on the LS1046A.

2. In the link above, there is mention to configure SGMII_IF_MODE. Which part of Linux does that?

3. Can you show me what the node should look like for the 10Gbase-kr and 1000Base-KX.

4. What is the latest U-boot/Linux to support the LS1046a and specially is there code in U-boot to do the initialization of 1000Base-kr and  1000Base-kx. I guess the link above is the init sequence.

 

Otherwise, If I am wrong about not being able to use upstream kernel (kernel.org), I would appreciate a summary of what I have to do.

 

Cheers,

Renaud 

 

 

 

 

0 Kudos
Reply
1 Solution
5,972 Views
renaud
Contributor IV

Eventually found the error on the 1000base-KX. There a few more bits to set along with clearing the AMP_RED field

View solution in original post

0 Kudos
Reply
7 Replies
5,973 Views
renaud
Contributor IV

Eventually found the error on the 1000base-KX. There a few more bits to set along with clearing the AMP_RED field

0 Kudos
Reply
6,303 Views
LFGP
NXP TechSupport
NXP TechSupport
this is an example how to look like a node for the 1000Base-KX
enet4: ethernet@4 {
compatible = "fsl,fman-memac";
reg = <0x4000 0x1000>;
phy-mode = "1000base-kx";
fixed-link = <4 1 1000 0 0>; // fixed link to 1 Gbps
status = "okay";
};
additionally, you have to follow the steps described in the subject "31.8.1.3 1000Base-KX" in the LS1046ARM.
The LLDP 6.1.55 uses the U-boot release 2023.04
Nothing to config at U-boot
0 Kudos
Reply
6,190 Views
renaud
Contributor IV
A bit confusing when you nothing to config at U-boot. Where do you do the config from 31.8.1.3. I supposed it is split between U-boot and Linux
0 Kudos
Reply
6,210 Views
renaud
Contributor IV

Let's turn to the 10gbase-kr. I saw that there is LANnTECR0  to set up.

I see two DTS include files:

arch/arm64/boot/dts/freescale/fsl-ls1046a-sd1-1133-lane-c-backplane-phylib.dtsi
arch/arm64/boot/dts/freescale/fsl-ls1046a-sd1-1133-lane-c-backplane.dtsi

Should I include any of them? or keep it simpler.

For some reason I have included the latter and there are some probing errors.

 

0 Kudos
Reply
6,223 Views
renaud
Contributor IV
What about the pcsphy4? Any modification needed to the part of the device tree?
The 1000Base-KX go through the backplane then a media converter (to 1000baseT). The MDIO bus is not connected trough the backplane.
0 Kudos
Reply
6,292 Views
renaud
Contributor IV

This is what I have:


ethernet@e8000 {
status = "okay";
phy-mode = "1000base-kx";
fixed-link {
speed = <1000>;
full-duplex;
};
};

ethernet eth1: Link is Up - 1Gbps/Full - flow control off

"fsl_dpaa_mac 1ae8000.ethernet eth1: major config 1000base-kx"

 

What seems to be missing is the last three steps of 31.8.1.3. in Linux. I am using the NXP qoirq Liunx branch lf-6.6.y

Trying to add them in drivers/net/pcs/pcs-lynx.c. Though, I never see pcs_config being called.  Debugging I see in drivers/net/phy/phylink.c:

phylink_pcs_config pcs = 0000000000000000. 

Would that not mean I cannot access the MDIO KX and MDIO KX AN?

0 Kudos
Reply
6,318 Views
renaud
Contributor IV

I think I got the answer for 1 and 2 but cannot get either 1000Kx or 10base-KR to work

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2035088%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELs1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2035088%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWe%20have%20a%20board%20using%20with%20two%2010G%20(1000Base-KR)%20and%20one%201000Base-KX%20connection%20on%20Serdes%201.%20Protocol%20is%201133%3C%2FP%3E%3CP%3EWe%20are%20using%20Linux%206.4%20and%20soon%206.11.x%3C%2FP%3E%3CP%3EMy%20understanding%20is%20that%20the%201000Base-KX%20support%20is%20not%20found%20in%20the%20kernel.org%20as%20per%20comment%20in%20fman_memac.%3A%3C%2FP%3E%3CP%3E%2F*%20TODO%3A%20The%20following%20interface%20modes%20are%20supported%20by%20(some)%20hardware%3CBR%20%2F%3E*%20but%20not%20by%20this%20driver%3A%3CBR%20%2F%3E*%20-%201000BASE-KX%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ebut%20can%20be%20found%20in%20nxp%20qoirq%20Linux%20support%3A%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-qoriq%2Flinux.git%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-qoriq%2Flinux.git%3C%2FA%3E%3C%2FP%3E%3CP%3Ein%20branch%26nbsp%3Blf-6.6.y.%3C%2FP%3E%3CP%3EAlso%20i%20found%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FQorIQ%2FEval-Board-for-1000Base-KX-LS1046A%2Fm-p%2F1178936%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FQorIQ%2FEval-Board-for-1000Base-KX-LS1046A%2Fm-p%2F1178936%3C%2FA%3E%26nbsp%3Bwhich%20shows%20what%20needs%20to%20be%20initialized%20by%20the%20boot%20loader%20and%20Linux.%3C%2FP%3E%3CP%3ESo%20could%20you%20confirm%20the%20following%3A%3C%2FP%3E%3CP%3E1.%20The%20upstream%20Linux%20support%20cannot%20be%20used%20to%20support%201000Base-KX%26nbsp%3Band%2For%201000Base-KR%20on%20the%20LS1046A.%3C%2FP%3E%3CP%3E2.%20In%20the%20link%20above%2C%20there%20is%20mention%20to%20configure%20SGMII_IF_MODE.%20Which%20part%20of%20Linux%20does%20that%3F%3C%2FP%3E%3CP%3E3.%20Can%20you%20show%20me%20what%20the%20node%20should%20look%20like%20for%20the%2010Gbase-kr%20and%201000Base-KX.%3C%2FP%3E%3CP%3E4.%20What%20is%20the%20latest%20U-boot%2FLinux%20to%20support%20the%20LS1046a%20and%20specially%20is%20there%20code%20in%20U-boot%20to%20do%20the%20initialization%20of%201000Base-kr%20and%26nbsp%3B%201000Base-kx.%20I%20guess%20the%20link%20above%20is%20the%20init%20sequence.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EOtherwise%2C%20If%20I%20am%20wrong%20about%20not%20being%20able%20to%20use%20upstream%20kernel%20(kernel.org)%2C%20I%20would%20appreciate%20a%20summary%20of%20what%20I%20have%20to%20do.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3ERenaud%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2053239%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2053239%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EEventually%20found%20the%20error%20on%20the%201000base-KX.%20There%20a%20few%20more%20bits%20to%20set%20along%20with%20clearing%20the%20AMP_RED%20field%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2038445%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2038445%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EA%20bit%20confusing%20when%20you%20nothing%20to%20config%20at%20U-boot.%20Where%20do%20you%20do%20the%20config%20from%2031.8.1.3.%20I%20supposed%20it%20is%20split%20between%20U-boot%20and%20Linux%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2038075%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2038075%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ELet's%20turn%20to%20the%2010gbase-kr.%20I%20saw%20that%20there%20is%20LANnTECR0%26nbsp%3B%20to%20set%20up.%3C%2FP%3E%3CP%3EI%20see%20two%20DTS%20include%20files%3A%3C%2FP%3E%3CP%3Earch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Ffsl-ls1046a-sd1-1133-lane-c-backplane-phylib.dtsi%3CBR%20%2F%3Earch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Ffsl-ls1046a-sd1-1133-lane-c-backplane.dtsi%3C%2FP%3E%3CP%3EShould%20I%20include%20any%20of%20them%3F%20or%20keep%20it%20simpler.%3C%2FP%3E%3CP%3EFor%20some%20reason%20I%20have%20included%20the%20latter%20and%20there%20are%20some%20probing%20errors.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2037664%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2037664%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWhat%20about%20the%20pcsphy4%3F%20Any%20modification%20needed%20to%20the%20part%20of%20the%20device%20tree%3F%3CBR%20%2F%3EThe%201000Base-KX%20go%20through%20the%20backplane%20then%20a%20media%20converter%20(to%201000baseT).%20The%20MDIO%20bus%20is%20not%20connected%20trough%20the%20backplane.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2036571%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2036571%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThis%20is%20what%20I%20have%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3Eethernet%40e8000%20%7B%3CBR%20%2F%3Estatus%20%3D%20%22okay%22%3B%3CBR%20%2F%3Ephy-mode%20%3D%20%221000base-kx%22%3B%3CBR%20%2F%3Efixed-link%20%7B%3CBR%20%2F%3Espeed%20%3D%20%26lt%3B1000%26gt%3B%3B%3CBR%20%2F%3Efull-duplex%3B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%7D%3B%3C%2FP%3E%3CP%3Eethernet%20eth1%3A%20Link%20is%20Up%20-%201Gbps%2FFull%20-%20flow%20control%20off%3C%2FP%3E%3CP%3E%22fsl_dpaa_mac%201ae8000.ethernet%20eth1%3A%20major%20config%201000base-kx%22%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhat%20seems%20to%20be%20missing%20is%20the%20last%20three%20steps%20of%26nbsp%3B%3CSPAN%3E31.8.1.3.%20in%20Linux.%20I%20am%20using%20the%20NXP%20qoirq%20Liunx%20branch%26nbsp%3Blf-6.6.y%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ETrying%20to%20add%20them%20in%26nbsp%3Bdrivers%2Fnet%2Fpcs%2Fpcs-lynx.c.%20Though%2C%20I%20never%20see%20pcs_config%20being%20called.%26nbsp%3B%20Debugging%20I%20see%20in%26nbsp%3Bdrivers%2Fnet%2Fphy%2Fphylink.c%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ephylink_pcs_config%20pcs%20%3D%200000000000000000.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWould%20that%20not%20mean%20I%20cannot%20access%20the%20MDIO%20KX%20and%20MDIO%20KX%20AN%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2036389%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2036389%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ethis%20is%20an%20example%20how%20to%20look%20like%20a%20node%20for%20the%201000Base-KX%3CBR%20%2F%3Eenet4%3A%20ethernet%404%20%7B%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20compatible%20%3D%20%22fsl%2Cfman-memac%22%3B%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20reg%20%3D%20%26lt%3B0x4000%200x1000%26gt%3B%3B%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20phy-mode%20%3D%20%221000base-kx%22%3B%20%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20fixed-link%20%3D%20%26lt%3B4%201%201000%200%200%26gt%3B%3B%20%2F%2F%20fixed%20link%20to%201%20Gbps%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20status%20%3D%20%22okay%22%3B%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%3CBR%20%2F%3Eadditionally%2C%20you%20have%20to%20follow%20the%20steps%20described%20in%20the%20subject%20%2231.8.1.3%20%20%201000Base-KX%22%20in%20the%20LS1046ARM.%3CBR%20%2F%3EThe%20LLDP%206.1.55%20uses%20the%20U-boot%20release%202023.04%3CBR%20%2F%3ENothing%20to%20config%20at%20U-boot%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2036266%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Ls1046a%201000Base-KX%2F10gBase-KR%20Linux%20support%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2036266%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20think%20I%20got%20the%20answer%20for%201%20and%202%20but%20cannot%20get%20either%201000Kx%20or%2010base-KR%20to%20work%3C%2FP%3E%3C%2FLINGO-BODY%3E