PFE driver missing in mainline linux 5.x

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

PFE driver missing in mainline linux 5.x

Jump to solution
1,924 Views
kai_wu
Contributor III

Hi,

I am using Mainline Linux 5.1 on my board (with ls1012a).  See the Figure 2 below.

I prepared the device tree for PFE, ksz9897(an ethernet switch) and PFE.

Also the driver for ksz9897(spi), fsl-dspi is enabled in Linux kernel. 

But I cannot find PFE driver in mainline Linux 5.1.

But I found it in NXP Layerscape SDK kernel 4.19 (i.e. 4.19 in NXP kernel, the directory is /driver/staging/fsl-ppfe)

Also, PFE driver is missing in NXP Layerscape SDK kernel 5.1. see Figure 1 below.

I can find DPAA2 driver in both mainline Linux 5.1 or NXP Linux 5.1, but PFE is missing in mainline Linux kernel.

pastedImage_6.png

Figure 1. PFE driver status in different Linux kernels

pastedImage_2.png

Figure 2. Connection between ethernet switch and ls1012a

I tried to port fsl-ppfe into mainline Linux 5.1(copy the fsl-ppfe folder from NXP Linux 4.19 into the mainline linux 5.1, make changes in drivers/staging/Kconfig and drivers/staging/Makefile). But when I am trying to compile this mainline Linux 5.1, I met many errors about the PFE driver( It seems many header file included by ppfe is changed in mainline Linux 5.1)? 

Does anyone know how to solve this problem?

Or

is NXP working on porting PFE driver into mainline Linux 5.x.

Thank you.   

Labels (1)
1 Solution
1,541 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kai,

I uploaded source code of the internal Linux Kernel 5.3 release in the following link, please have reference.

https://drive.google.com/open?id=1ATiplWmHLPW1SwuvL9WiP4AJCthZRWHo

In addition, there is no plan to add PFE driver into mainline Linux because of the legal review.

Thanks,

Yiping

View solution in original post

3 Replies
1,541 Views
yipingwang
NXP TechSupport
NXP TechSupport

We have internal Linux Kernel 5.3 release, I have load PFE driver from Linux Kernel 5.3 release in the following link, please have reference.

https://drive.google.com/open?id=1uZ7Vw-ESXY2MXhut_KUow6ZTSbyr9CmG 

1,541 Views
kai_wu
Contributor III

Hi Yiping, 

Thanks for your help. I took the PFE driver you gave in the link and copy it into the nxp Linux kernel 5.3 repository(drivers/staging/fsl_ppfe). 

When I tried to compile the Linux kernel 5.3. It shows an error in fsl_ppfe/pfe_eth.c (PHY_INTERFACE_MODE_2500SGMII is not defined).

Then I added PHY_INTERFACE_MODE_2500SGMII into include/linux/phy.h.  see figure below

pastedImage_1.png

After the modification, the build of Linux works. I got my Linux image. But I am not sure if it is correct to do this modification or if it will affect other files.    

You said you have internal Linux Kernel 5.3 release, so it's not public yet? Is there any way that I can get the repository? Or is there any possibility that NXP is working on porting  PFE driver into Linux mainline.    

Thank you.

Kai

0 Kudos
1,542 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kai,

I uploaded source code of the internal Linux Kernel 5.3 release in the following link, please have reference.

https://drive.google.com/open?id=1ATiplWmHLPW1SwuvL9WiP4AJCthZRWHo

In addition, there is no plan to add PFE driver into mainline Linux because of the legal review.

Thanks,

Yiping